diff options
| author | Andrew Branson <andrew.branson@jolla.com> | 2026-02-12 12:34:14 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@jolla.com> | 2026-02-12 15:05:57 +0100 |
| commit | bce74e963abeb96a9c335f5461611dee544abc4c (patch) | |
| tree | ca584a97f1094212c79942702c6b96f6c66029c0 /buteo-plugins | |
| parent | 6ec21cf79e0103b874086089673800bd32fc6bea (diff) | |
Enhance Mastodon post actions and metadata handling for reblogs and favourites
Diffstat (limited to 'buteo-plugins')
| -rw-r--r-- | buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp index 6165931..deddb0a 100644 --- a/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp +++ b/buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp @@ -98,6 +98,8 @@ void MastodonPostsSyncAdaptor::purgeDataForOldAccount(int oldId, SocialNetworkSy m_db.removePosts(oldId); m_db.commit(); m_db.wait(); + m_db.refresh(); + m_db.wait(); purgeCachedImages(&m_imageCacheDb, oldId); } @@ -114,6 +116,8 @@ void MastodonPostsSyncAdaptor::finalize(int accountId) } else { m_db.commit(); m_db.wait(); + m_db.refresh(); + m_db.wait(); purgeExpiredImages(&m_imageCacheDb, accountId); } } @@ -273,6 +277,8 @@ void MastodonPostsSyncAdaptor::finishedPostsHandler() const int repliesCount = postObject.value(QStringLiteral("replies_count")).toInt(); const int favouritesCount = postObject.value(QStringLiteral("favourites_count")).toInt(); const int reblogsCount = postObject.value(QStringLiteral("reblogs_count")).toInt(); + const bool favourited = postObject.value(QStringLiteral("favourited")).toBool(); + const bool reblogged = postObject.value(QStringLiteral("reblogged")).toBool(); QList<QPair<QString, SocialPostImage::ImageType> > imageList; const QJsonArray mediaAttachments = postObject.value(QStringLiteral("media_attachments")).toArray(); @@ -310,6 +316,8 @@ void MastodonPostsSyncAdaptor::finishedPostsHandler() repliesCount, favouritesCount, reblogsCount, + favourited, + reblogged, apiHost(accountId), accountId); } |
