Browse Source

Remove `hasOngoingCall` to `hasRoomCall` to match SDK name.

pull/2130/head
Benoit Marty 8 months ago
parent
commit
ecb000b8ed
  1. 2
      features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt
  2. 2
      features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt
  3. 2
      features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt
  4. 2
      features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt
  5. 2
      libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt
  6. 2
      libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt

2
features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt

@ -173,7 +173,7 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) { @@ -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,

2
features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt

@ -161,7 +161,7 @@ class RoomListDataSource @Inject constructor( @@ -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,
)
}

2
features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt

@ -33,6 +33,6 @@ data class RoomListRoomSummary( @@ -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,
)

2
features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt

@ -40,7 +40,7 @@ open class RoomListRoomSummaryProvider : PreviewParameterProvider<RoomListRoomSu @@ -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),
)
}

2
libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt

@ -43,7 +43,7 @@ data class RoomSummaryDetails( @@ -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

2
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt

@ -39,7 +39,7 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto @@ -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,
)
}

Loading…
Cancel
Save