summaryrefslogtreecommitdiff
path: root/transferengine-plugins/mastodonshareservicestatus.cpp
diff options
context:
space:
mode:
authorAndrew Branson <andrew.branson@jolla.com>2026-03-09 09:43:54 +0100
committerAndrew Branson <andrew.branson@jolla.com>2026-03-16 08:59:18 +0100
commitf87acb5add85ab8d8137dcb33078d088b67d1f02 (patch)
tree6e453d493bf53affa9529e3a6b6a418cd4cc1fad /transferengine-plugins/mastodonshareservicestatus.cpp
parent09a2477c14376e99bc15e53947b33f2f5233cadb (diff)
Fix Mastodon sync and transfer reliability edge cases
Diffstat (limited to 'transferengine-plugins/mastodonshareservicestatus.cpp')
-rw-r--r--transferengine-plugins/mastodonshareservicestatus.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/transferengine-plugins/mastodonshareservicestatus.cpp b/transferengine-plugins/mastodonshareservicestatus.cpp
index f3c96ca..3ac05d5 100644
--- a/transferengine-plugins/mastodonshareservicestatus.cpp
+++ b/transferengine-plugins/mastodonshareservicestatus.cpp
@@ -186,7 +186,7 @@ void MastodonShareServiceStatus::queryStatus(QueryStatusMode mode)
bool signInActive = false;
Q_FOREACH (Accounts::AccountId id, m_accountManager->accountList()) {
- Accounts::Account *acc = m_accountManager->account(id);
+ Accounts::Account *acc = Accounts::Account::fromId(m_accountManager, id, this);
if (!acc) {
qWarning() << Q_FUNC_INFO << "Failed to get account for id:" << id;
@@ -206,6 +206,7 @@ void MastodonShareServiceStatus::queryStatus(QueryStatusMode mode)
}
if (!service.isValid() || !serviceFound) {
+ acc->deleteLater();
continue;
}
@@ -214,12 +215,14 @@ void MastodonShareServiceStatus::queryStatus(QueryStatusMode mode)
const bool shareServiceEnabled = acc->enabled();
if (!accountEnabled || !shareServiceEnabled) {
acc->selectService(Accounts::Service());
+ acc->deleteLater();
continue;
}
if (acc->value(QStringLiteral("CredentialsNeedUpdate")).toBool()) {
qWarning() << Q_FUNC_INFO << "Credentials need update for account id:" << id;
acc->selectService(Accounts::Service());
+ acc->deleteLater();
continue;
}
@@ -256,6 +259,7 @@ void MastodonShareServiceStatus::queryStatus(QueryStatusMode mode)
}
acc->selectService(Accounts::Service());
+ acc->deleteLater();
}
if (!signInActive) {