code_review: PR #1531

Makes sure observable property are changed in UIThread

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2025-07-07 10:47:09 +08:00
parent 95ec6e723c
commit 68b5afb60d

View File

@@ -2,6 +2,7 @@
using System.ComponentModel.DataAnnotations;
using System.IO;
using System.Threading.Tasks;
using Avalonia.Threading;
namespace SourceGit.ViewModels
{
@@ -72,7 +73,7 @@ namespace SourceGit.ViewModels
{
var text = await App.GetClipboardTextAsync();
if (Models.Remote.IsValidURL(text))
Remote = text;
Dispatcher.UIThread.Post(() => Remote = text);
}
catch
{