Fix being unable to load NBT in web viewer
This commit is contained in:
parent
7b05ed2a4a
commit
596203378b
3 changed files with 6 additions and 2 deletions
|
@ -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.19";
|
static const VERSION = "1.0.0-beta.20";
|
||||||
|
|
||||||
static bool UPDATE_AVAILABLE = false;
|
static bool UPDATE_AVAILABLE = false;
|
||||||
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta;
|
static UpdateChannel UPDATE_CHANNEL = UpdateChannel.beta;
|
||||||
|
|
|
@ -358,6 +358,7 @@ class SessionData {
|
||||||
}
|
}
|
||||||
|
|
||||||
ListTag poses = ct.get("pos")! as ListTag;
|
ListTag poses = ct.get("pos")! as ListTag;
|
||||||
|
positions.clear();
|
||||||
for (var pos in poses.value) {
|
for (var pos in poses.value) {
|
||||||
positions.add(await SmallPosition.fromNBT(pos.asCompoundTag()));
|
positions.add(await SmallPosition.fromNBT(pos.asCompoundTag()));
|
||||||
}
|
}
|
||||||
|
@ -461,6 +462,9 @@ class SessionData {
|
||||||
// Convert this to a CompoundTag
|
// Convert this to a CompoundTag
|
||||||
CompoundTag ct = await NbtIo.readFromStream(lst) as CompoundTag;
|
CompoundTag ct = await NbtIo.readFromStream(lst) as CompoundTag;
|
||||||
_deserialize(ct);
|
_deserialize(ct);
|
||||||
|
|
||||||
|
IsReadOnly = true;
|
||||||
|
isWeb = true;
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -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.19
|
version: 1.0.0-beta.20
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.2
|
sdk: ^3.7.2
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue