From c5add2fca93a387992727dba5cf1a1a86858cd78 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 14 Oct 2024 06:22:30 +0300 Subject: [PATCH] Revert "Added experimental option to disable floating reactions strip." This reverts commit a32a9aa3fcbb0adb724101ff5d233f1ef2a04b41. --- .../reactions/history_view_reactions_button.cpp | 13 ------------- .../view/reactions/history_view_reactions_button.h | 2 -- .../SourceFiles/settings/settings_experimental.cpp | 2 -- Telegram/SourceFiles/window/main_window.cpp | 3 +-- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp index eee39b863..9f2759f36 100644 --- a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp +++ b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.cpp @@ -22,7 +22,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "core/click_handler_types.h" #include "main/main_session.h" #include "base/event_filter.h" -#include "base/options.h" #include "styles/style_chat.h" #include "styles/style_chat_helpers.h" #include "styles/style_menu_icons.h" @@ -60,15 +59,8 @@ constexpr auto kRefreshListDelay = crl::time(100); return CountMaxSizeWithMargins(st::reactionCornerShadow); } -base::options::toggle OptionDisableFloatReactions({ - .id = kOptionDisableFloatReactions, - .name = "Disable floating reactions strip", -}); - } // namespace -const char kOptionDisableFloatReactions[] = "disable-float-reactions"; - Button::Button( Fn update, ButtonParameters parameters, @@ -453,11 +445,6 @@ void Manager::showButtonDelayed() { void Manager::applyList(const Data::PossibleItemReactionsRef &reactions) { using Button = Strip::AddedButton; - if (OptionDisableFloatReactions.value()) { - _strip.applyList({}, Button::None); - _tagsStrip = {}; - return; - } _strip.applyList( reactions.recent, (/*reactions.customAllowed diff --git a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.h b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.h index fc15ec1bf..4a1842d99 100644 --- a/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.h +++ b/Telegram/SourceFiles/history/view/reactions/history_view_reactions_button.h @@ -38,8 +38,6 @@ class Session; namespace HistoryView::Reactions { -extern const char kOptionDisableFloatReactions[]; - enum class ExpandDirection { Up, Down, diff --git a/Telegram/SourceFiles/settings/settings_experimental.cpp b/Telegram/SourceFiles/settings/settings_experimental.cpp index 78711a7fa..983497e8a 100644 --- a/Telegram/SourceFiles/settings/settings_experimental.cpp +++ b/Telegram/SourceFiles/settings/settings_experimental.cpp @@ -21,7 +21,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "chat_helpers/tabbed_panel.h" #include "dialogs/dialogs_widget.h" #include "info/profile/info_profile_actions.h" -#include "history/view/reactions/history_view_reactions_button.h" #include "lang/lang_keys.h" #include "mainwindow.h" #include "media/player/media_player_instance.h" @@ -158,7 +157,6 @@ void SetupExperimental( addToggle(Data::kOptionExternalVideoPlayer); addToggle(Window::kOptionNewWindowsSizeAsFirst); addToggle(Window::kOptionDisableTouchbar); - addToggle(HistoryView::Reactions::kOptionDisableFloatReactions); } } // namespace diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp index 1b773fd02..208ed561c 100644 --- a/Telegram/SourceFiles/window/main_window.cpp +++ b/Telegram/SourceFiles/window/main_window.cpp @@ -76,8 +76,7 @@ base::options::toggle OptionNewWindowsSizeAsFirst({ base::options::toggle OptionDisableTouchbar({ .id = kOptionDisableTouchbar, - .name = "Disable Touch Bar.", - .description = "macOS only", + .name = "Disable Touch Bar (macOS only).", .scope = [] { #ifdef Q_OS_MAC return true;