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
|
|
@ -727,9 +727,12 @@ struct PowerLevelApplier
|
|||
[self = *this](const mtx::responses::EventId &, mtx::http::RequestErr e) mutable {
|
||||
if (e) {
|
||||
if (e->status_code == 429 && e->matrix_error.retry_after.count() != 0) {
|
||||
QTimer::singleShot(e->matrix_error.retry_after,
|
||||
ChatPage::instance(),
|
||||
[self = std::move(self)]() mutable { self.next(); });
|
||||
ChatPage::instance()->callFunctionOnGuiThread(
|
||||
[self = std::move(self), interval = e->matrix_error.retry_after]() {
|
||||
QTimer::singleShot(interval,
|
||||
ChatPage::instance(),
|
||||
[self = std::move(self)]() mutable { self.next(); });
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue