mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Moved check of self-destruct timer options to icon column in menu.
This commit is contained in:
@@ -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 <QtCore/QMimeData>
|
||||
@@ -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<Ui::Menu::MultilineAction>(
|
||||
submenu->menu(),
|
||||
|
||||
Reference in New Issue
Block a user