diff --git a/Telegram/Resources/langs/lang.strings b/Telegram/Resources/langs/lang.strings index 0cb98f9c1..1d79e1058 100644 --- a/Telegram/Resources/langs/lang.strings +++ b/Telegram/Resources/langs/lang.strings @@ -1613,6 +1613,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL "lng_theme_editor_error" = "The editor encountered an error :( See 'log.txt' for details."; "lng_theme_editor_sure_close" = "Are you sure you want to close the editor? Your changes won't be saved."; "lng_theme_editor_need_auth" = "You need to log in to save your theme."; +"lng_theme_editor_need_unlock" = "You need to unlock Telegram to save your theme."; "lng_theme_editor_done" = "Theme exported successfully!"; "lng_theme_editor_title" = "Edit color palette"; "lng_theme_editor_export_button" = "Export theme"; diff --git a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp index af32d5724..851d691ed 100644 --- a/Telegram/SourceFiles/window/themes/window_theme_editor.cpp +++ b/Telegram/SourceFiles/window/themes/window_theme_editor.cpp @@ -739,7 +739,10 @@ QByteArray Editor::ColorizeInContent( } void Editor::save() { - if (!_window->account().sessionExists()) { + if (Core::App().passcodeLocked()) { + Ui::Toast::Show(tr::lng_theme_editor_need_unlock(tr::now)); + return; + } else if (!_window->account().sessionExists()) { Ui::Toast::Show(tr::lng_theme_editor_need_auth(tr::now)); return; } else if (_saving) {