mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
fix: should not use Active to close a running popup.
This commit is contained in:
parent
4b405dfc5f
commit
f00ecbd0a1
2 changed files with 6 additions and 18 deletions
|
@ -21,24 +21,11 @@ namespace SourceGit.ViewModels {
|
|||
Active.Popup = popup;
|
||||
}
|
||||
|
||||
public static async void ShowAndStartPopup(Popup popup) {
|
||||
popup.HostPageId = Active.GetId();
|
||||
Active.Popup = popup;
|
||||
|
||||
if (!popup.Check()) return;
|
||||
|
||||
popup.InProgress = true;
|
||||
var task = popup.Sure();
|
||||
if (task != null) {
|
||||
var finished = await task;
|
||||
if (finished) {
|
||||
Active.Popup = null;
|
||||
} else {
|
||||
popup.InProgress = false;
|
||||
}
|
||||
} else {
|
||||
Active.Popup = null;
|
||||
}
|
||||
public static void ShowAndStartPopup(Popup popup) {
|
||||
var dumpPage = Active;
|
||||
popup.HostPageId = dumpPage.GetId();
|
||||
dumpPage.Popup = popup;
|
||||
dumpPage.ProcessPopup();
|
||||
}
|
||||
|
||||
public virtual string GetId() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue