mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
fix, dialog button, reconnect cancel in a short time
1. Two `reconnect` is called. 2. The window cannot be closed. Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
@@ -996,11 +996,20 @@ void msgBox(SessionID sessionId, String type, String title, String text,
|
||||
}));
|
||||
}
|
||||
if (reconnect != null && title == "Connection Error") {
|
||||
buttons.insert(
|
||||
0,
|
||||
dialogButton('Reconnect', isOutline: true, onPressed: () {
|
||||
reconnect(dialogManager, sessionId, false);
|
||||
}));
|
||||
final enabled = true.obs;
|
||||
final button = Obx(
|
||||
() => dialogButton(
|
||||
'Reconnect',
|
||||
isOutline: true,
|
||||
onPressed: enabled.isTrue
|
||||
? () {
|
||||
enabled.value = false;
|
||||
reconnect(dialogManager, sessionId, false);
|
||||
}
|
||||
: null,
|
||||
),
|
||||
);
|
||||
buttons.insert(0, button);
|
||||
}
|
||||
if (link.isNotEmpty) {
|
||||
buttons.insert(0, dialogButton('JumpLink', onPressed: jumplink));
|
||||
|
||||
Reference in New Issue
Block a user