diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index c108edd1b..542f5b033 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -177,11 +177,6 @@ TopBarWidget::TopBarWidget( } }, lifetime()); - session().serverConfig().phoneCallsEnabled.changes( - ) | rpl::start_with_next([=] { - updateControlsVisibility(); - }, lifetime()); - rpl::combine( Core::App().settings().thirdSectionInfoEnabledValue(), Core::App().settings().tabbedReplacedWithInfoValue() diff --git a/Telegram/SourceFiles/info/info_wrap_widget.cpp b/Telegram/SourceFiles/info/info_wrap_widget.cpp index 5e4d829e7..0786c12b2 100644 --- a/Telegram/SourceFiles/info/info_wrap_widget.cpp +++ b/Telegram/SourceFiles/info/info_wrap_widget.cpp @@ -430,9 +430,7 @@ void WrapWidget::addProfileCallsButton() { const auto peer = key().peer(); const auto user = peer ? peer->asUser() : nullptr; - if (!user - || user->sharedMediaInfo() - || !user->session().serverConfig().phoneCallsEnabled.current()) { + if (!user || user->sharedMediaInfo()) { return; } diff --git a/Telegram/SourceFiles/mtproto/mtproto_config.cpp b/Telegram/SourceFiles/mtproto/mtproto_config.cpp index 7d8a05077..5b6c6c466 100644 --- a/Telegram/SourceFiles/mtproto/mtproto_config.cpp +++ b/Telegram/SourceFiles/mtproto/mtproto_config.cpp @@ -75,7 +75,7 @@ QByteArray Config::serialize() const { << qint32(_fields.callPacketTimeoutMs) << qint32(_fields.webFileDcId) << _fields.txtDomainString - << qint32(_fields.phoneCallsEnabled.current() ? 1 : 0) + << qint32(1) // legacy phoneCallsEnabled << qint32(_fields.blockedMode ? 1 : 0) << qint32(_fields.captionLengthMax); } @@ -109,6 +109,7 @@ std::unique_ptr Config::FromSerialized(const QByteArray &serialized) { } auto dcOptionsSerialized = QByteArray(); + auto legacyPhoneCallsEnabled = rpl::variable(); const auto read = [&](auto &field) { using Type = std::remove_reference_t; if constexpr (std::is_same_v @@ -157,7 +158,7 @@ std::unique_ptr Config::FromSerialized(const QByteArray &serialized) { read(raw->_fields.callPacketTimeoutMs); read(raw->_fields.webFileDcId); read(raw->_fields.txtDomainString); - read(raw->_fields.phoneCallsEnabled); + read(legacyPhoneCallsEnabled); read(raw->_fields.blockedMode); read(raw->_fields.captionLengthMax); @@ -217,7 +218,6 @@ void Config::apply(const MTPDconfig &data) { _fields.callRingTimeoutMs = data.vcall_ring_timeout_ms().v; _fields.callConnectTimeoutMs = data.vcall_connect_timeout_ms().v; _fields.callPacketTimeoutMs = data.vcall_packet_timeout_ms().v; - _fields.phoneCallsEnabled = data.is_phonecalls_enabled(); _fields.blockedMode = data.is_blocked_mode(); _fields.captionLengthMax = data.vcaption_length_max().v; diff --git a/Telegram/SourceFiles/mtproto/mtproto_config.h b/Telegram/SourceFiles/mtproto/mtproto_config.h index 6df4dd9c7..880db2a97 100644 --- a/Telegram/SourceFiles/mtproto/mtproto_config.h +++ b/Telegram/SourceFiles/mtproto/mtproto_config.h @@ -39,7 +39,6 @@ struct ConfigFields { int callPacketTimeoutMs = 10000; int webFileDcId = 4; QString txtDomainString; - rpl::variable phoneCallsEnabled = true; bool blockedMode = false; int captionLengthMax = 1024; }; diff --git a/Telegram/SourceFiles/window/window_main_menu.cpp b/Telegram/SourceFiles/window/window_main_menu.cpp index 398e478bc..8fe51327c 100644 --- a/Telegram/SourceFiles/window/window_main_menu.cpp +++ b/Telegram/SourceFiles/window/window_main_menu.cpp @@ -678,11 +678,6 @@ MainMenu::MainMenu( updatePhone(); }, lifetime()); - _controller->session().serverConfig().phoneCallsEnabled.changes( - ) | rpl::start_with_next([=] { - refreshMenu(); - }, lifetime()); - using Window::Theme::BackgroundUpdate; Window::Theme::Background()->updates( ) | rpl::start_with_next([=](const BackgroundUpdate &update) {