From 51e80170e226aa6adfe66d7f5dcc3273e7407465 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 30 Sep 2021 19:37:42 +0400 Subject: [PATCH] Always clear passcode lock widget on reset. Fixes #17016. --- Telegram/SourceFiles/main/main_domain.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/main/main_domain.cpp b/Telegram/SourceFiles/main/main_domain.cpp index 055f3873e..60d50a4a8 100644 --- a/Telegram/SourceFiles/main/main_domain.cpp +++ b/Telegram/SourceFiles/main/main_domain.cpp @@ -340,11 +340,14 @@ bool Domain::removePasscodeIfEmpty() { return false; } Local::reset(); + + // We completely logged out, remove the passcode if it was there. + if (Core::App().passcodeLocked()) { + Core::App().unlockPasscode(); + } if (!_local->hasLocalPasscode()) { return false; } - // We completely logged out, remove the passcode if it was there. - Core::App().unlockPasscode(); _local->setPasscode(QByteArray()); return true; }