mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 17:44:59 +00:00
fix: can not open submodule that has not been initialized
This commit is contained in:
parent
9e91494a20
commit
20a239621b
2 changed files with 9 additions and 6 deletions
|
@ -183,7 +183,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (sender is ListBox { SelectedItem: Models.Submodule submodule } grid && DataContext is ViewModels.Repository repo)
|
||||
{
|
||||
var menu = repo.CreateContextMenuForSubmodule(submodule.Path);
|
||||
var menu = repo.CreateContextMenuForSubmodule(submodule);
|
||||
menu?.Open(grid);
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,9 @@ namespace SourceGit.Views
|
|||
|
||||
private void OnDoubleTappedSubmodule(object sender, TappedEventArgs e)
|
||||
{
|
||||
if (sender is ListBox { SelectedItem: Models.Submodule submodule } && DataContext is ViewModels.Repository repo)
|
||||
if (sender is ListBox { SelectedItem: Models.Submodule submodule } &&
|
||||
submodule.Status != Models.SubmoduleStatus.NotInited &&
|
||||
DataContext is ViewModels.Repository repo)
|
||||
{
|
||||
repo.OpenSubmodule(submodule.Path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue