From 725ee2bdb99fd071c9ec99b4e107a6dd102cd69a Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Sat, 22 Aug 2026 07:53:02 +0300 Subject: [PATCH] Moved check of self-destruct timer options to icon column in menu. --- Telegram/SourceFiles/boxes/send_files_box.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Telegram/SourceFiles/boxes/send_files_box.cpp b/Telegram/SourceFiles/boxes/send_files_box.cpp index d7a7f1a3e7..b8c4fa6577 100644 --- a/Telegram/SourceFiles/boxes/send_files_box.cpp +++ b/Telegram/SourceFiles/boxes/send_files_box.cpp @@ -77,6 +77,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "styles/style_chat_helpers.h" #include "styles/style_layers.h" #include "styles/style_settings.h" +#include "styles/style_media_player.h" #include "styles/style_menu_icons.h" #include @@ -1706,12 +1707,12 @@ void SendFilesBox::pushBlock(int from, int till) { }); }; const auto add = [&](const QString &label, crl::time value) { - Menu::AddCheckedAction( - submenu.get(), + submenu->addAction( label, [=] { choose(value); }, - nullptr, - (current == value)); + ((current == value) + ? &st::mediaPlayerMenuCheck + : nullptr)); }; add(tr::lng_ttl_period_once(tr::now), Data::kTimeToLiveSingleView); add(tr::lng_seconds(tr::now, lt_count, 3), 3); @@ -1752,8 +1753,7 @@ void SendFilesBox::pushBlock(int from, int till) { }); })); }); - Menu::AddCheckedAction( - submenu.get(), + submenu->addAction( (custom ? tr::lng_ttl_period_custom_value( tr::now, @@ -1761,8 +1761,7 @@ void SendFilesBox::pushBlock(int from, int till) { tr::lng_seconds_tiny(tr::now, lt_count, current)) : tr::lng_ttl_period_custom(tr::now)), chooseCustom, - nullptr, - custom); + (custom ? &st::mediaPlayerMenuCheck : nullptr)); submenu->addSeparator(); submenu->addAction(base::make_unique_q( submenu->menu(),