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 class Submodule
|
||||||
{
|
{
|
||||||
public string Path { get; set; } = "";
|
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)
|
lock (_lockSubmodule)
|
||||||
{
|
{
|
||||||
|
@ -223,7 +223,7 @@ namespace SourceGit.Models
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
|
_updateWC = DateTime.Now.AddSeconds(1).ToFileTime();
|
||||||
}
|
}
|
||||||
|
|
|
@ -778,8 +778,8 @@ namespace SourceGit.ViewModels
|
||||||
public void RefreshSubmodules()
|
public void RefreshSubmodules()
|
||||||
{
|
{
|
||||||
var submodules = new Commands.QuerySubmodules(_fullpath).Result();
|
var submodules = new Commands.QuerySubmodules(_fullpath).Result();
|
||||||
if (_watcher != null)
|
if (_watcher != null)
|
||||||
_watcher.UpdateSubmodules(submodules);
|
_watcher.SetSubmodules(submodules);
|
||||||
|
|
||||||
Dispatcher.UIThread.Invoke(() => Submodules = submodules);
|
Dispatcher.UIThread.Invoke(() => Submodules = submodules);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1238,7 +1238,7 @@ namespace SourceGit.ViewModels
|
||||||
App.RaiseException(_repo.FullPath, "Repository has unfinished job! Please wait!");
|
App.RaiseException(_repo.FullPath, "Repository has unfinished job! Please wait!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(_commitMessage))
|
if (string.IsNullOrWhiteSpace(_commitMessage))
|
||||||
{
|
{
|
||||||
App.RaiseException(_repo.FullPath, "Commit without message is NOT allowed!");
|
App.RaiseException(_repo.FullPath, "Commit without message is NOT allowed!");
|
||||||
|
@ -1264,7 +1264,7 @@ namespace SourceGit.ViewModels
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IsCommitting = true;
|
IsCommitting = true;
|
||||||
_repo.Settings.PushCommitMessage(_commitMessage);
|
_repo.Settings.PushCommitMessage(_commitMessage);
|
||||||
_repo.SetWatcherEnabled(false);
|
_repo.SetWatcherEnabled(false);
|
||||||
|
|
|
@ -523,9 +523,9 @@ namespace SourceGit.Views
|
||||||
|
|
||||||
private void OnCommitDataGridKeyDown(object sender, KeyEventArgs e)
|
private void OnCommitDataGridKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (sender is DataGrid grid &&
|
if (sender is DataGrid grid &&
|
||||||
grid.SelectedItems is { Count: > 0 } selected &&
|
grid.SelectedItems is { Count: > 0 } selected &&
|
||||||
e.Key == Key.C &&
|
e.Key == Key.C &&
|
||||||
e.KeyModifiers.HasFlag(KeyModifiers.Control))
|
e.KeyModifiers.HasFlag(KeyModifiers.Control))
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder();
|
var builder = new StringBuilder();
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace SourceGit.Views
|
||||||
private void OnRowHeaderDragOver(object sender, DragEventArgs e)
|
private void OnRowHeaderDragOver(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
if (DataContext is ViewModels.InteractiveRebase vm &&
|
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 &&
|
sender is Border { DataContext: ViewModels.InteractiveRebaseItem dst } border &&
|
||||||
src != dst)
|
src != dst)
|
||||||
{
|
{
|
||||||
|
@ -64,8 +64,8 @@ namespace SourceGit.Views
|
||||||
for (var i = srcIdx; i > dstIdx; i--)
|
for (var i = srcIdx; i > dstIdx; i--)
|
||||||
vm.MoveItemUp(src);
|
vm.MoveItemUp(src);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace SourceGit.Views
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Text = string.Empty;
|
Text = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
|
private void OnTextViewContextRequested(object sender, ContextRequestedEventArgs e)
|
||||||
|
|
Loading…
Reference in a new issue