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

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