requesting unlock before toggle notifications from tray

This commit is contained in:
John Preston 2015-10-17 20:30:55 +02:00
parent e211268158
commit 90776073e7
2 changed files with 6 additions and 0 deletions

View File

@ -302,6 +302,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org
"lng_passcode_enter" = "Enter your local passcode";
"lng_passcode_submit" = "Submit";
"lng_passcode_logout" = "Log out";
"lng_passcode_need_unblock" = "You need to unlock me first.";
"lng_cloud_password_waiting" = "Confirmation link sent to {email}..";
"lng_cloud_password_change" = "Change cloud password";

View File

@ -1182,6 +1182,11 @@ void Window::toggleTray(QSystemTrayIcon::ActivationReason reason) {
}
void Window::toggleDisplayNotifyFromTray() {
if (App::passcoded()) {
if (!isActive()) showFromTray();
showLayer(new InformBox(lang(lng_passcode_need_unblock)));
return;
}
cSetDesktopNotify(!cDesktopNotify());
if (settings) {
settings->updateDisplayNotify();