mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
optimize(*): move App.Launcher.GetPopupManager to App.GetPopupManager
This commit is contained in:
parent
3c24eaa6a7
commit
5066b974a1
34 changed files with 126 additions and 133 deletions
|
@ -30,7 +30,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="opened">Opened repository</param>
|
||||
/// <param name="preferRemoteBranch">Prefered remote branch</param>
|
||||
public static void Show(Git.Repository opened, string preferRemoteBranch = null) {
|
||||
var popup = App.Launcher.GetPopupManager(opened);
|
||||
var popup = App.GetPopupManager(opened);
|
||||
popup?.Show(new Pull(opened, preferRemoteBranch));
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace SourceGit.UI {
|
|||
|
||||
if (remote == null || branch == null) return;
|
||||
|
||||
var popup = App.Launcher.GetPopupManager(repo);
|
||||
var popup = App.GetPopupManager(repo);
|
||||
popup?.Lock();
|
||||
await Task.Run(() => repo.Pull(remote, branch.Substring(branch.IndexOf('/')+1), msg => popup?.UpdateStatus(msg), rebase, autoStash));
|
||||
popup?.Close(true);
|
||||
|
@ -89,7 +89,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Cancel(object sender, RoutedEventArgs e) {
|
||||
App.Launcher.GetPopupManager(repo)?.Close();
|
||||
App.GetPopupManager(repo)?.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue