feat(ui): reduced toasts timeout from 5 to 4 seconds

This commit is contained in:
Observer KRypt0n_ 2023-03-24 16:05:42 +02:00
parent d85dab86fd
commit e24f642e83
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 3 additions and 3 deletions

View file

@ -280,7 +280,7 @@ impl SimpleComponent for FirstRunApp {
FirstRunAppMsg::Toast { title, description } => unsafe {
let toast = adw::Toast::new(&title);
toast.set_timeout(5);
toast.set_timeout(4);
if let Some(description) = description {
toast.set_button_label(Some(&tr("details")));

View file

@ -1039,7 +1039,7 @@ impl App {
pub fn toast<T: AsRef<str>>(&mut self, title: T, description: Option<T>) {
let toast = adw::Toast::new(title.as_ref());
toast.set_timeout(5);
toast.set_timeout(4);
if let Some(description) = description {
toast.set_button_label(Some(&tr("details")));

View file

@ -162,7 +162,7 @@ impl SimpleAsyncComponent for PreferencesApp {
PreferencesAppMsg::Toast { title, description } => unsafe {
let toast = adw::Toast::new(&title);
toast.set_timeout(5);
toast.set_timeout(4);
if let Some(description) = description {
toast.set_button_label(Some(&tr("details")));