Skip to content

Commit 85979e8

Browse files
authored
Merge pull request #41 from Schmiddiii/fixes
Some fixes
2 parents 3a4acc2 + 7f0deab commit 85979e8

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

data/com.ranfdev.Notify.desktop.in.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ Keywords=Gnome;GTK;ntfy;
1111
Icon=@icon@
1212
StartupNotify=true
1313
X-GNOME-UsesNotifications=true
14-
X-Purism-FormFactor=Workstation;Mobile
14+
X-Purism-FormFactor=Workstation;Mobile;

src/widgets/message_row.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::io::Read;
22

33
use adw::prelude::*;
44
use adw::subclass::prelude::*;
5-
use chrono::NaiveDateTime;
5+
use chrono::{Local, TimeZone};
66
use gtk::{gdk, gio, glib};
77
use ntfy_daemon::models;
88
use tracing::error;
@@ -50,7 +50,9 @@ impl MessageRow {
5050

5151
let time = gtk::Label::builder()
5252
.label(
53-
&NaiveDateTime::from_timestamp_opt(msg.time as i64, 0)
53+
&Local
54+
.timestamp_opt(msg.time as i64, 0)
55+
.earliest()
5456
.map(|time| time.format("%Y-%m-%d %H:%M:%S").to_string())
5557
.unwrap_or_default(),
5658
)

src/widgets/window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ impl NotifyWindow {
316316
});
317317

318318
let this = self.clone();
319-
imp.subscription_list.connect_row_selected(move |_, _row| {
319+
imp.subscription_list.connect_row_activated(move |_, _row| {
320320
this.selected_subscription_changed(this.selected_subscription().as_ref());
321321
});
322322

0 commit comments

Comments
 (0)