summaryrefslogtreecommitdiff
path: root/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jolla.com>2026-03-27 18:20:03 +0100
committerAndrew Branson <andrew.branson@jolla.com>2026-03-27 18:20:03 +0100
commitfd2fac203d3ffd8770c2ed60dedbd7b0777e0e32 (patch)
tree2ee6b34e53338e44fe91902c8786a869f77bc29f /buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h
parent2b1a3046832074e47ad2ad703cd518526b9fb459 (diff)
Restore notification dismissalHEADmaster
Diffstat (limited to 'buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h')
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h9
1 files changed, 9 insertions, 0 deletions
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<QString> unreadNotificationIds;
QHash<QString, PendingNotification> pendingNotifications;
};
@@ -80,13 +82,20 @@ private:
Notification *findNotification(int accountId, const QString &notificationId);
void closeAccountNotifications(int accountId, const QSet<QString> &keepNotificationIds = QSet<QString>());
static QString notificationObjectKey(int accountId, const QString &notificationId);
+ 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<int, QString> m_accessTokens;
QHash<int, PendingSyncState> m_pendingSyncStates;
QHash<int, QString> m_lastMarkedReadIds;
QHash<QString, Notification *> m_notificationObjects;