fix: reset timeline when a popup is created

This commit is contained in:
Ashley Wulber 2024-04-30 18:43:42 -04:00 committed by Ashley Wulber
parent c7765278f0
commit 9f51e12fc9
5 changed files with 5 additions and 0 deletions

View file

@ -310,6 +310,7 @@ impl cosmic::Application for Audio {
}
let new_id = window::Id::unique();
self.popup.replace(new_id);
self.timeline = Timeline::new();
let mut popup_settings = self.core.applet.get_popup_settings(
window::Id::MAIN,

View file

@ -238,6 +238,7 @@ impl cosmic::Application for CosmicBatteryApplet {
if let Some(tx) = &self.screen_sender {
let _ = tx.send(ScreenBacklightRequest::Get);
}
self.timeline = Timeline::new();
let new_id = window::Id::unique();
self.popup.replace(new_id);

View file

@ -118,6 +118,7 @@ impl cosmic::Application for CosmicBluetoothApplet {
// TODO request update of state maybe
let new_id = window::Id::unique();
self.popup.replace(new_id);
self.timeline = Timeline::new();
let mut popup_settings = self.core.applet.get_popup_settings(
window::Id::MAIN,

View file

@ -229,6 +229,7 @@ impl cosmic::Application for CosmicNetworkApplet {
// TODO request update of state maybe
let new_id = window::Id::unique();
self.popup.replace(new_id);
self.timeline = Timeline::new();
let mut popup_settings = self.core.applet.get_popup_settings(
window::Id::MAIN,

View file

@ -186,6 +186,7 @@ impl cosmic::Application for Notifications {
} else {
let new_id = window::Id::unique();
self.popup.replace(new_id);
self.timeline = Timeline::new();
let mut popup_settings = self.core.applet.get_popup_settings(
window::Id::MAIN,