mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
refactor: rename Models.Watcher.UpdateSubmodules
to Models.Watcher.SetSubmodules
* run `dotnet format`
This commit is contained in:
parent
71d2b295da
commit
a75d50bf97
7 changed files with 14 additions and 14 deletions
|
@ -3,6 +3,6 @@
|
|||
public class Submodule
|
||||
{
|
||||
public string Path { get; set; } = "";
|
||||
public bool IsDirty { get; set; } = false;
|
||||
public bool IsDirty { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace SourceGit.Models
|
|||
}
|
||||
}
|
||||
|
||||
public void UpdateSubmodules(List<Submodule> submodules)
|
||||
public void SetSubmodules(List<Submodule> submodules)
|
||||
{
|
||||
lock (_lockSubmodule)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ namespace SourceGit.Models
|
|||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
|
||||
}
|
||||
|
|
|
@ -778,8 +778,8 @@ namespace SourceGit.ViewModels
|
|||
public void RefreshSubmodules()
|
||||
{
|
||||
var submodules = new Commands.QuerySubmodules(_fullpath).Result();
|
||||
if (_watcher != null)
|
||||
_watcher.UpdateSubmodules(submodules);
|
||||
if (_watcher != null)
|
||||
_watcher.SetSubmodules(submodules);
|
||||
|
||||
Dispatcher.UIThread.Invoke(() => Submodules = submodules);
|
||||
}
|
||||
|
|
|
@ -1238,7 +1238,7 @@ namespace SourceGit.ViewModels
|
|||
App.RaiseException(_repo.FullPath, "Repository has unfinished job! Please wait!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_commitMessage))
|
||||
{
|
||||
App.RaiseException(_repo.FullPath, "Commit without message is NOT allowed!");
|
||||
|
@ -1264,7 +1264,7 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
IsCommitting = true;
|
||||
_repo.Settings.PushCommitMessage(_commitMessage);
|
||||
_repo.SetWatcherEnabled(false);
|
||||
|
|
|
@ -523,9 +523,9 @@ namespace SourceGit.Views
|
|||
|
||||
private void OnCommitDataGridKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (sender is DataGrid grid &&
|
||||
grid.SelectedItems is { Count: > 0 } selected &&
|
||||
e.Key == Key.C &&
|
||||
if (sender is DataGrid grid &&
|
||||
grid.SelectedItems is { Count: > 0 } selected &&
|
||||
e.Key == Key.C &&
|
||||
e.KeyModifiers.HasFlag(KeyModifiers.Control))
|
||||
{
|
||||
var builder = new StringBuilder();
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace SourceGit.Views
|
|||
private void OnRowHeaderDragOver(object sender, DragEventArgs e)
|
||||
{
|
||||
if (DataContext is ViewModels.InteractiveRebase vm &&
|
||||
e.Data.Get("InteractiveRebaseItem") is ViewModels.InteractiveRebaseItem src &&
|
||||
e.Data.Get("InteractiveRebaseItem") is ViewModels.InteractiveRebaseItem src &&
|
||||
sender is Border { DataContext: ViewModels.InteractiveRebaseItem dst } border &&
|
||||
src != dst)
|
||||
{
|
||||
|
@ -64,8 +64,8 @@ namespace SourceGit.Views
|
|||
for (var i = srcIdx; i > dstIdx; i--)
|
||||
vm.MoveItemUp(src);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace SourceGit.Views
|
|||
else
|
||||
{
|
||||
Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
|
||||
|
|
Loading…
Reference in a new issue