Fix the app session not being cleared when ending, or resetting.

This commit is contained in:
zontreck 2025-06-06 14:37:22 -07:00
parent ae035424c1
commit 55c805a315
3 changed files with 6 additions and 2 deletions

View file

@ -9,7 +9,7 @@ class TTConsts {
static get SESSION_SERVER => static get SESSION_SERVER =>
"https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php"; "https://api.zontreck.com/timetrack/$UPDATE_CHANNEL/timetrack.php";
static const VERSION = "1.0.0-beta.28"; static const VERSION = "1.0.0-beta.29";
static bool UPDATE_AVAILABLE = false; static bool UPDATE_AVAILABLE = false;
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta; static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta;

View file

@ -325,6 +325,7 @@ class SessionData {
ContainsTripTimes = true; ContainsTripTimes = true;
FlutterBackground.disableBackgroundExecution(); FlutterBackground.disableBackgroundExecution();
WakelockPlus.disable(); WakelockPlus.disable();
NBTHelper.CommitNBT(data: CompoundTag(), name: "appstate");
Calls.dispatch(); Calls.dispatch();
} }
@ -360,6 +361,9 @@ class SessionData {
if (IsOnTheClock) { if (IsOnTheClock) {
await Login(); await Login();
} else {
ResetAppSession();
return;
} }
StartTime = DateTime.parse(ct.get("start")!.asString()); StartTime = DateTime.parse(ct.get("start")!.asString());

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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.0-beta.28 version: 1.0.0-beta.29
environment: environment:
sdk: ^3.7.2 sdk: ^3.7.2