Merge pull request #41 from Schmiddiii/fixes

Some fixes
This commit is contained in:
ranfdev
2026-02-06 18:26:05 +01:00
committed by GitHub
3 changed files with 6 additions and 4 deletions

View File

@ -11,4 +11,4 @@ Keywords=Gnome;GTK;ntfy;
Icon=@icon@ Icon=@icon@
StartupNotify=true StartupNotify=true
X-GNOME-UsesNotifications=true X-GNOME-UsesNotifications=true
X-Purism-FormFactor=Workstation;Mobile X-Purism-FormFactor=Workstation;Mobile;

View File

@ -2,7 +2,7 @@ use std::io::Read;
use adw::prelude::*; use adw::prelude::*;
use adw::subclass::prelude::*; use adw::subclass::prelude::*;
use chrono::NaiveDateTime; use chrono::{Local, TimeZone};
use gtk::{gdk, gio, glib}; use gtk::{gdk, gio, glib};
use ntfy_daemon::models; use ntfy_daemon::models;
use tracing::error; use tracing::error;
@ -50,7 +50,9 @@ impl MessageRow {
let time = gtk::Label::builder() let time = gtk::Label::builder()
.label( .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()) .map(|time| time.format("%Y-%m-%d %H:%M:%S").to_string())
.unwrap_or_default(), .unwrap_or_default(),
) )

View File

@ -316,7 +316,7 @@ impl NotifyWindow {
}); });
let this = self.clone(); 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()); this.selected_subscription_changed(this.selected_subscription().as_ref());
}); });