File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/src/main/kotlin/com/wire/android/ui/userprofile/self Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,8 @@ class SelfUserProfileViewModel @Inject constructor(
120120 }
121121
122122 suspend fun checkIfUserAbleToMigrateToTeamAccount () {
123- userProfileState = userProfileState.copy(isAbleToMigrateToTeamAccount = canMigrateFromPersonalToTeam())
123+ val canMigrate = canMigrateFromPersonalToTeam()
124+ userProfileState = userProfileState.copy(isAbleToMigrateToTeamAccount = canMigrate)
124125 }
125126
126127 private suspend fun fetchIsReadOnlyAccount () {
@@ -171,13 +172,15 @@ class SelfUserProfileViewModel @Inject constructor(
171172 // Load user avatar raw image data
172173 completePicture?.let { updateUserAvatar(it) }
173174
175+ val teamUrl = getTeamUrl().takeIf { userType == UserType .OWNER || userType == UserType .ADMIN }
176+
174177 // Update user data state
175178 userProfileState = userProfileState.copy(
176179 status = availabilityStatus,
177180 fullName = name.orEmpty(),
178181 userName = handle.orEmpty(),
179182 teamName = selfTeam?.name,
180- teamUrl = getTeamUrl(). takeIf { userType == UserType . OWNER || userType == UserType . ADMIN } ,
183+ teamUrl = teamUrl ,
181184 otherAccounts = otherAccounts,
182185 avatarAsset = userProfileState.avatarAsset,
183186 isAvatarLoading = false ,
You can’t perform that action at this time.
0 commit comments