summaryrefslogtreecommitdiff
path: root/buteo-plugins
diff options
context:
space:
mode:
Diffstat (limited to 'buteo-plugins')
-rw-r--r--buteo-plugins/buteo-sync-plugin-mastodon-posts/mastodonpostssyncadaptor.cpp8
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);
}