Add a small banner to web view that says what format the data is in.
This commit is contained in:
parent
e69a4c9732
commit
cbe676a359
4 changed files with 16 additions and 2 deletions
|
@ -40,6 +40,8 @@ class SessionData {
|
|||
static String DisplayError = "";
|
||||
static double? TotalPay;
|
||||
static bool ContainsTripTimes = true;
|
||||
static bool IsSavedData = false;
|
||||
static String SaveDataType = "";
|
||||
|
||||
/// Is true if the try-catch is tripped or if not running on Android
|
||||
static bool isWeb = false;
|
||||
|
@ -472,6 +474,8 @@ class SessionData {
|
|||
String cType = reply.headers.value("Content-Type") ?? "application/json";
|
||||
|
||||
if (cType == "application/json") {
|
||||
IsSavedData = true;
|
||||
SaveDataType = "JSON";
|
||||
return LoadData(reply.data as Map<String, dynamic>);
|
||||
} else if (cType == "application/nbt") {
|
||||
print("Data is in NBT Format");
|
||||
|
@ -482,6 +486,8 @@ class SessionData {
|
|||
|
||||
IsReadOnly = true;
|
||||
isWeb = true;
|
||||
IsSavedData = true;
|
||||
SaveDataType = "NBT";
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue