toast_manager: fix delay, add vulkan feat
[skip ci]
This commit is contained in:
@@ -162,16 +162,15 @@ impl ToastManager {
|
||||
}
|
||||
|
||||
pub fn tick(&mut self, globals: &WguiGlobals, layout: &mut Layout) -> anyhow::Result<()> {
|
||||
if !self.needs_tick {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let mut state = self.state.borrow_mut();
|
||||
|
||||
if state.timeout > 0 {
|
||||
state.timeout -= 1;
|
||||
}
|
||||
|
||||
if !self.needs_tick {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if state.timeout == 0 {
|
||||
state.toast = None;
|
||||
state.timeout = TOAST_DURATION_TICKS;
|
||||
|
||||
Reference in New Issue
Block a user