Move logout button to settings. Replace logout button in menu with shutdown button.

This commit is contained in:
Ivan Murashov
2018-02-05 20:02:36 +03:00
parent b19381f00c
commit 5f2d67bbc1
23 changed files with 433 additions and 136 deletions

View File

@@ -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);
}
}
}