Minor fixes

This commit is contained in:
Christian Pauly 2020-01-02 22:31:39 +01:00
commit de29800f29
19 changed files with 156 additions and 104 deletions

View file

@ -35,13 +35,15 @@ class _LoginPageState extends State<LoginPage> {
}
serverError = null;
if (usernameController.text.isEmpty || passwordController.text.isEmpty)
if (usernameController.text.isEmpty || passwordController.text.isEmpty) {
return;
}
String homeserver = serverController.text;
if (homeserver.isEmpty) homeserver = defaultHomeserver;
if (!homeserver.startsWith("https://"))
if (!homeserver.startsWith("https://")) {
homeserver = "https://" + homeserver;
}
try {
matrix.showLoadingDialog(context);
@ -64,7 +66,7 @@ class _LoginPageState extends State<LoginPage> {
setState(() => passwordError = exception.toString());
return matrix.hideLoadingDialog();
}
Matrix.of(context).saveAccount();
await Matrix.of(context).saveAccount();
matrix.hideLoadingDialog();
}