2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +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

@@ -3501,7 +3501,7 @@ void MainWidget::ptsApplySkippedUpdates() {
}
void MainWidget::feedDifference(const MTPVector<MTPUser> &users, const MTPVector<MTPChat> &chats, const MTPVector<MTPMessage> &msgs, const MTPVector<MTPUpdate> &other) {
App::wnd()->checkAutoLock();
AuthSession::Current().checkAutoLock();
App::feedUsers(users);
App::feedChats(chats);
feedMessageIds(other);
@@ -4167,7 +4167,7 @@ MainWidget::~MainWidget() {
void MainWidget::updateOnline(bool gotOtherOffline) {
if (this != App::main()) return;
App::wnd()->checkAutoLock();
AuthSession::Current().checkAutoLock();
bool isOnline = App::wnd()->isActive();
int updateIn = Global::OnlineUpdatePeriod();
@@ -4262,7 +4262,7 @@ void MainWidget::checkIdleFinish() {
void MainWidget::updateReceived(const mtpPrime *from, const mtpPrime *end) {
if (end <= from) return;
App::wnd()->checkAutoLock();
AuthSession::Current().checkAutoLock();
if (mtpTypeId(*from) == mtpc_new_session_created) {
try {