Compare commits

..

1 Commits

Author SHA1 Message Date
rustdesk
96797742f2 fix https://github.com/rustdesk/rustdesk/issues/14520 2026-03-13 10:42:13 +08:00
2 changed files with 7 additions and 19 deletions

View File

@@ -1016,31 +1016,19 @@ 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 noteAllowed = parent.target != null && final showNoteEdit = parent.target != null &&
allowAskForNoteAtEndOfConnection(parent.target, false) && allowAskForNoteAtEndOfConnection(parent.target, false) &&
(title == "Connection Error" || type == "restarting"); (title == "Connection Error" || type == "restarting") &&
final showNoteEdit = noteAllowed && !hasRetry; !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) {

View File

@@ -213,7 +213,7 @@ pub fn core_main() -> Option<Vec<String>> {
} }
Ok(false) => "Update failed!".to_string(), Ok(false) => "Update failed!".to_string(),
Ok(true) => match platform::update_me(false) { Ok(true) => match platform::update_me(false) {
Ok(_) => "Update successfully!".to_string(), Ok(_) => "Updated successfully!".to_string(),
Err(err) => { Err(err) => {
log::error!("Failed with error: {err}"); log::error!("Failed with error: {err}");
"Update failed!".to_string() "Update failed!".to_string()
@@ -335,8 +335,8 @@ pub fn core_main() -> Option<Vec<String>> {
log::info!("Starting update process..."); log::info!("Starting update process...");
let _text = match platform::update_me() { let _text = match platform::update_me() {
Ok(_) => { Ok(_) => {
println!("{}", translate("Update successfully!".to_string())); println!("{}", translate("Updated successfully!".to_string()));
log::info!("Update successfully!"); log::info!("Updated successfully!");
} }
Err(err) => { Err(err) => {
eprintln!("Update failed with error: {}", err); eprintln!("Update failed with error: {}", err);