mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-22 02:07:24 +00:00
Fixed incorrect state of disabled calls for account in notifications.
This commit is contained in:
parent
67079545b3
commit
56be0ef4be
@ -217,11 +217,7 @@ void Authorizations::toggleCallsDisabled(uint64 hash, bool disabled) {
|
|||||||
MTP_bool(disabled)
|
MTP_bool(disabled)
|
||||||
)).done([=] {
|
)).done([=] {
|
||||||
_toggleCallsDisabledRequests.remove(hash);
|
_toggleCallsDisabledRequests.remove(hash);
|
||||||
}).fail([=](const MTP::Error &error) {
|
}).fail([=] {
|
||||||
LOG(("API Error: toggle calls %1. Hash: %2. %3.")
|
|
||||||
.arg(disabled ? u"disabled"_q : u"enabled"_q)
|
|
||||||
.arg(hash)
|
|
||||||
.arg(error.type()));
|
|
||||||
_toggleCallsDisabledRequests.remove(hash);
|
_toggleCallsDisabledRequests.remove(hash);
|
||||||
}).send();
|
}).send();
|
||||||
_toggleCallsDisabledRequests.emplace(hash, id);
|
_toggleCallsDisabledRequests.emplace(hash, id);
|
||||||
|
@ -1086,6 +1086,8 @@ void SetupNotificationsContent(
|
|||||||
container,
|
container,
|
||||||
tr::lng_settings_notifications_calls_title());
|
tr::lng_settings_notifications_calls_title());
|
||||||
const auto authorizations = &session->api().authorizations();
|
const auto authorizations = &session->api().authorizations();
|
||||||
|
// Request valid value of calls disabled flag.
|
||||||
|
authorizations->reload();
|
||||||
const auto acceptCalls = addCheckbox(
|
const auto acceptCalls = addCheckbox(
|
||||||
tr::lng_settings_call_accept_calls(),
|
tr::lng_settings_call_accept_calls(),
|
||||||
{ &st::menuIconCallsReceive },
|
{ &st::menuIconCallsReceive },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user