Fix registration
This commit is contained in:
parent
7ce7d322ea
commit
8014bf7b10
|
@ -91,11 +91,14 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
|||
setState(() => passwordError = exception.toString());
|
||||
return setState(() => loading = false);
|
||||
}
|
||||
await matrix.client.onLoginStateChanged.stream
|
||||
.firstWhere((l) => l == LoginState.logged);
|
||||
try {
|
||||
await matrix.client.setDisplayname(widget.displayname);
|
||||
} catch (exception) {
|
||||
Toast.show(I18n.of(context).couldNotSetDisplayname, context, duration: 5);
|
||||
}
|
||||
if (widget.avatar != null) {
|
||||
try {
|
||||
await matrix.client.setAvatar(
|
||||
MatrixFile(
|
||||
|
@ -106,10 +109,9 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
|||
} catch (exception) {
|
||||
Toast.show(I18n.of(context).couldNotSetAvatar, context, duration: 5);
|
||||
}
|
||||
if (matrix.client.isLogged()) {
|
||||
}
|
||||
await Navigator.of(context).pushAndRemoveUntil(
|
||||
AppRoute.defaultRoute(context, ChatListView()), (r) => false);
|
||||
}
|
||||
setState(() => loading = false);
|
||||
}
|
||||
|
||||
|
|
|
@ -110,8 +110,8 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "87f1a4ed99e067b184c99919656b1cde925f4a8f"
|
||||
resolved-ref: "87f1a4ed99e067b184c99919656b1cde925f4a8f"
|
||||
ref: "2e6a1ab4d4b4f9d635890610310f4b683853a549"
|
||||
resolved-ref: "2e6a1ab4d4b4f9d635890610310f4b683853a549"
|
||||
url: "https://gitlab.com/famedly/famedlysdk.git"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
|
|
|
@ -27,7 +27,7 @@ dependencies:
|
|||
famedlysdk:
|
||||
git:
|
||||
url: https://gitlab.com/famedly/famedlysdk.git
|
||||
ref: 87f1a4ed99e067b184c99919656b1cde925f4a8f
|
||||
ref: 2e6a1ab4d4b4f9d635890610310f4b683853a549
|
||||
|
||||
localstorage: ^3.0.1+4
|
||||
bubble: ^1.1.9+1
|
||||
|
|
Loading…
Reference in a new issue