Fix: note dialog not shown when closing session from reconnecting screen (#14528)

* Initial plan

* Fix: show ask-for-note dialog when user clicks OK on reconnecting screen (#14527)

Co-authored-by: rustdesk <71636191+rustdesk@users.noreply.github.com>

* fix: don't clear audit_guid during reconnect, clear it after connection established

Signed-off-by: 21pages <sunboeasy@gmail.com>

---------

Signed-off-by: 21pages <sunboeasy@gmail.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rustdesk <71636191+rustdesk@users.noreply.github.com>
Co-authored-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
Copilot
2026-03-16 18:27:39 +08:00
committed by GitHub
parent e3b6e4eaf0
commit 02da7132e7
2 changed files with 20 additions and 6 deletions

View File

@@ -1289,8 +1289,7 @@ 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;
@@ -1813,6 +1812,9 @@ 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);