2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Allow boxes that don't hide by escape / click.

This commit is contained in:
John Preston
2018-06-06 14:51:27 +03:00
parent e47d110f28
commit 16f3ca87f5
5 changed files with 46 additions and 5 deletions

View File

@@ -659,10 +659,14 @@ void Messenger::forceLogOut(const TextWithEntities &explanation) {
const auto box = Ui::show(Box<InformBox>(
explanation,
lang(lng_passcode_logout)));
box->setCloseByEscape(false);
box->setCloseByOutsideClick(false);
connect(box, &QObject::destroyed, [=] {
InvokeQueued(this, [=] {
resetAuthorizationKeys();
loggedOut();
crl::on_main(this, [=] {
if (AuthSession::Exists()) {
resetAuthorizationKeys();
loggedOut();
}
});
});
}