diff --git a/.idea/dictionaries/shared.xml b/.idea/dictionaries/shared.xml index c1f91b8411..c792687763 100644 --- a/.idea/dictionaries/shared.xml +++ b/.idea/dictionaries/shared.xml @@ -16,6 +16,7 @@ snackbar swipeable textfields + tombstoned diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListPresenter.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListPresenter.kt index 8bc752d629..33c7a8807c 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListPresenter.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListPresenter.kt @@ -170,7 +170,7 @@ class InviteListPresenter @Inject constructor( AvatarData( id = roomId.value, name = name, - url = avatarURLString, + url = avatarUrl, size = AvatarSize.RoomInviteItem, ) diff --git a/features/invitelist/impl/src/test/kotlin/io/element/android/features/invitelist/impl/InviteListPresenterTests.kt b/features/invitelist/impl/src/test/kotlin/io/element/android/features/invitelist/impl/InviteListPresenterTests.kt index 70908941a6..d0f7f93502 100644 --- a/features/invitelist/impl/src/test/kotlin/io/element/android/features/invitelist/impl/InviteListPresenterTests.kt +++ b/features/invitelist/impl/src/test/kotlin/io/element/android/features/invitelist/impl/InviteListPresenterTests.kt @@ -30,7 +30,6 @@ import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.room.RoomMember import io.element.android.libraries.matrix.api.room.RoomMembershipState import io.element.android.libraries.matrix.api.roomlist.RoomSummary -import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails import io.element.android.libraries.matrix.test.AN_AVATAR_URL import io.element.android.libraries.matrix.test.A_ROOM_ID import io.element.android.libraries.matrix.test.A_ROOM_ID_2 @@ -39,6 +38,7 @@ import io.element.android.libraries.matrix.test.A_USER_ID import io.element.android.libraries.matrix.test.A_USER_NAME import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.libraries.matrix.test.room.FakeMatrixRoom +import io.element.android.libraries.matrix.test.room.aRoomSummaryDetails import io.element.android.libraries.matrix.test.roomlist.FakeRoomListService import io.element.android.libraries.push.api.notifications.NotificationDrawerManager import io.element.android.libraries.push.test.notifications.FakeNotificationDrawerManager @@ -425,14 +425,12 @@ class InviteListPresenterTests { postInviteRooms( listOf( RoomSummary.Filled( - RoomSummaryDetails( + aRoomSummaryDetails( roomId = A_ROOM_ID, name = A_ROOM_NAME, - avatarURLString = null, + avatarUrl = null, isDirect = false, lastMessage = null, - lastMessageTimestamp = null, - unreadNotificationCount = 0, inviter = RoomMember( userId = A_USER_ID, displayName = A_USER_NAME, @@ -454,14 +452,12 @@ class InviteListPresenterTests { postInviteRooms( listOf( RoomSummary.Filled( - RoomSummaryDetails( + aRoomSummaryDetails( roomId = A_ROOM_ID, name = A_ROOM_NAME, - avatarURLString = null, + avatarUrl = null, isDirect = true, lastMessage = null, - lastMessageTimestamp = null, - unreadNotificationCount = 0, inviter = RoomMember( userId = A_USER_ID, displayName = A_USER_NAME, @@ -480,14 +476,12 @@ class InviteListPresenterTests { } private fun aRoomSummary(id: RoomId = A_ROOM_ID) = RoomSummary.Filled( - RoomSummaryDetails( + aRoomSummaryDetails( roomId = id, name = A_ROOM_NAME, - avatarURLString = null, + avatarUrl = null, isDirect = false, lastMessage = null, - lastMessageTimestamp = null, - unreadNotificationCount = 0, ) ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesStateProvider.kt index 3029a174fc..aa33b1cbd9 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesStateProvider.kt @@ -18,9 +18,6 @@ package io.element.android.features.messages.impl.forward import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.matrix.api.core.RoomId -import io.element.android.libraries.matrix.api.room.RoomMember -import io.element.android.libraries.matrix.api.room.message.RoomMessage -import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @@ -51,30 +48,3 @@ fun aForwardMessagesState( forwardingSucceeded = forwardingSucceeded, eventSink = {} ) - -internal fun aForwardMessagesRoomList() = persistentListOf( - aRoomDetailsState(), - aRoomDetailsState(roomId = RoomId("!room2:domain"), canonicalAlias = "#element-x-room:matrix.org"), -) - -fun aRoomDetailsState( - roomId: RoomId = RoomId("!room:domain"), - name: String = "roomName", - canonicalAlias: String? = null, - isDirect: Boolean = true, - avatarURLString: String? = null, - lastMessage: RoomMessage? = null, - lastMessageTimestamp: Long? = null, - unreadNotificationCount: Int = 0, - inviter: RoomMember? = null, -) = RoomSummaryDetails( - roomId = roomId, - name = name, - canonicalAlias = canonicalAlias, - isDirect = isDirect, - avatarURLString = avatarURLString, - lastMessage = lastMessage, - lastMessageTimestamp = lastMessageTimestamp, - unreadNotificationCount = unreadNotificationCount, - inviter = inviter, -) diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenterTests.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenterTests.kt index 1e35ec94bd..9dba855678 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenterTests.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenterTests.kt @@ -23,7 +23,7 @@ import com.google.common.truth.Truth.assertThat import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.test.AN_EVENT_ID import io.element.android.libraries.matrix.test.room.FakeMatrixRoom -import io.element.android.libraries.matrix.test.room.aRoomSummaryDetail +import io.element.android.libraries.matrix.test.room.aRoomSummaryDetails import io.element.android.tests.testutils.WarmUpRule import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.test.runTest @@ -55,7 +55,7 @@ class ForwardMessagesPresenterTests { presenter.present() }.test { skipItems(1) - val summary = aRoomSummaryDetail() + val summary = aRoomSummaryDetails() presenter.onRoomSelected(listOf(summary.roomId)) val forwardingState = awaitItem() assertThat(forwardingState.isForwarding).isTrue() @@ -75,7 +75,7 @@ class ForwardMessagesPresenterTests { // Test failed forwarding room.givenForwardEventResult(Result.failure(Throwable("error"))) skipItems(1) - val summary = aRoomSummaryDetail() + val summary = aRoomSummaryDetails() presenter.onRoomSelected(listOf(summary.roomId)) skipItems(1) val failedForwardState = awaitItem() diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateProvider.kt index dc11b85e6d..57c691806a 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateProvider.kt @@ -24,7 +24,7 @@ import io.element.android.libraries.matrix.api.roomlist.RoomSummary import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails import kotlinx.collections.immutable.persistentListOf -open class EditDefaultNotificationSettingStateProvider: PreviewParameterProvider { +open class EditDefaultNotificationSettingStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( anEditDefaultNotificationSettingsState(), @@ -52,11 +52,14 @@ private fun aRoomSummary() = RoomSummary.Filled( RoomSummaryDetails( roomId = RoomId("!roomId:domain"), name = "Room", - avatarURLString = null, + avatarUrl = null, isDirect = false, lastMessage = null, - lastMessageTimestamp = null, - unreadNotificationCount = 0, - notificationMode = RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY, + userDefinedNotificationMode = RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY, + canonicalAlias = null, + inviter = null, + hasRoomCall = false, + numUnreadMentions = 0, + numUnreadMessages = 0, ) ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingView.kt index 7b619a7322..cd3c869e55 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingView.kt @@ -86,7 +86,7 @@ fun EditDefaultNotificationSettingView( if (state.roomsWithUserDefinedMode.isNotEmpty()) { PreferenceCategory(title = stringResource(id = R.string.screen_notification_settings_edit_custom_settings_section_title)) { state.roomsWithUserDefinedMode.forEach { summary -> - val subtitle = when (summary.details.notificationMode) { + val subtitle = when (summary.details.userDefinedNotificationMode) { RoomNotificationMode.ALL_MESSAGES -> stringResource(id = R.string.screen_notification_settings_edit_mode_all_messages) RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY -> { stringResource(id = R.string.screen_notification_settings_edit_mode_mentions_and_keywords) @@ -97,7 +97,7 @@ fun EditDefaultNotificationSettingView( val avatarData = AvatarData( id = summary.identifier(), name = summary.details.name, - url = summary.details.avatarURLString, + url = summary.details.avatarUrl, size = AvatarSize.CustomRoomNotificationSetting, ) ListItem( diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt index 330dea4e94..65c1c0a38f 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt @@ -29,7 +29,7 @@ import io.element.android.libraries.matrix.test.A_THROWABLE import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.libraries.matrix.test.notificationsettings.FakeNotificationSettingsService import io.element.android.libraries.matrix.test.room.FakeMatrixRoom -import io.element.android.libraries.matrix.test.room.aRoomSummaryDetail +import io.element.android.libraries.matrix.test.room.aRoomSummaryDetails import io.element.android.libraries.matrix.test.roomlist.FakeRoomListService import io.element.android.tests.testutils.awaitLastSequentialItem import io.element.android.tests.testutils.consumeItemsUntilPredicate @@ -72,11 +72,11 @@ class EditDefaultNotificationSettingsPresenterTests { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - roomListService.postAllRooms(listOf(RoomSummary.Filled(aRoomSummaryDetail(notificationMode = RoomNotificationMode.ALL_MESSAGES)))) + roomListService.postAllRooms(listOf(RoomSummary.Filled(aRoomSummaryDetails(notificationMode = RoomNotificationMode.ALL_MESSAGES)))) val loadedState = consumeItemsUntilPredicate { state -> - state.roomsWithUserDefinedMode.any { it.details.notificationMode == RoomNotificationMode.ALL_MESSAGES } + state.roomsWithUserDefinedMode.any { it.details.userDefinedNotificationMode == RoomNotificationMode.ALL_MESSAGES } }.last() - assertThat(loadedState.roomsWithUserDefinedMode.any { it.details.notificationMode == RoomNotificationMode.ALL_MESSAGES }).isTrue() + assertThat(loadedState.roomsWithUserDefinedMode.any { it.details.userDefinedNotificationMode == RoomNotificationMode.ALL_MESSAGES }).isTrue() } } diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt index 6610136f5d..18d040b90c 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt @@ -71,7 +71,7 @@ internal fun aRoomListRoomSummaryList(): ImmutableList { return persistentListOf( RoomListRoomSummary( name = "Room", - hasUnread = true, + numberOfUnreadMessages = 1, timestamp = "14:18", lastMessage = "A very very very very long message which suites on two lines", avatarData = AvatarData("!id", "R", size = AvatarSize.RoomListItem), @@ -80,7 +80,7 @@ internal fun aRoomListRoomSummaryList(): ImmutableList { ), RoomListRoomSummary( name = "Room#2", - hasUnread = false, + numberOfUnreadMessages = 0, timestamp = "14:16", lastMessage = "A short message", avatarData = AvatarData("!id", "Z", size = AvatarSize.RoomListItem), diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt index effea847d0..dd16a281c2 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryRow.kt @@ -43,6 +43,7 @@ import io.element.android.compound.theme.ElementTheme import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.roomlist.impl.model.RoomListRoomSummary import io.element.android.features.roomlist.impl.model.RoomListRoomSummaryProvider +import io.element.android.features.roomlist.impl.model.isTimestampHighlighted import io.element.android.libraries.core.extensions.orEmpty import io.element.android.libraries.designsystem.atomic.atoms.UnreadIndicatorAtom import io.element.android.libraries.designsystem.components.avatar.Avatar @@ -141,7 +142,7 @@ private fun RowScope.NameAndTimestampRow(room: RoomListRoomSummary) { Text( text = room.timestamp ?: "", style = ElementTheme.typography.fontBodySmMedium, - color = if (room.hasUnread) { + color = if (room.isTimestampHighlighted()) { ElementTheme.colors.unreadIndicator } else { MaterialTheme.roomListRoomMessageDate() @@ -173,40 +174,77 @@ private fun RowScope.LastMessageAndIndicatorRow(room: RoomListRoomSummary) { verticalAlignment = Alignment.CenterVertically, ) { // Video call - if (room.hasOngoingCall) { - Icon( - modifier = Modifier.size(16.dp), - imageVector = CompoundIcons.VideoCallSolid, - contentDescription = null, - tint = ElementTheme.colors.unreadIndicator, - ) - } - NotificationIcon(room) - if (room.hasUnread) { - UnreadIndicatorAtom() - } + OnGoingCallIcon( + room.hasRoomCall, + ) + // Other indicators + NotificationIcons( + room.userDefinedNotificationMode, + room.numberOfUnreadMessages, + room.numberOfUnreadMentions, + ) } } @Composable -private fun NotificationIcon(room: RoomListRoomSummary) { - val tint = if (room.hasUnread) ElementTheme.colors.unreadIndicator else ElementTheme.colors.iconQuaternary - when (room.notificationMode) { - null, RoomNotificationMode.ALL_MESSAGES -> return - RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY -> - Icon( - modifier = Modifier.size(16.dp), - contentDescription = null, - imageVector = CompoundIcons.Mention, - tint = tint, - ) - RoomNotificationMode.MUTE -> +private fun OnGoingCallIcon( + hasRoomCall: Boolean, +) { + if (hasRoomCall) { + Icon( + modifier = Modifier.size(16.dp), + imageVector = CompoundIcons.VideoCallSolid, + contentDescription = null, + tint = ElementTheme.colors.unreadIndicator, + ) + } +} + +@Composable +private fun RowScope.NotificationIcons( + userDefinedNotificationMode: RoomNotificationMode?, + numberOfUnreadMessages: Int, + numberOfUnreadMentions: Int, +) { + when (userDefinedNotificationMode) { + null, + RoomNotificationMode.ALL_MESSAGES -> { + if (numberOfUnreadMentions > 0) { + Icon( + modifier = Modifier.size(16.dp), + contentDescription = null, + imageVector = CompoundIcons.Mention, + tint = ElementTheme.colors.unreadIndicator, + ) + UnreadIndicatorAtom() + } else if (numberOfUnreadMessages > 0) { + UnreadIndicatorAtom() + } + } + RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY -> { + if (numberOfUnreadMentions > 0) { + Icon( + modifier = Modifier.size(16.dp), + contentDescription = null, + imageVector = CompoundIcons.Mention, + tint = ElementTheme.colors.unreadIndicator, + ) + UnreadIndicatorAtom() + } else if (numberOfUnreadMessages > 0) { + UnreadIndicatorAtom(color = ElementTheme.colors.iconQuaternary) + } + } + RoomNotificationMode.MUTE -> { Icon( modifier = Modifier.size(16.dp), contentDescription = null, imageVector = CompoundIcons.NotificationsSolidOff, - tint = tint, + tint = ElementTheme.colors.iconQuaternary, ) + if (numberOfUnreadMessages > 0 || numberOfUnreadMentions > 0) { + UnreadIndicatorAtom(color = ElementTheme.colors.iconQuaternary) + } + } } } diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt index e337fe5ad3..419a003887 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt @@ -146,7 +146,7 @@ class RoomListDataSource @Inject constructor( val avatarData = AvatarData( id = roomSummary.identifier(), name = roomSummary.details.name, - url = roomSummary.details.avatarURLString, + url = roomSummary.details.avatarUrl, size = AvatarSize.RoomListItem, ) val roomIdentifier = roomSummary.identifier() @@ -154,14 +154,15 @@ class RoomListDataSource @Inject constructor( id = roomSummary.identifier(), roomId = RoomId(roomIdentifier), name = roomSummary.details.name, - hasUnread = roomSummary.details.unreadNotificationCount > 0, + numberOfUnreadMessages = roomSummary.details.numUnreadMessages, + numberOfUnreadMentions = roomSummary.details.numUnreadMentions, timestamp = lastMessageTimestampFormatter.format(roomSummary.details.lastMessageTimestamp), lastMessage = roomSummary.details.lastMessage?.let { message -> roomLastMessageFormatter.format(message.event, roomSummary.details.isDirect) }.orEmpty(), avatarData = avatarData, - notificationMode = roomSummary.details.notificationMode, - hasOngoingCall = roomSummary.details.hasOngoingCall, + userDefinedNotificationMode = roomSummary.details.userDefinedNotificationMode, + hasRoomCall = roomSummary.details.hasRoomCall, ) } null -> null diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt index cfaf9b8321..826a9094ab 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt @@ -27,11 +27,22 @@ data class RoomListRoomSummary( val id: String, val roomId: RoomId, val name: String = "", - val hasUnread: Boolean = false, val timestamp: String? = null, val lastMessage: CharSequence? = null, val avatarData: AvatarData = AvatarData(id, name, size = AvatarSize.RoomListItem), val isPlaceholder: Boolean = false, - val notificationMode: RoomNotificationMode? = null, - val hasOngoingCall: Boolean = false, + val userDefinedNotificationMode: RoomNotificationMode? = null, + val numberOfUnreadMessages: Int = 0, + val numberOfUnreadMentions: Int = 0, + val hasRoomCall: Boolean = false, ) + +fun RoomListRoomSummary.isTimestampHighlighted(): Boolean { + return hasRoomCall || + when (userDefinedNotificationMode) { + null, + RoomNotificationMode.ALL_MESSAGES -> numberOfUnreadMessages > 0 || numberOfUnreadMentions > 0 + RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY -> numberOfUnreadMentions > 0 + RoomNotificationMode.MUTE -> false + } +} diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt index 2649704427..7c7082d6e5 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummaryProvider.kt @@ -25,32 +25,83 @@ import io.element.android.libraries.matrix.api.room.RoomNotificationMode open class RoomListRoomSummaryProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( - aRoomListRoomSummary(), - aRoomListRoomSummary().copy(lastMessage = null), - aRoomListRoomSummary().copy(hasUnread = true, notificationMode = RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY), - aRoomListRoomSummary().copy(timestamp = "88:88", notificationMode = RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY), - aRoomListRoomSummary().copy(timestamp = "88:88", notificationMode = RoomNotificationMode.MUTE), - aRoomListRoomSummary().copy(timestamp = "88:88", hasUnread = true), - aRoomListRoomSummary().copy(isPlaceholder = true, timestamp = "88:88"), - aRoomListRoomSummary().copy( - name = "A very long room name that should be truncated", - lastMessage = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt" + - " ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea com" + - "modo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", - timestamp = "yesterday", - hasUnread = true, + listOf( + aRoomListRoomSummary(isPlaceholder = true), + aRoomListRoomSummary(timestamp = null), + aRoomListRoomSummary(lastMessage = "Last message"), + aRoomListRoomSummary( + name = "A very long room name that should be truncated", + lastMessage = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt" + + " ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea com" + + "modo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.", + timestamp = "yesterday", + numberOfUnreadMessages = 1, + ), ), - aRoomListRoomSummary().copy(hasUnread = true, hasOngoingCall = true), - ) + listOf(false, true).map { hasCall -> + listOf( + RoomNotificationMode.ALL_MESSAGES, + RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY, + RoomNotificationMode.MUTE, + ).map { roomNotificationMode -> + listOf( + aRoomListRoomSummary( + name = roomNotificationMode.name, + lastMessage = "No activity" + if (hasCall) ", call" else "", + notificationMode = roomNotificationMode, + numberOfUnreadMessages = 0, + numberOfUnreadMentions = 0, + hasOngoingCall = hasCall, + ), + aRoomListRoomSummary( + name = roomNotificationMode.name, + lastMessage = "New messages" + if (hasCall) ", call" else "", + notificationMode = roomNotificationMode, + numberOfUnreadMessages = 1, + numberOfUnreadMentions = 0, + hasOngoingCall = hasCall, + ), + aRoomListRoomSummary( + name = roomNotificationMode.name, + lastMessage = "New messages, mentions" + if (hasCall) ", call" else "", + notificationMode = roomNotificationMode, + numberOfUnreadMessages = 1, + numberOfUnreadMentions = 1, + hasOngoingCall = hasCall, + ), + aRoomListRoomSummary( + name = roomNotificationMode.name, + lastMessage = "New mentions" + if (hasCall) ", call" else "", + notificationMode = roomNotificationMode, + numberOfUnreadMessages = 0, + numberOfUnreadMentions = 1, + hasOngoingCall = hasCall, + ), + ) + }.flatten() + }.flatten(), + ).flatten() } -fun aRoomListRoomSummary() = RoomListRoomSummary( +fun aRoomListRoomSummary( + lastMessage: String? = null, + notificationMode: RoomNotificationMode? = null, + numberOfUnreadMessages: Int = 0, + numberOfUnreadMentions: Int = 0, + timestamp: String? = "88:88", + hasOngoingCall: Boolean = false, + isPlaceholder: Boolean = false, + name: String = "Room name", +) = RoomListRoomSummary( id = "!roomId", roomId = RoomId("!roomId:domain"), - name = "Room name", - hasUnread = false, - timestamp = null, - lastMessage = "Last message", + name = name, + numberOfUnreadMessages = numberOfUnreadMessages, + numberOfUnreadMentions = numberOfUnreadMentions, + timestamp = timestamp, + lastMessage = lastMessage, avatarData = AvatarData("!roomId", "Room name", size = AvatarSize.RoomListItem), - isPlaceholder = false, + isPlaceholder = isPlaceholder, + userDefinedNotificationMode = notificationMode, + hasRoomCall = hasOngoingCall, ) diff --git a/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt index 4573456762..09a57f2c0e 100644 --- a/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt +++ b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt @@ -123,7 +123,7 @@ class RoomListPresenterTests { fun `present - should start with no user and then load user with error`() = runTest { val matrixClient = FakeMatrixClient( userDisplayName = Result.failure(AN_EXCEPTION), - userAvatarURLString = Result.failure(AN_EXCEPTION), + userAvatarUrl = Result.failure(AN_EXCEPTION), ) val scope = CoroutineScope(coroutineContext + SupervisorJob()) val presenter = createRoomListPresenter(client = matrixClient, coroutineScope = scope) @@ -385,11 +385,11 @@ class RoomListPresenterTests { notificationSettingsService.setRoomNotificationMode(A_ROOM_ID, userDefinedMode) val updatedState = consumeItemsUntilPredicate { state -> - state.roomList.any { it.id == A_ROOM_ID.value && it.notificationMode == userDefinedMode } + state.roomList.any { it.id == A_ROOM_ID.value && it.userDefinedNotificationMode == userDefinedMode } }.last() val room = updatedState.roomList.find { it.id == A_ROOM_ID.value } - assertThat(room?.notificationMode).isEqualTo(userDefinedMode) + assertThat(room?.userDefinedNotificationMode).isEqualTo(userDefinedMode) cancelAndIgnoreRemainingEvents() scope.cancel() } @@ -439,7 +439,8 @@ private val aRoomListRoomSummary = RoomListRoomSummary( id = A_ROOM_ID.value, roomId = A_ROOM_ID, name = A_ROOM_NAME, - hasUnread = true, + numberOfUnreadMentions = 1, + numberOfUnreadMessages = 2, timestamp = A_FORMATTED_DATE, lastMessage = "", avatarData = AvatarData(id = A_ROOM_ID.value, name = A_ROOM_NAME, size = AvatarSize.RoomListItem), diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/MatrixClient.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/MatrixClient.kt index dc452f1514..e5ae0c9571 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/MatrixClient.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/MatrixClient.kt @@ -72,7 +72,7 @@ interface MatrixClient : Closeable { */ suspend fun logout(ignoreSdkError: Boolean): String? suspend fun loadUserDisplayName(): Result - suspend fun loadUserAvatarURLString(): Result + suspend fun loadUserAvatarUrl(): Result suspend fun getAccountManagementUrl(action: AccountManagementAction?): Result suspend fun uploadMedia(mimeType: String, data: ByteArray, progressCallback: ProgressCallback?): Result fun roomMembershipObserver(): RoomMembershipObserver diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt index 0a6aa7bbaa..ded6d36065 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt @@ -36,13 +36,15 @@ sealed interface RoomSummary { data class RoomSummaryDetails( val roomId: RoomId, val name: String, - val canonicalAlias: String? = null, + val canonicalAlias: String?, val isDirect: Boolean, - val avatarURLString: String?, + val avatarUrl: String?, val lastMessage: RoomMessage?, - val lastMessageTimestamp: Long?, - val unreadNotificationCount: Int, - val inviter: RoomMember? = null, - val notificationMode: RoomNotificationMode? = null, - val hasOngoingCall: Boolean = false, -) + val numUnreadMessages: Int, + val numUnreadMentions: Int, + val inviter: RoomMember?, + val userDefinedNotificationMode: RoomNotificationMode?, + val hasRoomCall: Boolean, +) { + val lastMessageTimestamp = lastMessage?.originServerTs +} diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/user/CurrentUser.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/user/CurrentUser.kt index 3968b058d9..56b61e4cde 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/user/CurrentUser.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/user/CurrentUser.kt @@ -19,11 +19,11 @@ package io.element.android.libraries.matrix.api.user import io.element.android.libraries.matrix.api.MatrixClient /** - * Get the current user, as [MatrixUser], using [MatrixClient.loadUserAvatarURLString] + * Get the current user, as [MatrixUser], using [MatrixClient.loadUserAvatarUrl] * and [MatrixClient.loadUserDisplayName]. */ suspend fun MatrixClient.getCurrentUser(): MatrixUser { - val userAvatarUrl = loadUserAvatarURLString().getOrNull() + val userAvatarUrl = loadUserAvatarUrl().getOrNull() val userDisplayName = loadUserDisplayName().getOrNull() return MatrixUser( userId = sessionId, diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt index f7c157d2ba..049ae1f47f 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt @@ -412,7 +412,7 @@ class RustMatrixClient( } } - override suspend fun loadUserAvatarURLString(): Result = withContext(sessionDispatcher) { + override suspend fun loadUserAvatarUrl(): Result = withContext(sessionDispatcher) { runCatching { client.avatarUrl() } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt index 41c8ad40dd..fdfa3d14c2 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt @@ -35,13 +35,13 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto name = roomInfo.name ?: roomInfo.id, canonicalAlias = roomInfo.canonicalAlias, isDirect = roomInfo.isDirect, - avatarURLString = roomInfo.avatarUrl, - unreadNotificationCount = roomInfo.notificationCount.toInt(), + avatarUrl = roomInfo.avatarUrl, lastMessage = latestRoomMessage, - lastMessageTimestamp = latestRoomMessage?.originServerTs, inviter = roomInfo.inviter?.let(RoomMemberMapper::map), - notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode), - hasOngoingCall = roomInfo.hasRoomCall, + userDefinedNotificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode), + hasRoomCall = roomInfo.hasRoomCall, + numUnreadMentions = roomInfo.numUnreadMentions.toInt(), + numUnreadMessages = roomInfo.numUnreadMessages.toInt(), ) } } diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/FakeMatrixClient.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/FakeMatrixClient.kt index 3977fbb133..82a4953321 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/FakeMatrixClient.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/FakeMatrixClient.kt @@ -48,7 +48,7 @@ import kotlinx.coroutines.delay class FakeMatrixClient( override val sessionId: SessionId = A_SESSION_ID, private val userDisplayName: Result = Result.success(A_USER_NAME), - private val userAvatarURLString: Result = Result.success(AN_AVATAR_URL), + private val userAvatarUrl: Result = Result.success(AN_AVATAR_URL), override val roomListService: RoomListService = FakeRoomListService(), override val mediaLoader: MatrixMediaLoader = FakeMediaLoader(), private val sessionVerificationService: FakeSessionVerificationService = FakeSessionVerificationService(), @@ -136,8 +136,8 @@ class FakeMatrixClient( return userDisplayName } - override suspend fun loadUserAvatarURLString(): Result { - return userAvatarURLString + override suspend fun loadUserAvatarUrl(): Result { + return userAvatarUrl } override suspend fun getAccountManagementUrl(action: AccountManagementAction?): Result { diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/RoomSummaryFixture.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/RoomSummaryFixture.kt index 79d3acb58b..6e42e5323b 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/RoomSummaryFixture.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/room/RoomSummaryFixture.kt @@ -19,6 +19,7 @@ package io.element.android.libraries.matrix.test.room import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId +import io.element.android.libraries.matrix.api.room.RoomMember import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.message.RoomMessage import io.element.android.libraries.matrix.api.roomlist.RoomSummary @@ -34,42 +35,48 @@ fun aRoomSummaryFilled( roomId: RoomId = A_ROOM_ID, name: String = A_ROOM_NAME, isDirect: Boolean = false, - avatarURLString: String? = null, + avatarUrl: String? = null, lastMessage: RoomMessage? = aRoomMessage(), - lastMessageTimestamp: Long? = null, - unreadNotificationCount: Int = 2, + numUnreadMentions: Int = 1, + numUnreadMessages: Int = 2, notificationMode: RoomNotificationMode? = null, ) = RoomSummary.Filled( - aRoomSummaryDetail( + aRoomSummaryDetails( roomId = roomId, name = name, isDirect = isDirect, - avatarURLString = avatarURLString, + avatarUrl = avatarUrl, lastMessage = lastMessage, - lastMessageTimestamp = lastMessageTimestamp, - unreadNotificationCount = unreadNotificationCount, + numUnreadMentions = numUnreadMentions, + numUnreadMessages = numUnreadMessages, notificationMode = notificationMode, ) ) -fun aRoomSummaryDetail( +fun aRoomSummaryDetails( roomId: RoomId = A_ROOM_ID, name: String = A_ROOM_NAME, isDirect: Boolean = false, - avatarURLString: String? = null, + avatarUrl: String? = null, lastMessage: RoomMessage? = aRoomMessage(), - lastMessageTimestamp: Long? = null, - unreadNotificationCount: Int = 2, notificationMode: RoomNotificationMode? = null, + inviter: RoomMember? = null, + canonicalAlias: String? = null, + hasOngoingCall: Boolean = false, + numUnreadMentions: Int = 0, + numUnreadMessages: Int = 0, ) = RoomSummaryDetails( roomId = roomId, name = name, isDirect = isDirect, - avatarURLString = avatarURLString, + avatarUrl = avatarUrl, lastMessage = lastMessage, - lastMessageTimestamp = lastMessageTimestamp, - unreadNotificationCount = unreadNotificationCount, - notificationMode = notificationMode + userDefinedNotificationMode = notificationMode, + canonicalAlias = canonicalAlias, + inviter = inviter, + hasRoomCall = hasOngoingCall, + numUnreadMentions = numUnreadMentions, + numUnreadMessages = numUnreadMessages, ) fun aRoomMessage( diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedRoom.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedRoom.kt index 02767e10bb..7e5d523ac1 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedRoom.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/SelectedRoom.kt @@ -44,6 +44,9 @@ import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Surface import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.api.core.RoomId +import io.element.android.libraries.matrix.api.room.RoomMember +import io.element.android.libraries.matrix.api.room.RoomNotificationMode +import io.element.android.libraries.matrix.api.room.message.RoomMessage import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails import io.element.android.libraries.ui.strings.CommonStrings @@ -60,7 +63,7 @@ fun SelectedRoom( Column( horizontalAlignment = Alignment.CenterHorizontally, ) { - Avatar(AvatarData(roomSummary.roomId.value, roomSummary.name, roomSummary.avatarURLString, AvatarSize.SelectedRoom)) + Avatar(AvatarData(roomSummary.roomId.value, roomSummary.name, roomSummary.avatarUrl, AvatarSize.SelectedRoom)) Text( text = roomSummary.name, overflow = TextOverflow.Ellipsis, @@ -94,17 +97,33 @@ fun SelectedRoom( @Composable internal fun SelectedRoomPreview() = ElementPreview { SelectedRoom( - roomSummary = RoomSummaryDetails( - roomId = RoomId("!room:domain"), - name = "roomName", - canonicalAlias = null, - isDirect = true, - avatarURLString = null, - lastMessage = null, - lastMessageTimestamp = null, - unreadNotificationCount = 0, - inviter = null, - ), + roomSummary = aRoomSummaryDetails(), onRoomRemoved = {}, ) } + +fun aRoomSummaryDetails( + roomId: RoomId = RoomId("!room:domain"), + name: String = "roomName", + canonicalAlias: String? = null, + isDirect: Boolean = true, + avatarUrl: String? = null, + lastMessage: RoomMessage? = null, + inviter: RoomMember? = null, + notificationMode: RoomNotificationMode? = null, + hasOngoingCall: Boolean = false, + numUnreadMentions: Int = 0, + numUnreadMessages: Int = 0, +) = RoomSummaryDetails( + roomId = roomId, + name = name, + canonicalAlias = canonicalAlias, + isDirect = isDirect, + avatarUrl = avatarUrl, + lastMessage = lastMessage, + inviter = inviter, + userDefinedNotificationMode = notificationMode, + hasRoomCall = hasOngoingCall, + numUnreadMentions = numUnreadMentions, + numUnreadMessages = numUnreadMessages, +) diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotificationDrawerManager.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotificationDrawerManager.kt index 904a6bf2ea..9d12d7bd6c 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotificationDrawerManager.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/DefaultNotificationDrawerManager.kt @@ -297,7 +297,7 @@ class DefaultNotificationDrawerManager @Inject constructor( operation = { // myUserDisplayName cannot be empty else NotificationCompat.MessagingStyle() will crash val myUserDisplayName = client.loadUserDisplayName().getOrNull() ?: sessionId.value - val userAvatarUrl = client.loadUserAvatarURLString().getOrNull() + val userAvatarUrl = client.loadUserAvatarUrl().getOrNull() MatrixUser( userId = sessionId, displayName = myUserDisplayName, diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt index d06e0be6d6..c83060fe3a 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt @@ -19,9 +19,8 @@ package io.element.android.libraries.roomselect.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.core.RoomId -import io.element.android.libraries.matrix.api.room.RoomMember -import io.element.android.libraries.matrix.api.room.message.RoomMessage import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails +import io.element.android.libraries.matrix.ui.components.aRoomSummaryDetails import io.element.android.libraries.roomselect.api.RoomSelectMode import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @@ -41,7 +40,7 @@ open class RoomSelectStateProvider : PreviewParameterProvider { resultState = SearchBarResultState.Results(aForwardMessagesRoomList()), query = "Test", isSearchActive = true, - selectedRooms = persistentListOf(aRoomDetailsState(roomId = RoomId("!room2:domain"))) + selectedRooms = persistentListOf(aRoomSummaryDetails(roomId = RoomId("!room2:domain"))) ), // Add other states here ) @@ -62,32 +61,10 @@ private fun aRoomSelectState( ) private fun aForwardMessagesRoomList() = persistentListOf( - aRoomDetailsState(), - aRoomDetailsState( + aRoomSummaryDetails(), + aRoomSummaryDetails( roomId = RoomId("!room2:domain"), name = "Room with alias", canonicalAlias = "#alias:example.org", ), ) - -private fun aRoomDetailsState( - roomId: RoomId = RoomId("!room:domain"), - name: String = "roomName", - canonicalAlias: String? = null, - isDirect: Boolean = true, - avatarURLString: String? = null, - lastMessage: RoomMessage? = null, - lastMessageTimestamp: Long? = null, - unreadNotificationCount: Int = 0, - inviter: RoomMember? = null, -) = RoomSummaryDetails( - roomId = roomId, - name = name, - canonicalAlias = canonicalAlias, - isDirect = isDirect, - avatarURLString = avatarURLString, - lastMessage = lastMessage, - lastMessageTimestamp = lastMessageTimestamp, - unreadNotificationCount = unreadNotificationCount, - inviter = inviter, -) diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt index 264be0cca7..5969b1c13b 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectView.kt @@ -222,7 +222,7 @@ private fun RoomSummaryView( avatarData = AvatarData( id = summary.roomId.value, name = summary.name, - url = summary.avatarURLString, + url = summary.avatarUrl, size = AvatarSize.RoomSelectRoomListItem, ), ) diff --git a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt index 88ae560bb2..4c0a18e94c 100644 --- a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt +++ b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt @@ -24,7 +24,7 @@ import io.element.android.libraries.roomselect.api.RoomSelectMode import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.roomlist.RoomSummary import io.element.android.libraries.matrix.test.FakeMatrixClient -import io.element.android.libraries.matrix.test.room.aRoomSummaryDetail +import io.element.android.libraries.matrix.test.room.aRoomSummaryDetails import io.element.android.libraries.matrix.test.roomlist.FakeRoomListService import io.element.android.tests.testutils.WarmUpRule import kotlinx.collections.immutable.persistentListOf @@ -73,7 +73,7 @@ class RoomSelectPresenterTests { @Test fun `present - update query`() = runTest { val roomListService = FakeRoomListService().apply { - postAllRooms(listOf(RoomSummary.Filled(aRoomSummaryDetail()))) + postAllRooms(listOf(RoomSummary.Filled(aRoomSummaryDetails()))) } val client = FakeMatrixClient(roomListService = roomListService) val presenter = aPresenter(client = client) @@ -81,7 +81,7 @@ class RoomSelectPresenterTests { presenter.present() }.test { val initialState = awaitItem() - assertThat(awaitItem().resultState as? SearchBarResultState.Results).isEqualTo(SearchBarResultState.Results(listOf(aRoomSummaryDetail()))) + assertThat(awaitItem().resultState as? SearchBarResultState.Results).isEqualTo(SearchBarResultState.Results(listOf(aRoomSummaryDetails()))) initialState.eventSink(RoomSelectEvents.UpdateQuery("string not contained")) assertThat(awaitItem().query).isEqualTo("string not contained") @@ -97,7 +97,7 @@ class RoomSelectPresenterTests { }.test { val initialState = awaitItem() skipItems(1) - val summary = aRoomSummaryDetail() + val summary = aRoomSummaryDetails() initialState.eventSink(RoomSelectEvents.SetSelectedRoom(summary)) assertThat(awaitItem().selectedRooms).isEqualTo(persistentListOf(summary)) diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_0,NEXUS_5,1.0,en].png index d80e1cc282..6bfb7eeabe 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fde0cc6b7268856b611db66b66b22c51df155f605988fc54f5c7ba18e5f1f713 -size 11456 +oid sha256:c978bc799ab79290f89568de692d3ace219a4192ec9706fef63fe977a853f74d +size 6046 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_10,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..58bf4dbf34 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_10,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29135db44db4a0150c00880080d7a7baf00476b79924b1cc8f6ef1bc396508b0 +size 11398 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_11,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..9b8f0707c3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_11,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:155c93b3301fde110e5749ee6ef691ae145408f37143b4ea21a146e13cb8d8a0 +size 12510 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_12,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..5d4d2188a1 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_12,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:724166ef1c56802cce8fdb84eee31f8dc6b39b0bc5ebcb2fb550ca5de40df369 +size 13870 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_13,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..4bf2631f6e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_13,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9edd688608123f9fb51b572e8761b7009f9148105c5e3f6f96a493ff48aac8f +size 14222 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_14,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..bd54387205 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_14,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:613ac3f93dc090433c55889eda1cff2a6ab581d1f72191045312f0e3aa0bd881 +size 15413 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_15,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..c05d7211eb --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_15,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:848ddac47db6b3f98af1285291f0f45a87ffbebe84772d81dadfc3c8fadc29eb +size 17683 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_16,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..9610330d34 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_16,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6aa2c9647f848b1d2c48b9915570106e227b2cd872becdb0a02cccc450f28740 +size 16252 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_17,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_17,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..a9d3b101d7 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_17,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e289397b3e78a904505a3c750ce49f7e76dbf2626449004e489da194c29a457 +size 17412 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_18,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_18,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..1e5165c43b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_18,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bbd2feaa5fe2e2971074cf7db593824229ec84a8012ff77b8913c76b84fe4559 +size 19669 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_19,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_19,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..bd355262d4 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_19,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:060658e5075ca5e5242acbd8b7366d7a258011db55bfe2db8bc7a350c027bb45 +size 12396 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_2,NEXUS_5,1.0,en].png index 35364ebadc..040f9a72b8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5315627c3cae4b07d3df50054d9a689148517b8fd0a0e88b160ff3f447513999 -size 12653 +oid sha256:cf71e045231208529eb524abce7b246a0ac6283c422f9695d560071fda7085f2 +size 12820 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_20,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_20,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..d507c92853 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_20,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd65a0740156ea23aa9130846821f95aecdd22a4faa7b329d0b3f1ea4cfb2311 +size 13476 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_21,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_21,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..57819b2f2f --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_21,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd17124c11e7b4a4f27da1b005bc8da4d628f053dcd36cf0ad266afb92f03d7b +size 14999 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_3,NEXUS_5,1.0,en].png index ac31b4c341..547657fe23 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28b9ccdc834d9643694f72ce1c01fb988685a7b0300912bada032be1e426b467 -size 13539 +oid sha256:950e80e7e4be904967d35aaffe196548fa4f5ae9afdf2b86e65611ccdb14bf80 +size 22203 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_4,NEXUS_5,1.0,en].png index 961345501b..865600f43a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3ada109a4f7b3b3bfae402eaddcdc240fd5f08aad41e7f1e70878baa8e257f2b -size 13288 +oid sha256:02e8617a838d2f44381de7c1432d16c848f249b671ec5c17313d975c924b6445 +size 13246 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_5,NEXUS_5,1.0,en].png index 15fba97e39..f4f5cf3569 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b18e5991be70ab16f983b929d08e566c85483e6d79f4de7a4191a800f4cae35 -size 13305 +oid sha256:cf2bf4a68d1ed9e3540c5a21b21a9134a2704d00ca1ed53218a3483255fb98f4 +size 14533 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_6,NEXUS_5,1.0,en].png index 6bfb7eeabe..f62b85f25a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c978bc799ab79290f89568de692d3ace219a4192ec9706fef63fe977a853f74d -size 6046 +oid sha256:5a96d0312ffa61a2594eae8b4d8ff1f21eae1d41cfb7c8c436458823d1d7700e +size 16696 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_7,NEXUS_5,1.0,en].png index 547657fe23..45e7fde7cd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:950e80e7e4be904967d35aaffe196548fa4f5ae9afdf2b86e65611ccdb14bf80 -size 22203 +oid sha256:c5ab9f23998f5b6a3c9b2b036ab95e7db588e670e178b0c2ddefa465d3c9d05d +size 15261 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_8,NEXUS_5,1.0,en].png index b1778019d8..4291938525 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:004de09febcc9962bdc710a258f82083ba4ebca1c2831da48db7a1c9038d2caf -size 12154 +oid sha256:d88b81264a4d3133b6569541bbb70d4df7e145a6c521b5c88499e79cb8bc7b80 +size 16403 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_9,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..c40ca89850 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_9,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:957e2d5a7b52aebcf5dd41d822f70888f3cce680ee01e7f5282d84437b6a0372 +size 18723 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_0,NEXUS_5,1.0,en].png index 774d5ad126..6ab88c6759 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7d6df9f2573241ad0096a1f93fb682713b8d50ffa4808419e246997027c5d43 -size 11392 +oid sha256:144decfd898287f548035c89c264eb5f380084bfe69328a115b8c42cda5282f7 +size 5963 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_10,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..02f276f243 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_10,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1401c858f16dd3c34f59781d21b8a012469462dd4e1abbb3eec033a6831e117 +size 11382 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_11,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..85c5226618 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_11,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:962b168e3b424c0cf4b11da13a6ec5f784101ac5c17877091a64454c459f21fe +size 12477 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_12,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..94b14c620d --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_12,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28f595ba27af8952b02fedfebe80ac33485c7645530e36db10465aaf895ccc2b +size 13756 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_13,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..7cf5540239 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_13,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d24eaa2b3213d6d915c71c24ab70a6652d7207d5d45d4f1d4962500030e4d52e +size 13837 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_14,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..8c63b7ac0a --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_14,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9ef4192190d70fe5961bca96c98b8550acfd7d016f8dfff9f8305cebec1685cb +size 14950 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_15,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..d6fca237d5 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_15,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78bf65a9355ef45c49e8faa6df591bc97115e0090d9d2cb4fe75eb428c1bcf37 +size 17074 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_16,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..ed975162f7 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_16,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a681f9c2d180639d2e659c4f96c7d20b7c2f60d0a4dcf16a6848328f9cb8cfb +size 15642 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_17,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_17,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..78706a9113 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_17,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:99f40548153ebc1923bd7247f7057fbab1cdbf84b8bf6ce3b080e5b29827d4fb +size 16730 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_18,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_18,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..304700fac3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_18,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db27d684a012495b94b1b6a92436cd32abbffa2afc8c1a6b4ccd341fbe93215f +size 18859 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_19,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_19,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..c8e22eb6c0 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_19,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2435bb9a2a9fa4841a8da49f2001120159ec69f8986eed2554479c9fbeb9866a +size 12193 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_2,NEXUS_5,1.0,en].png index d5bf02373d..22cb212645 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e86ea02d990c5db670a6aa3d9c17be62dad1192d687c1dc27177758b55cece3c -size 12503 +oid sha256:7fcbdfc3e45fa0f111cc384c54c40980913e52ff755e9380fba262a4c659a5c5 +size 12715 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_20,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_20,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..a40093c03a --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_20,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1dd777823ae5f3d7d64953fef64041e5dca59b67cacb0e75075c1185374cebc9 +size 13286 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_21,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_21,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..09f3bfa6e0 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_21,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:851bd2a38ccaec9f93b315d3ccf943af8ab089526c352adb19de3133ced92f54 +size 14727 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_3,NEXUS_5,1.0,en].png index f8e1416ce2..58ef0ec934 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:584487de266a9b3e9cdefee0378023a946b309e19b09acffc5bf1a08dfc0d390 -size 13335 +oid sha256:06df893c35c81609b46317f4de733db0bed4f5888eac189d09078ad7bd411cf0 +size 21340 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_4,NEXUS_5,1.0,en].png index 11cdbfc582..e72b2ba142 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8bda8b4f6a84b37548e3926f180ddb282d220b8ff581a60e69e0e309ad3ae06a -size 13119 +oid sha256:a85d56feef73a8c4a2497264899dbdbd0c28490f01478d4a5738a776199b5800 +size 13001 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_5,NEXUS_5,1.0,en].png index 057f4f914c..a2514db420 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2c17e87f046bbdd7a0300262737508cd1ffab4b54da9df7e7a7803237e070243 -size 13032 +oid sha256:cefbb6125ef4d60e5fc8cfcd5d84344f409fcbc73ffe91b171d996d8f405bb5c +size 14089 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_6,NEXUS_5,1.0,en].png index 6ab88c6759..9ff7a0c2c6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:144decfd898287f548035c89c264eb5f380084bfe69328a115b8c42cda5282f7 -size 5963 +oid sha256:4c1a87cb60d17fd959983979dd54c2dcfc07f7bc278846dcf57473ccf2e483b4 +size 16119 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_7,NEXUS_5,1.0,en].png index 58ef0ec934..8944b4276a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06df893c35c81609b46317f4de733db0bed4f5888eac189d09078ad7bd411cf0 -size 21340 +oid sha256:c67906d19842935a3c2ac18e624bfda2b0909583b3239872cc1e79f4f9560723 +size 14799 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_8,NEXUS_5,1.0,en].png index f2441b5999..06471bb68a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53248c6c1d0a05b8fd08bcd35a43a6463b03b9ad808b24f59d1fa7fe5d444d4f -size 12051 +oid sha256:4aa2b28ffcfd62de54ad1e4fc49a1c7a4721818840ca19d0ef8e96e5206d1308 +size 15888 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_9,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..f23621bea5 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_9,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:05620d20cc1b9b9836a58e7ff80963692a5cc8fba63306a29e38eb7d4acd7bc9 +size 17914