Updater now not skippable on first app start

updater no longer pops up when no new updates are found
This commit is contained in:
2019-01-05 19:06:57 +01:00
parent a9bf767f8d
commit dbdafb6bd5
2 changed files with 24 additions and 10 deletions

View File

@@ -14,11 +14,13 @@ namespace RothenburgAR.Updater
{
public enum UpdateState
{
UpToDate,
UpdatesFound,
ConfirmationPending,
Downloading,
Completed,
Failed
Failed,
NoInternet
}
public class UpdateManager : Singleton<UpdateManager>
@@ -41,6 +43,7 @@ namespace RothenburgAR.Updater
{
// just continue to app
UpdatesCompleted();
UpdateState = UpdateState.NoInternet;
return;
}
@@ -80,6 +83,7 @@ namespace RothenburgAR.Updater
if (VersionAnswer.Data.TrueForAll(d => d.Meta.Status == VersionStatus.ok && d.Tracker.Status == VersionStatus.ok))
{
UpdateState = UpdateState.UpToDate;
StartCoroutine(CheckFiles());
return;
}
@@ -448,9 +452,11 @@ namespace RothenburgAR.Updater
if (!UIManager.Instance.StartingUp)
UIManager.Instance.SwitchToView(ViewName.UpdaterView);
}
public void UpdatesCompleted()
{
if (UpdateState == UpdateState.UpToDate) return;
UpdateState = UpdateState.Completed;
if (!UIManager.Instance.StartingUp)