@@ -120,7 +120,8 @@ class SelfUserProfileViewModel @Inject constructor(
120
120
}
121
121
122
122
suspend fun checkIfUserAbleToMigrateToTeamAccount () {
123
- userProfileState= userProfileState.copy(isAbleToMigrateToTeamAccount= canMigrateFromPersonalToTeam())
123
+ val canMigrate= canMigrateFromPersonalToTeam()
124
+ userProfileState= userProfileState.copy(isAbleToMigrateToTeamAccount= canMigrate)
124
125
}
125
126
126
127
private suspend fun fetchIsReadOnlyAccount () {
@@ -171,13 +172,15 @@ class SelfUserProfileViewModel @Inject constructor(
171
172
// Load user avatar raw image data
172
173
completePicture?.let { updateUserAvatar(it) }
173
174
175
+ val teamUrl= getTeamUrl().takeIf { userType== UserType .OWNER || userType== UserType .ADMIN }
176
+
174
177
// Update user data state
175
178
userProfileState= userProfileState.copy(
176
179
status= availabilityStatus,
177
180
fullName= name.orEmpty(),
178
181
userName= handle.orEmpty(),
179
182
teamName= selfTeam?.name,
180
- teamUrl= getTeamUrl(). takeIf { userType == UserType . OWNER || userType == UserType . ADMIN } ,
183
+ teamUrl= teamUrl ,
181
184
otherAccounts= otherAccounts,
182
185
avatarAsset= userProfileState.avatarAsset,
183
186
isAvatarLoading= false ,