Skip to content

Commit

Permalink
feat(Notifications): reload on network change if there're unread noti…
Browse files Browse the repository at this point in the history
…fications
  • Loading branch information
GeopJr committed Feb 3, 2025
1 parent feab622 commit 15f1188
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Views/Notifications.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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.main_window.is_home) {
on_refresh ();
}
}

private void settings_updated () {
Expand Down

0 comments on commit 15f1188

Please sign in to comment.