summary refs log tree commit diff
path: root/src/LoginPage.cpp
diff options
context:
space:
mode:
authorJoseph Donofry <joedonofry@gmail.com>2021-01-11 17:51:39 -0500
committerJoseph Donofry <joedonofry@gmail.com>2021-01-11 17:51:39 -0500
commit3ff8b3ad8c015d45a515ca381691cae43fc32a00 (patch)
treeedec1d1e7926d9c0e0beb68ca604cc6bcdc1ebf6 /src/LoginPage.cpp
parentAdd Ripple effects to qml buttons and avatar (diff)
parentMerge pull request #372 from deepbluev7/fix-pr-CI (diff)
downloadnheko-3ff8b3ad8c015d45a515ca381691cae43fc32a00.tar.xz
Merge master and fix conflicts
Diffstat (limited to 'src/LoginPage.cpp')
-rw-r--r--src/LoginPage.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/LoginPage.cpp b/src/LoginPage.cpp

index 05741cca..dba5ba51 100644 --- a/src/LoginPage.cpp +++ b/src/LoginPage.cpp
@@ -315,10 +315,14 @@ LoginPage::checkHomeserverVersion() if (err || flows.flows.empty()) emit versionOkCb(LoginMethod::Password); - if (flows.flows[0].type == mtx::user_interactive::auth_types::sso) - emit versionOkCb(LoginMethod::SSO); - else - emit versionOkCb(LoginMethod::Password); + LoginMethod loginMethod_ = LoginMethod::Password; + for (const auto &flow : flows.flows) { + if (flow.type == mtx::user_interactive::auth_types::sso) { + loginMethod_ = LoginMethod::SSO; + break; + } + } + emit versionOk(loginMethod_); }); }); }