mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-30 03:43:20 +03:00
Compare commits
1 Commits
copilot/fi
...
96797742f2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96797742f2 |
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1289,7 +1289,8 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
drop(connection_round_state_lock);
|
||||
|
||||
let cloned = self.clone();
|
||||
|
||||
*cloned.audit_guid.lock().unwrap() = String::new();
|
||||
*cloned.last_audit_note.lock().unwrap() = String::new();
|
||||
// override only if true
|
||||
if true == force_relay {
|
||||
self.lc.write().unwrap().force_relay = true;
|
||||
@@ -1812,9 +1813,6 @@ impl<T: InvokeUiSession> Interface for Session<T> {
|
||||
);
|
||||
}
|
||||
self.update_privacy_mode();
|
||||
// Clear audit_guid when connection is established successfully
|
||||
*self.audit_guid.lock().unwrap() = String::new();
|
||||
*self.last_audit_note.lock().unwrap() = String::new();
|
||||
// Save recent peers, then push event to flutter. So flutter can refresh peer page.
|
||||
self.lc.write().unwrap().handle_peer_info(&pi);
|
||||
self.set_peer_info(&pi);
|
||||
|
||||
Reference in New Issue
Block a user