| 181 | } |
| 182 | |
| 183 | void MainWindow::setupPasscodeLock() { |
| 184 | auto animated = (_main || _intro); |
| 185 | auto oldContentCache = animated ? grabForSlideAnimation() : QPixmap(); |
| 186 | _passcodeLock.create(bodyWidget(), &controller()); |
| 187 | updateControlsGeometry(); |
| 188 | |
| 189 | ui_hideSettingsAndLayer(anim::type::instant); |
| 190 | if (_main) { |
| 191 | _main->hide(); |
| 192 | } |
| 193 | if (_intro) { |
| 194 | _intro->hide(); |
| 195 | } |
| 196 | if (animated) { |
| 197 | _passcodeLock->showAnimated(std::move(oldContentCache)); |
| 198 | } else { |
| 199 | _passcodeLock->showFinished(); |
| 200 | setInnerFocus(); |
| 201 | } |
| 202 | if (const auto sessionController = controller().sessionController()) { |
| 203 | sessionController->session().attachWebView().closeAll(); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | void MainWindow::setupSetupEmailLock() { |
| 208 | auto animated = (_main || _intro || _passcodeLock); |
nothing calls this directly
no test coverage detected