Move logout button to settings. Replace logout button in menu with shutdown button.
This commit is contained in:
15
lib/db.dart
15
lib/db.dart
@@ -75,8 +75,17 @@ class SqliteHelper {
|
||||
}
|
||||
}
|
||||
|
||||
Future<Map> getSettings() async {
|
||||
return await selectAll(tableSettings);
|
||||
Future<Map> getSettings(bool withSession) async {
|
||||
Map settings = await selectAll(tableSettings);
|
||||
|
||||
if (withSession) {
|
||||
Map session = await selectAll(tableSession);
|
||||
if (settings != null && session != null) {
|
||||
settings.addAll(session);
|
||||
}
|
||||
}
|
||||
|
||||
return settings;
|
||||
}
|
||||
|
||||
Future<String> getToken() async {
|
||||
@@ -137,4 +146,4 @@ class SqliteHelper {
|
||||
Future clear() async {
|
||||
return await db.delete(tableSession, where: null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user