2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Move passcode management from MainWindow.

Check for auto lock in AuthSession. Don't autolock while video plays.
Closes #3219
This commit is contained in:
John Preston
2017-04-15 21:48:54 +03:00
parent e3aacc8072
commit de7c886008
14 changed files with 88 additions and 52 deletions

View File

@@ -45,6 +45,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
#include "autoupdater.h"
#include "observer_peer.h"
#include "auth_session.h"
#include "messenger.h"
#include "window/notifications_manager.h"
#include "ui/effects/widget_fade_wrap.h"
#include "window/window_controller.h"
@@ -2305,7 +2306,7 @@ DialogsWidget::DialogsWidget(QWidget *parent, gsl::not_null<Window::Controller*>
subscribe(Global::RefLocalPasscodeChanged(), [this] { updateLockUnlockVisibility(); });
_lockUnlock->setClickedCallback([this] {
_lockUnlock->setIconOverride(&st::dialogsUnlockIcon, &st::dialogsUnlockIconOver);
App::wnd()->setupPasscode();
Messenger::Instance().setupPasscode();
_lockUnlock->setIconOverride(nullptr);
});
_mainMenuToggle->setClickedCallback([this] { showMainMenu(); });