mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
fix<Clone>: fix crash after clone a new repository
This commit is contained in:
parent
faffba09c8
commit
79084c9a9a
4 changed files with 12 additions and 9 deletions
|
@ -41,9 +41,11 @@ namespace SourceGit.ViewModels {
|
|||
set => SetProperty(ref _extraArgs, value);
|
||||
}
|
||||
|
||||
public Clone(LauncherPage page) {
|
||||
View = new Views.Clone() { DataContext = this };
|
||||
public Clone(Launcher launcher, LauncherPage page) {
|
||||
_launcher = launcher;
|
||||
_page = page;
|
||||
|
||||
View = new Views.Clone() { DataContext = this };
|
||||
}
|
||||
|
||||
public static ValidationResult ValidateRemote(string remote, ValidationContext _) {
|
||||
|
@ -92,14 +94,14 @@ namespace SourceGit.ViewModels {
|
|||
};
|
||||
Preference.AddNode(node);
|
||||
|
||||
_page.View = new Views.Repository() { DataContext = repo };
|
||||
_page.Node = node;
|
||||
_launcher.OpenRepositoryInTab(node, _page);
|
||||
});
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
private Launcher _launcher = null;
|
||||
private LauncherPage _page = null;
|
||||
private string _remote = string.Empty;
|
||||
private bool _useSSH = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue