query notifications on load posts

closes sk22#471
This commit is contained in:
sk
2023-03-21 10:22:09 +01:00
parent 58b000927a
commit e58aeec097
2 changed files with 4 additions and 3 deletions

View File

@@ -298,9 +298,6 @@ public class HomeFragment extends AppKitFragment implements OnBackPressedListene
try { try {
long newestId = Long.parseLong(notifications.get(0).id); long newestId = Long.parseLong(notifications.get(0).id);
long lastSeenId = Long.parseLong(session.markers.notifications.lastReadId); long lastSeenId = Long.parseLong(session.markers.notifications.lastReadId);
System.out.println("NEWEST: " + newestId);
System.out.println("LAST SEEN: " + lastSeenId);
setNotificationBadge(newestId > lastSeenId); setNotificationBadge(newestId > lastSeenId);
} catch (Exception ignored) { } catch (Exception ignored) {
setNotificationBadge(false); setNotificationBadge(false);

View File

@@ -166,6 +166,10 @@ public class HomeTimelineFragment extends StatusListFragment {
} }
}) })
.exec(accountID); .exec(accountID);
if (parent.getParentFragment() instanceof HomeFragment homeFragment) {
homeFragment.updateNotificationBadge();
}
} }
@Override @Override