Only login if the client is logged out
This commit is contained in:
parent
f229c0371b
commit
27b7f79d74
|
@ -54,9 +54,10 @@ class _MyHomePageState extends State<MyHomePage> {
|
|||
|
||||
try {
|
||||
await client.checkHomeserver(Uri.parse(homeserver));
|
||||
await client.login(LoginType.mLoginPassword,
|
||||
password: password,
|
||||
identifier: AuthenticationUserIdentifier(user: username));
|
||||
if (!client.isLogged())
|
||||
await client.login(LoginType.mLoginPassword,
|
||||
password: password,
|
||||
identifier: AuthenticationUserIdentifier(user: username));
|
||||
provider.setClient(client);
|
||||
setState(() {
|
||||
showRooms = true;
|
||||
|
|
Loading…
Reference in New Issue
Block a user