diff --git a/data/com.ranfdev.Notify.desktop.in.in b/data/com.ranfdev.Notify.desktop.in.in index 3b53721..2256589 100644 --- a/data/com.ranfdev.Notify.desktop.in.in +++ b/data/com.ranfdev.Notify.desktop.in.in @@ -11,4 +11,4 @@ Keywords=Gnome;GTK;ntfy; Icon=@icon@ StartupNotify=true X-GNOME-UsesNotifications=true -X-Purism-FormFactor=Workstation;Mobile +X-Purism-FormFactor=Workstation;Mobile; diff --git a/src/widgets/message_row.rs b/src/widgets/message_row.rs index e2c375f..29bfec9 100644 --- a/src/widgets/message_row.rs +++ b/src/widgets/message_row.rs @@ -2,7 +2,7 @@ use std::io::Read; use adw::prelude::*; use adw::subclass::prelude::*; -use chrono::NaiveDateTime; +use chrono::{Local, TimeZone}; use gtk::{gdk, gio, glib}; use ntfy_daemon::models; use tracing::error; @@ -50,7 +50,9 @@ impl MessageRow { let time = gtk::Label::builder() .label( - &NaiveDateTime::from_timestamp_opt(msg.time as i64, 0) + &Local + .timestamp_opt(msg.time as i64, 0) + .earliest() .map(|time| time.format("%Y-%m-%d %H:%M:%S").to_string()) .unwrap_or_default(), ) diff --git a/src/widgets/window.rs b/src/widgets/window.rs index dfa50c2..0a07487 100644 --- a/src/widgets/window.rs +++ b/src/widgets/window.rs @@ -316,7 +316,7 @@ impl NotifyWindow { }); let this = self.clone(); - imp.subscription_list.connect_row_selected(move |_, _row| { + imp.subscription_list.connect_row_activated(move |_, _row| { this.selected_subscription_changed(this.selected_subscription().as_ref()); });