mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Initial frozen accounts support.
This commit is contained in:
@@ -100,6 +100,7 @@ public:
|
||||
|
||||
[[nodiscard]] auto nonPremiumDelayedRequests() const
|
||||
-> rpl::producer<mtpRequestId>;
|
||||
[[nodiscard]] rpl::producer<> frozenErrorReceived() const;
|
||||
|
||||
void restart();
|
||||
void restart(ShiftedDcId shiftedDcId);
|
||||
@@ -286,6 +287,7 @@ private:
|
||||
Fn<void(ShiftedDcId shiftedDcId)> _sessionResetHandler;
|
||||
|
||||
rpl::event_stream<mtpRequestId> _nonPremiumDelayedRequests;
|
||||
rpl::event_stream<> _frozenErrorReceived;
|
||||
|
||||
base::Timer _checkDelayedTimer;
|
||||
|
||||
@@ -562,6 +564,10 @@ auto Instance::Private::nonPremiumDelayedRequests() const
|
||||
return _nonPremiumDelayedRequests.events();
|
||||
}
|
||||
|
||||
rpl::producer<> Instance::Private::frozenErrorReceived() const {
|
||||
return _frozenErrorReceived.events();
|
||||
}
|
||||
|
||||
void Instance::Private::requestConfigIfOld() {
|
||||
const auto timeout = _config->values().blockedMode
|
||||
? kConfigBecomesOldForBlockedIn
|
||||
@@ -1593,6 +1599,8 @@ bool Instance::Private::onErrorDefault(
|
||||
return true;
|
||||
} else if (type == u"CONNECTION_LANG_CODE_INVALID"_q) {
|
||||
Lang::CurrentCloudManager().resetToDefault();
|
||||
} else if (type == u"FROZEN_METHOD_INVALID"_q) {
|
||||
_frozenErrorReceived.fire({});
|
||||
}
|
||||
if (badGuestDc) _badGuestDcRequests.erase(requestId);
|
||||
return false;
|
||||
@@ -1920,6 +1928,10 @@ rpl::producer<mtpRequestId> Instance::nonPremiumDelayedRequests() const {
|
||||
return _private->nonPremiumDelayedRequests();
|
||||
}
|
||||
|
||||
rpl::producer<> Instance::frozenErrorReceived() const {
|
||||
return _private->frozenErrorReceived();
|
||||
}
|
||||
|
||||
void Instance::requestConfigIfOld() {
|
||||
_private->requestConfigIfOld();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user