MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / removePasscodeIfEmpty

Method removePasscodeIfEmpty

Telegram/SourceFiles/main/main_domain.cpp:392–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390}
391
392bool Domain::removePasscodeIfEmpty() {
393 if (_accounts.size() != 1 || _active.current()->sessionExists()) {
394 return false;
395 }
396 Local::reset();
397
398 // We completely logged out, remove the passcode if it was there.
399 if (Core::App().passcodeLocked()) {
400 Core::App().unlockPasscode();
401 }
402 if (!_local->hasLocalPasscode()) {
403 return false;
404 }
405 _local->setPasscode(QByteArray());
406 Core::App().settings().setSystemUnlockEnabled(false);
407 Core::App().saveSettingsDelayed();
408 return true;
409}
410
411void Domain::removeRedundantAccounts() {
412 Expects(started());

Callers

nothing calls this directly

Calls 13

resetFunction · 0.85
AppClass · 0.85
QByteArrayClass · 0.85
sessionExistsMethod · 0.80
passcodeLockedMethod · 0.80
unlockPasscodeMethod · 0.80
hasLocalPasscodeMethod · 0.80
setPasscodeMethod · 0.80
settingsMethod · 0.80
sizeMethod · 0.45
currentMethod · 0.45

Tested by

no test coverage detected