Remove hasOngoingCall to hasRoomCall to match SDK name.

This commit is contained in:
Benoit Marty 2024-01-19 16:16:57 +01:00
parent 2c691d527b
commit ecb000b8ed
6 changed files with 6 additions and 6 deletions

View file

@ -173,7 +173,7 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) {
verticalAlignment = Alignment.CenterVertically,
) {
// Video call
if (room.hasOngoingCall) {
if (room.hasRoomCall) {
Icon(
modifier = Modifier.size(16.dp),
imageVector = CompoundIcons.VideoCallSolid,

View file

@ -161,7 +161,7 @@ class RoomListDataSource @Inject constructor(
}.orEmpty(),
avatarData = avatarData,
notificationMode = roomSummary.details.notificationMode,
hasOngoingCall = roomSummary.details.hasOngoingCall,
hasRoomCall = roomSummary.details.hasRoomCall,
isDm = roomSummary.details.isDm,
)
}

View file

@ -33,6 +33,6 @@ data class RoomListRoomSummary(
val avatarData: AvatarData = AvatarData(id, name, size = AvatarSize.RoomListItem),
val isPlaceholder: Boolean = false,
val notificationMode: RoomNotificationMode? = null,
val hasOngoingCall: Boolean = false,
val hasRoomCall: Boolean = false,
val isDm: Boolean = false,
)

View file

@ -40,7 +40,7 @@ open class RoomListRoomSummaryProvider : PreviewParameterProvider<RoomListRoomSu
timestamp = "yesterday",
hasUnread = true,
),
aRoomListRoomSummary().copy(hasUnread = true, hasOngoingCall = true),
aRoomListRoomSummary().copy(hasUnread = true, hasRoomCall = true),
)
}

View file

@ -43,7 +43,7 @@ data class RoomSummaryDetails(
val unreadNotificationCount: Int,
val inviter: RoomMember? = null,
val notificationMode: RoomNotificationMode? = null,
val hasOngoingCall: Boolean = false,
val hasRoomCall: Boolean = false,
val isDm: Boolean = false,
) {
val lastMessageTimestamp = lastMessage?.originServerTs

View file

@ -39,7 +39,7 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto
lastMessage = latestRoomMessage,
inviter = roomInfo.inviter?.let(RoomMemberMapper::map),
notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode),
hasOngoingCall = roomInfo.hasRoomCall,
hasRoomCall = roomInfo.hasRoomCall,
isDm = roomInfo.isDirect && roomInfo.activeMembersCount.toLong() == 2L,
)
}