setup: fix some logic returning to the add page
This commit is contained in:
parent
2c7104ab22
commit
0037013ca3
|
@ -79,6 +79,7 @@ namespace SparkleShare {
|
|||
public readonly List<SparklePlugin> Plugins = new List<SparklePlugin> ();
|
||||
public SparklePlugin SelectedPlugin;
|
||||
|
||||
public bool WindowIsOpen { get; private set; }
|
||||
public SparkleInvite PendingInvite { get; private set; }
|
||||
public int TutorialPageNumber { get; private set; }
|
||||
public string PreviousUrl { get; private set; }
|
||||
|
@ -184,6 +185,8 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
if (PendingInvite != null) {
|
||||
WindowIsOpen = true;
|
||||
|
||||
if (ShowWindowEvent != null)
|
||||
ShowWindowEvent ();
|
||||
|
||||
|
@ -202,10 +205,21 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
if (page_type == PageType.Add) {
|
||||
if (!Program.Controller.FirstRun && TutorialPageNumber == 0) {
|
||||
if (WindowIsOpen) {
|
||||
if (this.current_page == PageType.Error) {
|
||||
if (ChangePageEvent != null)
|
||||
ChangePageEvent (page_type, null);
|
||||
}
|
||||
|
||||
if (ShowWindowEvent != null)
|
||||
ShowWindowEvent ();
|
||||
|
||||
} else if (!Program.Controller.FirstRun && TutorialPageNumber == 0) {
|
||||
if (ChangePageEvent != null)
|
||||
ChangePageEvent (page_type, null);
|
||||
|
||||
|
||||
WindowIsOpen = true;
|
||||
|
||||
if (ShowWindowEvent != null)
|
||||
ShowWindowEvent ();
|
||||
}
|
||||
|
@ -213,6 +227,8 @@ namespace SparkleShare {
|
|||
return;
|
||||
}
|
||||
|
||||
WindowIsOpen = true;
|
||||
|
||||
if (ChangePageEvent != null)
|
||||
ChangePageEvent (page_type, null);
|
||||
|
||||
|
@ -232,6 +248,8 @@ namespace SparkleShare {
|
|||
|
||||
this.fetch_prior_history = false;
|
||||
|
||||
WindowIsOpen = false;
|
||||
|
||||
if (HideWindowEvent != null)
|
||||
HideWindowEvent ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue