From fd2fac203d3ffd8770c2ed60dedbd7b0777e0e32 Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Fri, 27 Mar 2026 18:20:03 +0100 Subject: Restore notification dismissal --- .../mastodonnotificationssyncadaptor.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h') diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h index 4c667fa..0e9106c 100644 --- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h +++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h @@ -57,9 +57,11 @@ private: struct PendingSyncState { QString accessToken; + bool markerKnown = false; QString unreadFloorId; QString lastFetchedId; QString maxFetchedId; + QSet unreadNotificationIds; QHash pendingNotifications; }; @@ -80,13 +82,20 @@ private: Notification *findNotification(int accountId, const QString ¬ificationId); void closeAccountNotifications(int accountId, const QSet &keepNotificationIds = QSet()); static QString notificationObjectKey(int accountId, const QString ¬ificationId); + void maybeMarkAccountNotificationsRead(int accountId, + const QString &accessToken, + Notification *ignoredNotification = 0); + void markReadFromNotification(Notification *notification); + void removeCachedNotification(Notification *notification); private Q_SLOTS: void finishedUnreadMarkerHandler(); void finishedNotificationsHandler(); void finishedMarkReadHandler(); + void notificationClosedWithReason(uint reason); private: + QHash m_accessTokens; QHash m_pendingSyncStates; QHash m_lastMarkedReadIds; QHash m_notificationObjects; -- cgit v1.2.3