Add a message that is to be displayed after saving the state data when performing actions.
This commit is contained in:
parent
09a52d2865
commit
ced927c306
4 changed files with 36 additions and 4 deletions
|
@ -38,6 +38,8 @@ class SessionData {
|
|||
static Callbacks Calls = Callbacks();
|
||||
static String LastSessionID = "";
|
||||
static String DisplayError = "";
|
||||
static String DisplayMessage = "";
|
||||
static bool DirtyState = false;
|
||||
static double? TotalPay;
|
||||
static bool ContainsTripTimes = true;
|
||||
static bool IsSavedData = false;
|
||||
|
@ -84,10 +86,10 @@ class SessionData {
|
|||
seconds: diff.inSeconds,
|
||||
);
|
||||
stamp.add(diffTime);
|
||||
print("Add timestamp; ${diff}; ${diffTime}");
|
||||
print("Add timestamp; $diff; $diffTime");
|
||||
}
|
||||
|
||||
print("Final time: ${stamp}");
|
||||
print("Final time: $stamp");
|
||||
|
||||
return stamp.toDuration();
|
||||
}
|
||||
|
@ -356,6 +358,11 @@ class SessionData {
|
|||
static Future<void> SaveCacheState() async {
|
||||
CompoundTag ct = IsOnTheClock ? await _serializeToNBT() : CompoundTag();
|
||||
await NBTHelper.CommitNBT(data: ct, name: "appstate");
|
||||
|
||||
if (DirtyState) {
|
||||
DirtyState = false;
|
||||
DisplayMessage = "Saved cache state";
|
||||
}
|
||||
}
|
||||
|
||||
static Future<void> _deserialize(CompoundTag ct) async {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue