| 390 | } |
| 391 | |
| 392 | bool 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 | |
| 411 | void Domain::removeRedundantAccounts() { |
| 412 | Expects(started()); |
nothing calls this directly
no test coverage detected