mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-13 08:11:01 +03:00
Compare commits
2 Commits
master
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
439e3abc79 | ||
|
|
b8c0787273 |
@@ -1016,19 +1016,31 @@ class FfiModel with ChangeNotifier {
|
|||||||
showMsgBox(SessionID sessionId, String type, String title, String text,
|
showMsgBox(SessionID sessionId, String type, String title, String text,
|
||||||
String link, bool hasRetry, OverlayDialogManager dialogManager,
|
String link, bool hasRetry, OverlayDialogManager dialogManager,
|
||||||
{bool? hasCancel}) async {
|
{bool? hasCancel}) async {
|
||||||
final showNoteEdit = parent.target != null &&
|
final noteAllowed = parent.target != null &&
|
||||||
allowAskForNoteAtEndOfConnection(parent.target, false) &&
|
allowAskForNoteAtEndOfConnection(parent.target, false) &&
|
||||||
(title == "Connection Error" || type == "restarting") &&
|
(title == "Connection Error" || type == "restarting");
|
||||||
!hasRetry;
|
final showNoteEdit = noteAllowed && !hasRetry;
|
||||||
if (showNoteEdit) {
|
if (showNoteEdit) {
|
||||||
await showConnEndAuditDialogCloseCanceled(
|
await showConnEndAuditDialogCloseCanceled(
|
||||||
ffi: parent.target!, type: type, title: title, text: text);
|
ffi: parent.target!, type: type, title: title, text: text);
|
||||||
closeConnection();
|
closeConnection();
|
||||||
} else {
|
} else {
|
||||||
|
VoidCallback? onSubmit;
|
||||||
|
if (noteAllowed && hasRetry) {
|
||||||
|
final ffi = parent.target!;
|
||||||
|
onSubmit = () async {
|
||||||
|
_timer?.cancel();
|
||||||
|
_timer = null;
|
||||||
|
await showConnEndAuditDialogCloseCanceled(
|
||||||
|
ffi: ffi, type: type, title: title, text: text);
|
||||||
|
closeConnection();
|
||||||
|
};
|
||||||
|
}
|
||||||
msgBox(sessionId, type, title, text, link, dialogManager,
|
msgBox(sessionId, type, title, text, link, dialogManager,
|
||||||
hasCancel: hasCancel,
|
hasCancel: hasCancel,
|
||||||
reconnect: hasRetry ? reconnect : null,
|
reconnect: hasRetry ? reconnect : null,
|
||||||
reconnectTimeout: hasRetry ? _reconnects : null);
|
reconnectTimeout: hasRetry ? _reconnects : null,
|
||||||
|
onSubmit: onSubmit);
|
||||||
}
|
}
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
if (hasRetry) {
|
if (hasRetry) {
|
||||||
|
|||||||
Reference in New Issue
Block a user