mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
refactor(PopupManager): rewrite popup
This commit is contained in:
parent
28e3a1bb27
commit
7558bbd4f2
34 changed files with 183 additions and 221 deletions
|
@ -32,8 +32,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="repo"></param>
|
||||
/// <param name="tag"></param>
|
||||
public static void Show(Git.Repository repo, Git.Tag tag) {
|
||||
var popup = App.GetPopupManager(repo);
|
||||
popup?.Show(new PushTag(repo, tag));
|
||||
repo.GetPopupManager()?.Show(new PushTag(repo, tag));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -45,7 +44,7 @@ namespace SourceGit.UI {
|
|||
var remote = combRemotes.SelectedItem as Git.Remote;
|
||||
if (remote == null) return;
|
||||
|
||||
var popup = App.GetPopupManager(repo);
|
||||
var popup = repo.GetPopupManager();
|
||||
popup?.Lock();
|
||||
await Task.Run(() => Git.Tag.Push(repo, tag.Name, remote.Name));
|
||||
popup?.Close(true);
|
||||
|
@ -57,8 +56,7 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void Cancel(object sender, RoutedEventArgs e) {
|
||||
var popup = App.GetPopupManager(repo);
|
||||
popup?.Close();
|
||||
repo.GetPopupManager()?.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue