mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2025-03-15 06:28:27 +03:00
fix: fixed session applying on each launcher start
This commit is contained in:
parent
9072ad8728
commit
a58bd18a79
2 changed files with 6 additions and 1 deletions
|
@ -31,6 +31,7 @@ pub static mut READY: bool = false;
|
|||
|
||||
// TODO: get rid of using this function in all the components' events
|
||||
// e.g. by converting preferences pages into Relm4 Components
|
||||
/// Check if the app is ready
|
||||
pub fn is_ready() -> bool {
|
||||
unsafe { READY }
|
||||
}
|
||||
|
|
|
@ -114,7 +114,11 @@ impl SimpleAsyncComponent for GameApp {
|
|||
set_title: &tr("active-sessions"),
|
||||
set_subtitle: &tr("active-session-description"),
|
||||
|
||||
connect_selected_notify[sender] => move |row| sender.input(GameAppMsg::SetCurrent(row.selected()))
|
||||
connect_selected_notify[sender] => move |row| {
|
||||
if is_ready() {
|
||||
sender.input(GameAppMsg::SetCurrent(row.selected()));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue