fix: deadlock on ctrl+N (#1531)

This commit is contained in:
Nathan Baulch
2025-07-07 12:43:44 +10:00
committed by GitHub
parent 6476dbb889
commit 95ec6e723c

View File

@@ -66,16 +66,19 @@ namespace SourceGit.ViewModels
if (string.IsNullOrEmpty(ParentFolder))
_parentFolder = Preferences.Instance.GitDefaultCloneDir;
try
Task.Run(async () =>
{
var text = App.GetClipboardTextAsync().Result;
if (Models.Remote.IsValidURL(text))
Remote = text;
}
catch
{
// Ignore
}
try
{
var text = await App.GetClipboardTextAsync();
if (Models.Remote.IsValidURL(text))
Remote = text;
}
catch
{
// Ignore
}
});
}
public static ValidationResult ValidateRemote(string remote, ValidationContext _)