mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Ask to unlock Telegram before saving theme.
This commit is contained in:
parent
f90fdce422
commit
cd5ef069c0
2 changed files with 5 additions and 1 deletions
|
@ -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";
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue