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,
String link, bool hasRetry, OverlayDialogManager dialogManager,
{bool? hasCancel}) async {
final noteAllowed = parent.target != null &&
final showNoteEdit = parent.target != null &&
allowAskForNoteAtEndOfConnection(parent.target, false) &&
(title == "Connection Error" || type == "restarting");
final showNoteEdit = noteAllowed && !hasRetry;
(title == "Connection Error" || type == "restarting") &&
!hasRetry;
if (showNoteEdit) {
await showConnEndAuditDialogCloseCanceled(
ffi: parent.target!, type: type, title: title, text: text);
closeConnection();
} 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,
hasCancel: hasCancel,
reconnect: hasRetry ? reconnect : null,
reconnectTimeout: hasRetry ? _reconnects : null,
onSubmit: onSubmit);
reconnectTimeout: hasRetry ? _reconnects : null);
}
_timer?.cancel();
if (hasRetry) {

View File

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