Move away from using an event loop to access secrets

Fixes messages in room flickering and being stuck

fixes #760
relates to #770
relates to #789
This commit is contained in:
Nicolas Werner 2021-11-07 03:38:48 +01:00
parent d112d6b11f
commit 5ca1fb18bb
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
11 changed files with 267 additions and 208 deletions

View file

@ -248,7 +248,12 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par
qmlRegisterSingletonInstance("im.nheko", 1, 0, "VerificationManager", verificationManager_);
qmlRegisterSingletonType<SelfVerificationStatus>(
"im.nheko", 1, 0, "SelfVerificationStatus", [](QQmlEngine *, QJSEngine *) -> QObject * {
return new SelfVerificationStatus();
auto ptr = new SelfVerificationStatus();
QObject::connect(ChatPage::instance(),
&ChatPage::initializeEmptyViews,
ptr,
&SelfVerificationStatus::invalidate);
return ptr;
});
qRegisterMetaType<mtx::events::collections::TimelineEvents>();