From 628a02d99cf4aa21e09d26ad0635fce8b6acb2ac Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 6 Dec 2020 19:13:18 +0400 Subject: [PATCH] Hide push to talk release delay option by default. --- .../SourceFiles/calls/calls_group_call.cpp | 9 +- .../calls/calls_group_settings.cpp | 100 ++++++++++-------- Telegram/lib_base | 2 +- 3 files changed, 56 insertions(+), 55 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_group_call.cpp b/Telegram/SourceFiles/calls/calls_group_call.cpp index b90eef418b..6082a01507 100644 --- a/Telegram/SourceFiles/calls/calls_group_call.cpp +++ b/Telegram/SourceFiles/calls/calls_group_call.cpp @@ -746,13 +746,8 @@ auto GroupCall::ensureGlobalShortcutManager() void GroupCall::applyGlobalShortcutChanges() { auto &settings = Core::App().settings(); - if (!settings.groupCallPushToTalk()) { - _shortcutManager = nullptr; - _pushToTalk = nullptr; - return; - } else if (settings.groupCallPushToTalkShortcut().isEmpty()) { - settings.setGroupCallPushToTalk(false); - Core::App().saveSettingsDelayed(); + if (!settings.groupCallPushToTalk() + || settings.groupCallPushToTalkShortcut().isEmpty()) { _shortcutManager = nullptr; _pushToTalk = nullptr; return; diff --git a/Telegram/SourceFiles/calls/calls_group_settings.cpp b/Telegram/SourceFiles/calls/calls_group_settings.cpp index 4b993c0091..15e3fb3cb1 100644 --- a/Telegram/SourceFiles/calls/calls_group_settings.cpp +++ b/Telegram/SourceFiles/calls/calls_group_settings.cpp @@ -200,38 +200,25 @@ void GroupCallSettingsBox( tr::lng_group_call_push_to_talk(), st::groupCallSettingsButton )->toggleOn(rpl::single(settings.groupCallPushToTalk())); - const auto recordingWrap = layout->add( - object_ptr>( + const auto pushToTalkWrap = layout->add( + object_ptr>( layout, - object_ptr