Skip to content

Commit

Permalink
fix detekt
Browse files Browse the repository at this point in the history
  • Loading branch information
saleniuk committed Nov 8, 2023
1 parent a28e184 commit dec6d82
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ import com.wire.kalium.persistence.dao.client.ClientDAO
import com.wire.kalium.util.DateTimeUtil
import io.ktor.util.collections.ConcurrentMap
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.FlowPreview
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.filterNotNull
import kotlinx.coroutines.flow.firstOrNull
Expand Down Expand Up @@ -304,7 +303,7 @@ internal class UserDataSource internal constructor(
val mapTeamMemberDTO = listTeamMemberDTO.associateBy { it.nonQualifiedUserId }
val selfUserTeamId = selfTeamIdProvider().getOrNull()?.value
val teamMembers = listUserProfileDTO
.filter { userProfileDTO -> mapTeamMemberDTO.containsKey(userProfileDTO.id.value) }
.filter { userProfileDTO -> mapTeamMemberDTO.containsKey(userProfileDTO.id.value) }
.map { userProfileDTO ->
userMapper.fromUserProfileDtoToUserEntity(
userProfile = userProfileDTO,
Expand Down Expand Up @@ -370,7 +369,7 @@ internal class UserDataSource internal constructor(
}
}

@OptIn(FlowPreview::class)
@OptIn(ExperimentalCoroutinesApi::class)
override suspend fun observeSelfUserWithTeam(): Flow<Pair<SelfUser, Team?>> {
return metadataDAO.valueByKeyFlow(SELF_USER_ID_KEY).filterNotNull().flatMapMerge { encodedValue ->
val selfUserID: QualifiedIDEntity = Json.decodeFromString(encodedValue)
Expand Down

0 comments on commit dec6d82

Please sign in to comment.