Update spaces events automatically in the background
This commit is contained in:
parent
9891b6bffe
commit
234ac79acc
7 changed files with 246 additions and 5 deletions
|
|
@ -95,6 +95,12 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QObject *parent)
|
|||
return;
|
||||
}
|
||||
|
||||
// only update spaces every 20 minutes
|
||||
if (lastSpacesUpdate < QDateTime::currentDateTime().addSecs(-20 * 60)) {
|
||||
lastSpacesUpdate = QDateTime::currentDateTime();
|
||||
utils::updateSpaceVias();
|
||||
}
|
||||
|
||||
if (!isConnected_)
|
||||
emit connectionRestored();
|
||||
});
|
||||
|
|
@ -380,6 +386,13 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QObject *parent)
|
|||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connect(
|
||||
this,
|
||||
&ChatPage::callFunctionOnGuiThread,
|
||||
this,
|
||||
[](std::function<void()> f) { f(); },
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connectCallMessage<mtx::events::voip::CallInvite>();
|
||||
connectCallMessage<mtx::events::voip::CallCandidates>();
|
||||
connectCallMessage<mtx::events::voip::CallAnswer>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue