diff --git a/lib/consts.dart b/lib/consts.dart index 90f8117..2a3a22e 100644 --- a/lib/consts.dart +++ b/lib/consts.dart @@ -9,7 +9,7 @@ class TTConsts { static get SESSION_SERVER => "https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php"; - static const VERSION = "1.0.0-beta.29"; + static const VERSION = "1.0.0-beta.30"; static bool UPDATE_AVAILABLE = false; static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta; diff --git a/lib/data.dart b/lib/data.dart index f2704e2..32b137e 100644 --- a/lib/data.dart +++ b/lib/data.dart @@ -323,7 +323,9 @@ class SessionData { DisplayError = ""; IsReadOnly = false; ContainsTripTimes = true; - FlutterBackground.disableBackgroundExecution(); + if (FlutterBackground.isBackgroundExecutionEnabled) { + FlutterBackground.disableBackgroundExecution(); + } WakelockPlus.disable(); NBTHelper.CommitNBT(data: CompoundTag(), name: "appstate"); @@ -361,7 +363,9 @@ class SessionData { if (IsOnTheClock) { await Login(); - } else { + } + + if (!ct.containsKey("start")) { ResetAppSession(); return; } @@ -396,6 +400,8 @@ class SessionData { ct.get("current_delivery")!.asCompoundTag(), ); } + + print("Deserialized data: ${SnbtIo.writeToString(ct)}"); } /// This private function will turn all the data into NBT, for both the cache state, and newer usage, for storing it on the server in a more compact format. diff --git a/pubspec.yaml b/pubspec.yaml index 48afc0d..7ca04eb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.0-beta.29 +version: 1.0.0-beta.30 environment: sdk: ^3.7.2