diff options
| author | Andrew Branson <andrew.branson@jolla.com> | 2026-03-09 09:43:54 +0100 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@jolla.com> | 2026-03-09 09:43:54 +0100 |
| commit | 9182ffb1573c77367ad6b5e4b1f3e4f52b3c3ea4 (patch) | |
| tree | 89f7c1e3019073354e254a23576d5b1f3573a959 /transferengine-plugins/mastodonshareservicestatus.cpp | |
| parent | b21179732f7dcaea8fcff389f02caae0bc1535f1 (diff) | |
Fix Mastodon sync and transfer reliability edge cases
Diffstat (limited to 'transferengine-plugins/mastodonshareservicestatus.cpp')
| -rw-r--r-- | transferengine-plugins/mastodonshareservicestatus.cpp | 6 |
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) { |
