Skip to content

Commit c873848

Browse files
committed
fix: don't deauth if username isn't changed
1 parent f1e3bbf commit c873848

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/data/nextcloud/nextcloud_client_extension.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ extension NextcloudClientExtension on NextcloudClient {
5050
);
5151

5252
void deAuth() {
53+
// Logout if the username changes
54+
if (stows.username.value == username) return;
5355
stows.username.removeListener(deAuth);
5456
client.authentications?.clear();
5557
}

0 commit comments

Comments
 (0)