don't re-hide when a request comes in while showing approval screen
This commit is contained in:
@ -67,12 +67,13 @@ impl Handler {
|
||||
// only hide the window if a) it was hidden to start with
|
||||
// and b) there are no other pending requests
|
||||
let state = self.app.state::<AppState>();
|
||||
let delay = {
|
||||
let config = state.config.read().unwrap();
|
||||
Duration::from_millis(config.rehide_ms)
|
||||
};
|
||||
sleep(delay).await;
|
||||
|
||||
if !starting_visibility && state.req_count() == 0 {
|
||||
let delay = {
|
||||
let config = state.config.read().unwrap();
|
||||
Duration::from_millis(config.rehide_ms)
|
||||
};
|
||||
sleep(delay).await;
|
||||
let window = self.app.get_window("main").ok_or(RequestError::NoMainWindow)?;
|
||||
window.hide()?;
|
||||
}
|
||||
|
Reference in New Issue
Block a user