mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-24 19:02:39 +08:00
fix: deadlock on ctrl+N (#1531)
This commit is contained in:
@@ -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 _)
|
||||
|
||||
Reference in New Issue
Block a user