2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-01 23:25:15 +00:00

Always start with QR-code login.

This commit is contained in:
John Preston
2021-08-30 20:01:39 +03:00
parent 52a6282eb9
commit ae40ea9336
3 changed files with 20 additions and 50 deletions

View File

@@ -238,17 +238,9 @@ void Controller::clearPasscodeLock() {
}
void Controller::setupIntro() {
const auto parent = Core::App().domain().maybeLastOrSomeAuthedAccount();
if (!parent) {
_widget.setupIntro(Intro::EnterPoint::Start);
return;
}
const auto qrLogin = parent->appConfig().get<QString>(
"qr_login_code",
"[not-set]");
DEBUG_LOG(("qr_login_code in setup: %1").arg(qrLogin));
const auto qr = (qrLogin == "primary");
_widget.setupIntro(qr ? Intro::EnterPoint::Qr : Intro::EnterPoint::Phone);
_widget.setupIntro(Core::App().domain().maybeLastOrSomeAuthedAccount()
? Intro::EnterPoint::Qr
: Intro::EnterPoint::Start);
}
void Controller::setupMain() {