Only login if the client is logged out

This commit is contained in:
Brandon Presley 2023-12-30 11:23:57 +13:00
parent f229c0371b
commit 27b7f79d74

View File

@ -54,9 +54,10 @@ class _MyHomePageState extends State<MyHomePage> {
try { try {
await client.checkHomeserver(Uri.parse(homeserver)); await client.checkHomeserver(Uri.parse(homeserver));
await client.login(LoginType.mLoginPassword, if (!client.isLogged())
password: password, await client.login(LoginType.mLoginPassword,
identifier: AuthenticationUserIdentifier(user: username)); password: password,
identifier: AuthenticationUserIdentifier(user: username));
provider.setClient(client); provider.setClient(client);
setState(() { setState(() {
showRooms = true; showRooms = true;