Fix failed deserializing in web view

This commit is contained in:
zontreck 2025-06-07 15:45:10 -07:00
parent 55c805a315
commit 09a52d2865
3 changed files with 10 additions and 4 deletions

View file

@ -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;

View file

@ -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.

View file

@ -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