mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Forbid auto-night mode with theme editor.
This commit is contained in:
@@ -880,6 +880,11 @@ void MainMenu::refreshMenu() {
|
||||
|
||||
_nightThemeAction = std::make_shared<QPointer<QAction>>();
|
||||
auto action = _menu->addAction(tr::lng_menu_night_mode(tr::now), [=] {
|
||||
if (Window::Theme::Background()->editingTheme()) {
|
||||
Ui::show(Box<InformBox>(
|
||||
tr::lng_theme_editor_cant_change_theme(tr::now)));
|
||||
return;
|
||||
}
|
||||
const auto weak = MakeWeak(this);
|
||||
const auto toggle = [=] {
|
||||
if (!weak) {
|
||||
|
Reference in New Issue
Block a user