From 8c50938093cebbad9b746e5fee908af5fba99b2e Mon Sep 17 00:00:00 2001 From: Evan Paterakis Date: Mon, 3 Feb 2025 21:56:55 +0200 Subject: [PATCH] feat(Notifications): reload on network change if there're unread notifications --- src/Views/Notifications.vala | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Views/Notifications.vala b/src/Views/Notifications.vala index 0829f6cea..5c8641569 100644 --- a/src/Views/Notifications.vala +++ b/src/Views/Notifications.vala @@ -70,6 +70,14 @@ public class Tuba.Views.Notifications : Views.Timeline, AccountHolder, Streamabl settings.notify["dim-trivial-notifications"].connect (settings_updated); settings_updated (); + + app.notify["is-online"].connect (on_network_change); + } + + private void on_network_change () { + if (app.is_online && account != null && account.unread_count > 0) { + app.refresh (); + } } private void settings_updated () {