Fix stopping the fallback removal timer starter

This commit is contained in:
Nicolas Werner 2022-05-14 01:56:53 +02:00
parent 0a65019242
commit a2d3990f90
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -242,6 +242,7 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QObject *parent)
this, this,
[this]() { [this]() {
QTimer::singleShot(std::chrono::minutes(5), this, &ChatPage::removeOldFallbackKey); QTimer::singleShot(std::chrono::minutes(5), this, &ChatPage::removeOldFallbackKey);
disconnect(this, &ChatPage::newSyncResponse, this, &ChatPage::startRemoveFallbackKeyTimer);
}, },
Qt::QueuedConnection); Qt::QueuedConnection);
@ -1067,7 +1068,6 @@ ChatPage::removeOldFallbackKey()
{ {
olm::client()->forget_old_fallback_key(); olm::client()->forget_old_fallback_key();
olm::mark_keys_as_published(); olm::mark_keys_as_published();
disconnect(this, &ChatPage::newSyncResponse, this, &ChatPage::removeOldFallbackKey);
} }
void void