backend: separated agent classes. frontend: chat message context menu (does nothing)
This commit is contained in:
1 parent
3f37f727af
commit
22fe5619d8
5 files changed
+205
-82
No files matched your search
@@ -49,7 +49,7 @@ class Backend {
|
||||
}
|
||||
}
|
||||
|
||||
static Future<bool> auth(String username, String password) {
|
||||
static Future<bool> auth(String username, String password) async {
|
||||
if (_credentials != null) {
|
||||
print("Cannot authenticate twice");
|
||||
return Future.value(false);
|
||||
@@ -60,7 +60,11 @@ class Backend {
|
||||
_credentialsCompleter = null;
|
||||
}
|
||||
_loginCompleter = Completer();
|
||||
return _loginCompleter!.future;
|
||||
final success = await _loginCompleter!.future;
|
||||
if (!success) {
|
||||
_credentials = null;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
static void connect() {
|
||||
|
||||
Reference in new issue
Block a user