Compare commits

..

2 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
439e3abc79 Fix: show ask-for-note dialog when user clicks OK on reconnecting screen (#14527)
Co-authored-by: rustdesk <71636191+rustdesk@users.noreply.github.com>
2026-03-12 15:18:50 +00:00
copilot-swe-agent[bot]
b8c0787273 Initial plan 2026-03-12 15:12:58 +00:00
2 changed files with 19 additions and 7 deletions

View File

@@ -1016,19 +1016,31 @@ class FfiModel with ChangeNotifier {
showMsgBox(SessionID sessionId, String type, String title, String text,
String link, bool hasRetry, OverlayDialogManager dialogManager,
{bool? hasCancel}) async {
final showNoteEdit = parent.target != null &&
final noteAllowed = parent.target != null &&
allowAskForNoteAtEndOfConnection(parent.target, false) &&
(title == "Connection Error" || type == "restarting") &&
!hasRetry;
(title == "Connection Error" || type == "restarting");
final showNoteEdit = noteAllowed && !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);
reconnectTimeout: hasRetry ? _reconnects : null,
onSubmit: onSubmit);
}
_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(_) => "Updated successfully!".to_string(),
Ok(_) => "Update 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("Updated successfully!".to_string()));
log::info!("Updated successfully!");
println!("{}", translate("Update successfully!".to_string()));
log::info!("Update successfully!");
}
Err(err) => {
eprintln!("Update failed with error: {}", err);