mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 03:18:49 +03:00
Fix cancel button on registration token dialog
This commit is contained in:
parent
7d484a8228
commit
4fa644f2b7
1 changed files with 15 additions and 4 deletions
|
@ -483,10 +483,21 @@ RegisterPage::doUIA(const mtx::user_interactive::Unauthorized &unauthorized)
|
||||||
mtx::user_interactive::Auth{session, mtx::user_interactive::auth::Dummy{}});
|
mtx::user_interactive::Auth{session, mtx::user_interactive::auth::Dummy{}});
|
||||||
|
|
||||||
} else if (current_stage == mtx::user_interactive::auth_types::registration_token) {
|
} else if (current_stage == mtx::user_interactive::auth_types::registration_token) {
|
||||||
QString token = QInputDialog::getText(
|
bool ok;
|
||||||
this, tr("Registration token"), tr("Please enter a valid registration token."));
|
QString token =
|
||||||
|
QInputDialog::getText(this,
|
||||||
|
tr("Registration token"),
|
||||||
|
tr("Please enter a valid registration token."),
|
||||||
|
QLineEdit::Normal,
|
||||||
|
QString(),
|
||||||
|
&ok);
|
||||||
|
|
||||||
|
if (ok) {
|
||||||
emit registrationWithAuth(mtx::user_interactive::Auth{
|
emit registrationWithAuth(mtx::user_interactive::Auth{
|
||||||
session, mtx::user_interactive::auth::RegistrationToken{token.toStdString()}});
|
session, mtx::user_interactive::auth::RegistrationToken{token.toStdString()}});
|
||||||
|
} else {
|
||||||
|
emit errorOccurred();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// use fallback
|
// use fallback
|
||||||
auto dialog = new dialogs::FallbackAuth(
|
auto dialog = new dialogs::FallbackAuth(
|
||||||
|
|
Loading…
Reference in a new issue