prevent authorization request spamming windows (#335)

This commit is contained in:
Ferdinand Schober
2025-10-28 07:25:01 +01:00
committed by GitHub
parent 4e5a66340a
commit 0dd413e989
3 changed files with 12 additions and 1 deletions

View File

@@ -474,6 +474,9 @@ impl Window {
}
pub(super) fn request_authorization(&self, fingerprint: &str) {
if let Some(w) = self.imp().authorization_window.borrow_mut().take() {
w.close();
}
let window = AuthorizationWindow::new(fingerprint);
window.set_transient_for(Some(self));
window.connect_closure(
@@ -496,5 +499,6 @@ impl Window {
}),
);
window.present();
self.imp().authorization_window.replace(Some(window));
}
}