mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +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
|
@ -40,19 +40,19 @@ namespace SourceGit.UI {
|
|||
/// <param name="opened"></param>
|
||||
/// <param name="targets"></param>
|
||||
public static void Show(Git.Repository opened, List<Git.Change> targets) {
|
||||
var popup = App.Launcher.GetPopupManager(opened);
|
||||
var popup = App.GetPopupManager(opened);
|
||||
popup?.Show(new Discard(opened, targets));
|
||||
}
|
||||
|
||||
private async void Sure(object sender, RoutedEventArgs e) {
|
||||
var popup = App.Launcher.GetPopupManager(repo);
|
||||
var popup = App.GetPopupManager(repo);
|
||||
popup?.Lock();
|
||||
await Task.Run(() => repo.Discard(changes));
|
||||
popup?.Close(true);
|
||||
}
|
||||
|
||||
private void Cancel(object sender, RoutedEventArgs e) {
|
||||
App.Launcher.GetPopupManager(repo)?.Close();
|
||||
App.GetPopupManager(repo)?.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue