From e9dbcc554a3918cc7963647a6b3b5e343ba74e2b Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Fri, 18 Nov 2022 15:01:43 +0100 Subject: [PATCH] set user.current by value from userAttributes this should have no effect but it should ensure "current" is not falsely set to true if the method storeProfile will be used for more scenarios in the future. Signed-off-by: Marcel Hibbe --- app/src/main/java/com/nextcloud/talk/users/UserManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/users/UserManager.kt b/app/src/main/java/com/nextcloud/talk/users/UserManager.kt index c20a231ac..814eeb895 100644 --- a/app/src/main/java/com/nextcloud/talk/users/UserManager.kt +++ b/app/src/main/java/com/nextcloud/talk/users/UserManager.kt @@ -149,7 +149,7 @@ class UserManager internal constructor(private val userRepository: UsersReposito else -> { user.token = userAttributes.token user.baseUrl = userAttributes.serverUrl - user.current = true + user.current = userAttributes.currentUser user.userId = userAttributes.userId user.token = userAttributes.token user.displayName = userAttributes.displayName @@ -237,7 +237,7 @@ class UserManager internal constructor(private val userRepository: UsersReposito data class UserAttributes( val id: Long?, val serverUrl: String?, - val currentUser: Boolean?, + val currentUser: Boolean, val userId: String?, val token: String?, val displayName: String?,