浏览代码

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 <dev@mhibbe.de>
Marcel Hibbe 2 年之前
父节点
当前提交
e9dbcc554a
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/src/main/java/com/nextcloud/talk/users/UserManager.kt

+ 2 - 2
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?,