Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneh-s committed Jan 22, 2025
1 parent 5194516 commit b0149ad
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,10 @@ class SpaceRepository @Inject constructor(

suspend fun leaveSpace(spaceId: String) {
val userId = authService.currentUser?.id
if (userId != null) {
spaceService.removeUserFromSpace(spaceId, userId)
}
if (userId != null) {
updateUserSpaceId(userId, spaceId)

userId?.let { uid ->
spaceService.removeUserFromSpace(spaceId, uid)
updateUserSpaceId(uid, spaceId)
}
}

Expand Down

0 comments on commit b0149ad

Please sign in to comment.