Switch to using the saved data flag
This commit is contained in:
parent
cbe676a359
commit
c70a6f4f1d
2 changed files with 2 additions and 1 deletions
|
@ -462,6 +462,7 @@ class SessionData {
|
||||||
|
|
||||||
static Future<bool> DownloadData() async {
|
static Future<bool> DownloadData() async {
|
||||||
Dio dio = Dio();
|
Dio dio = Dio();
|
||||||
|
IsSavedData = false;
|
||||||
Map<String, dynamic> payload = {"cmd": "get", "id": LastSessionID};
|
Map<String, dynamic> payload = {"cmd": "get", "id": LastSessionID};
|
||||||
|
|
||||||
// Send the data, and get the response
|
// Send the data, and get the response
|
||||||
|
|
|
@ -30,7 +30,7 @@ Future<void> main() async {
|
||||||
SessionData.LastSessionID = sess;
|
SessionData.LastSessionID = sess;
|
||||||
if (SessionData.LastSessionID.isNotEmpty) {
|
if (SessionData.LastSessionID.isNotEmpty) {
|
||||||
await SessionData.DownloadData();
|
await SessionData.DownloadData();
|
||||||
if (!SessionData.IsReadOnly) {
|
if (!SessionData.IsSavedData) {
|
||||||
// Invalid session token
|
// Invalid session token
|
||||||
SessionData.DisplayError = "The URL and or session token is invalid";
|
SessionData.DisplayError = "The URL and or session token is invalid";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue