From d8ff92c1baf2c9714f21729e7d37c66f59c162ff Mon Sep 17 00:00:00 2001 From: Andrew Branson Date: Wed, 11 Feb 2026 10:05:38 +0100 Subject: Fix notification fetching - don't change server unread, just record our last seen --- .../mastodonnotificationssyncadaptor.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (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 0cd63a4..9711549 100644 --- a/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h +++ b/buteo-plugins/buteo-sync-plugin-mastodon-notifications/mastodonnotificationssyncadaptor.h @@ -56,13 +56,17 @@ private: struct PendingSyncState { QString accessToken; - QString minReadId; + QString unreadFloorId; + QString lastFetchedId; + QString maxFetchedId; QHash pendingNotifications; }; static QString sanitizeContent(const QString &content); static QDateTime parseTimestamp(const QString ×tampString); static int compareNotificationIds(const QString &left, const QString &right); + QString loadLastFetchedId(int accountId) const; + void saveLastFetchedId(int accountId, const QString &lastFetchedId); void requestUnreadMarker(int accountId, const QString &accessToken); void requestNotifications(int accountId, @@ -75,17 +79,14 @@ 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 markReadFromNotification(Notification *notification); private Q_SLOTS: void finishedUnreadMarkerHandler(); void finishedNotificationsHandler(); void finishedMarkReadHandler(); - void notificationClosedWithReason(uint reason); private: QHash m_pendingSyncStates; - QHash m_accessTokens; QHash m_lastMarkedReadIds; QHash m_notificationObjects; }; -- cgit v1.2.3