fix cm event listener & switch permission

This commit is contained in:
csf
2022-08-18 19:49:41 +08:00
parent 968cff967e
commit 2c7f0d7588
4 changed files with 87 additions and 133 deletions

View File

@@ -366,7 +366,7 @@ class ServerModel with ChangeNotifier {
_clients[client.id] = client;
scrollToBottom();
notifyListeners();
showLoginDialog(client);
if (isAndroid) showLoginDialog(client);
} catch (e) {
debugPrint("Failed to call loginRequest,error:$e");
}
@@ -483,6 +483,8 @@ class Client {
bool keyboard = false;
bool clipboard = false;
bool audio = false;
bool file = false;
bool restart = false;
Client(this.authorized, this.isFileTransfer, this.name, this.peerId,
this.keyboard, this.clipboard, this.audio);
@@ -496,6 +498,8 @@ class Client {
keyboard = json['keyboard'];
clipboard = json['clipboard'];
audio = json['audio'];
file = json['file'];
restart = json['restart'];
}
Map<String, dynamic> toJson() {