Skip to content

Commit 68b5afb

Browse files
committed
code_review: PR #1531
Makes sure observable property are changed in UIThread Signed-off-by: leo <[email protected]>
1 parent 95ec6e7 commit 68b5afb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ViewModels/Clone.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.ComponentModel.DataAnnotations;
33
using System.IO;
44
using System.Threading.Tasks;
5+
using Avalonia.Threading;
56

67
namespace SourceGit.ViewModels
78
{
@@ -72,7 +73,7 @@ public Clone(string pageId)
7273
{
7374
var text = await App.GetClipboardTextAsync();
7475
if (Models.Remote.IsValidURL(text))
75-
Remote = text;
76+
Dispatcher.UIThread.Post(() => Remote = text);
7677
}
7778
catch
7879
{

0 commit comments

Comments
 (0)