Only login if the client is logged out
This commit is contained in:
+4
-3
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user