feat: make notifications disappear after 5 seconds from last action

This commit is contained in:
Denis Benato
2026-01-24 21:10:44 +01:00
parent 1d10f99e77
commit bcdbc45931
2 changed files with 47 additions and 6 deletions

View File

@@ -43,6 +43,13 @@ export component MainWindow inherits Window {
toast = text != "";
toast_text = text;
}
callback clear_toast_if_matches(string);
clear_toast_if_matches(text) => {
if (toast && toast_text == text) {
toast = false;
toast_text = "";
}
}
callback exit-app();
callback show_notification(bool);
show_notification(yes) => {