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 {
|
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;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user