diff --git a/.github/workflows/fork-pr-notice.yml b/.github/workflows/fork-pr-notice.yml index dd697915f7..42b1e54c3f 100644 --- a/.github/workflows/fork-pr-notice.yml +++ b/.github/workflows/fork-pr-notice.yml @@ -11,9 +11,10 @@ jobs: welcome: runs-on: ubuntu-latest name: Welcome comment + if: github.event.pull_request.fork != null steps: - name: Add auto-generated commit warning - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | github.rest.issues.createComment({ @@ -22,9 +23,9 @@ jobs: repo: context.repo.repo, body: `Thank you for your contribution! Here are a few things to check in the PR to ensure it's reviewed as quickly as possible: - - Your branch should be based on `origin/develop`, at least when it was created. - - There is a changelog entry in the `changelog.d` folder with [the Towncrier format](https://towncrier.readthedocs.io/en/latest/tutorial.html#creating-news-fragments). - - The test pass locally running `./gradlew test`. - - The code quality check suite pass locally running `./gradlew runQualityChecks`. - - If you modified anything related to the UI, including previews, you'll have to run the `Record screenshots` GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, **it will prevent the CI from running temporarily**, until you upload a new commit after that one. To do so, just pull the latest changes and push [an empty commit](https://coderwall.com/p/vkdekq/git-commit-allow-empty).` + - Your branch should be based on \`origin/develop\`, at least when it was created. + - There is a changelog entry in the \`changelog.d\` folder with [the Towncrier format](https://towncrier.readthedocs.io/en/latest/tutorial.html#creating-news-fragments). + - The test pass locally running \`./gradlew test\`. + - The code quality check suite pass locally running \`./gradlew runQualityChecks\`. + - If you modified anything related to the UI, including previews, you'll have to run the \`Record screenshots\` GH action in your forked repo: that will generate compatible new screenshots. However, given Github Actions limitations, **it will prevent the CI from running temporarily**, until you upload a new commit after that one. To do so, just pull the latest changes and push [an empty commit](https://coderwall.com/p/vkdekq/git-commit-allow-empty).` }) diff --git a/.github/workflows/maestro.yml b/.github/workflows/maestro.yml index 3b52235fb5..0e2dc74b92 100644 --- a/.github/workflows/maestro.yml +++ b/.github/workflows/maestro.yml @@ -24,31 +24,31 @@ jobs: cancel-in-progress: true steps: - name: Remove Run-Maestro label - if: ${{ !github.event.pull_request.fork && github.event.label.name == 'Run-Maestro' }} + if: ${{ github.event_name == 'pull_request' && github.event.label.name == 'Run-Maestro' }} uses: actions-ecosystem/action-remove-labels@v1 with: labels: Run-Maestro - uses: actions/checkout@v4 - if: ${{ !github.event.pull_request.fork }} + if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch' with: # Ensure we are building the branch and not the branch after being merged on develop # https://github.com/actions/checkout/issues/881 ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} - uses: actions/setup-java@v4 name: Use JDK 17 - if: ${{ !github.event.pull_request.fork }} + if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch' with: distribution: 'temurin' # See 'Supported distributions' for available options java-version: '17' - name: Assemble debug APK run: ./gradlew :app:assembleDebug $CI_GRADLE_ARG_PROPERTIES - if: ${{ !github.event.pull_request.fork }} + if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch' env: ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }} ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }} ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }} - uses: mobile-dev-inc/action-maestro-cloud@v1.8.0 - if: ${{ !github.event.pull_request.fork }} + if: (github.event_name == 'pull_request' && github.event.pull_request.fork == null) || github.event_name == 'workflow_dispatch' with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} # Doc says (https://github.com/mobile-dev-inc/action-maestro-cloud#android): diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 949ccfce40..52929a81cf 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -10,6 +10,9 @@ -keep class com.sun.jna.** { *; } -keep class * implements com.sun.jna.** { *; } +# TagSoup, coming from the RTE library +-keep class org.ccil.cowan.tagsoup.** { *; } + # kotlinx.serialization # Kotlin serialization looks up the generated serializer classes through a function on companion diff --git a/changelog.d/1949.bugfix b/changelog.d/1949.bugfix new file mode 100644 index 0000000000..a49aff7545 --- /dev/null +++ b/changelog.d/1949.bugfix @@ -0,0 +1 @@ +Make sure the media viewer tries the main url first (if not empty) then the thumbnail url and then not open if both are missing instead of failing with an error dialog diff --git a/changelog.d/2099.bugfix b/changelog.d/2099.bugfix new file mode 100644 index 0000000000..f80120ae0d --- /dev/null +++ b/changelog.d/2099.bugfix @@ -0,0 +1 @@ +Trim whitespace at the end of messages to ensure we render the right content. diff --git a/changelog.d/2105.bugfix b/changelog.d/2105.bugfix new file mode 100644 index 0000000000..337b192aad --- /dev/null +++ b/changelog.d/2105.bugfix @@ -0,0 +1 @@ +Fix crashes in room list when the last message for a room was an extremely long one (several thousands of characters) with no line breaks. diff --git a/changelog.d/2127.misc b/changelog.d/2127.misc new file mode 100644 index 0000000000..dfebf620ac --- /dev/null +++ b/changelog.d/2127.misc @@ -0,0 +1 @@ +Remove extra previews for timestamp view with 'document' case diff --git a/changelog.d/2142.misc b/changelog.d/2142.misc new file mode 100644 index 0000000000..566fa41040 --- /dev/null +++ b/changelog.d/2142.misc @@ -0,0 +1 @@ +Bump AGP version to 8.2.0 diff --git a/changelog.d/2155.bugfix b/changelog.d/2155.bugfix new file mode 100644 index 0000000000..cc868cdaee --- /dev/null +++ b/changelog.d/2155.bugfix @@ -0,0 +1 @@ +Use `SubomposeLayout` for `ContentAvoidingLayout` to prevent wrong measurements in the layout process, leading to cut-off text messages in the timeline. diff --git a/changelog.d/2159.feature b/changelog.d/2159.feature new file mode 100644 index 0000000000..5adbf5595f --- /dev/null +++ b/changelog.d/2159.feature @@ -0,0 +1 @@ +Added support for MSC4027 (render custom images in reactions) diff --git a/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenPresenter.kt b/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenPresenter.kt index 6883ebeb61..d43557c6b1 100644 --- a/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenPresenter.kt +++ b/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenPresenter.kt @@ -34,7 +34,7 @@ import io.element.android.features.call.data.WidgetMessage import io.element.android.features.call.utils.CallWidgetProvider import io.element.android.features.call.utils.WidgetMessageInterceptor import io.element.android.features.call.utils.WidgetMessageSerializer -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.coroutine.CoroutineDispatchers @@ -75,7 +75,7 @@ class CallScreenPresenter @AssistedInject constructor( @Composable override fun present(): CallScreenState { val coroutineScope = rememberCoroutineScope() - val urlState = remember { mutableStateOf>(Async.Uninitialized) } + val urlState = remember { mutableStateOf>(AsyncData.Uninitialized) } val callWidgetDriver = remember { mutableStateOf(null) } val messageInterceptor = remember { mutableStateOf(null) } var isJoinedCall by rememberSaveable { mutableStateOf(false) } @@ -154,7 +154,7 @@ class CallScreenPresenter @AssistedInject constructor( private fun CoroutineScope.loadUrl( inputs: CallType, - urlState: MutableState>, + urlState: MutableState>, callWidgetDriver: MutableState, ) = launch { urlState.runCatchingUpdatingState { diff --git a/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenState.kt b/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenState.kt index 12cd7612ae..76926bfb9f 100644 --- a/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenState.kt +++ b/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenState.kt @@ -16,10 +16,10 @@ package io.element.android.features.call.ui -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData data class CallScreenState( - val urlState: Async, + val urlState: AsyncData, val userAgent: String, val isInWidgetMode: Boolean, val eventSink: (CallScreenEvents) -> Unit, diff --git a/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenView.kt b/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenView.kt index f2c8a0cb93..c28bacf88a 100644 --- a/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenView.kt +++ b/features/call/src/main/kotlin/io/element/android/features/call/ui/CallScreenView.kt @@ -36,7 +36,7 @@ import androidx.compose.ui.viewinterop.AndroidView import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.call.R import io.element.android.features.call.utils.WebViewWidgetMessageInterceptor -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -96,7 +96,7 @@ internal fun CallScreenView( @Composable private fun CallWebView( - url: Async, + url: AsyncData, userAgent: String, onPermissionsRequested: (PermissionRequest) -> Unit, onWebViewCreated: (WebView) -> Unit, @@ -116,7 +116,7 @@ private fun CallWebView( } }, update = { webView -> - if (url is Async.Success && webView.url != url.data) { + if (url is AsyncData.Success && webView.url != url.data) { webView.loadUrl(url.data) } }, @@ -161,7 +161,7 @@ internal fun CallScreenViewPreview() { ElementPreview { CallScreenView( state = CallScreenState( - urlState = Async.Success("https://call.element.io/some-actual-call?with=parameters"), + urlState = AsyncData.Success("https://call.element.io/some-actual-call?with=parameters"), isInWidgetMode = false, userAgent = "", eventSink = {}, diff --git a/features/call/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt b/features/call/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt index 77f83de209..2b5365118e 100644 --- a/features/call/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt +++ b/features/call/src/test/kotlin/io/element/android/features/call/ui/CallScreenPresenterTest.kt @@ -23,7 +23,7 @@ import com.google.common.truth.Truth.assertThat import io.element.android.features.call.CallType import io.element.android.features.call.utils.FakeCallWidgetProvider import io.element.android.features.call.utils.FakeWidgetMessageInterceptor -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.matrix.api.sync.SyncState import io.element.android.libraries.matrix.test.A_ROOM_ID @@ -62,7 +62,7 @@ class CallScreenPresenterTest { skipItems(1) val initialState = awaitItem() - assertThat(initialState.urlState).isEqualTo(Async.Success("https://call.element.io")) + assertThat(initialState.urlState).isEqualTo(AsyncData.Success("https://call.element.io")) assertThat(initialState.isInWidgetMode).isFalse() } } @@ -83,7 +83,7 @@ class CallScreenPresenterTest { skipItems(1) val initialState = awaitItem() - assertThat(initialState.urlState).isInstanceOf(Async.Success::class.java) + assertThat(initialState.urlState).isInstanceOf(AsyncData.Success::class.java) assertThat(initialState.isInWidgetMode).isTrue() assertThat(widgetProvider.getWidgetCalled).isTrue() assertThat(widgetDriver.runCalledCount).isEqualTo(1) diff --git a/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/StartDMAction.kt b/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/StartDMAction.kt index ef95f15dce..baacfa79dc 100644 --- a/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/StartDMAction.kt +++ b/features/createroom/api/src/main/kotlin/io/element/android/features/createroom/api/StartDMAction.kt @@ -17,7 +17,7 @@ package io.element.android.features.createroom.api import androidx.compose.runtime.MutableState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId @@ -27,5 +27,5 @@ interface StartDMAction { * @param userId The user to start a DM with. * @param actionState The state to update with the result of the action. */ - suspend fun execute(userId: UserId, actionState: MutableState>) + suspend fun execute(userId: UserId, actionState: MutableState>) } diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultStartDMAction.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultStartDMAction.kt index 7145ac671e..c941c41958 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultStartDMAction.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultStartDMAction.kt @@ -20,7 +20,7 @@ import androidx.compose.runtime.MutableState import com.squareup.anvil.annotations.ContributesBinding import im.vector.app.features.analytics.plan.CreatedRoom import io.element.android.features.createroom.api.StartDMAction -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.api.MatrixClient import io.element.android.libraries.matrix.api.core.RoomId @@ -36,17 +36,17 @@ class DefaultStartDMAction @Inject constructor( private val analyticsService: AnalyticsService, ) : StartDMAction { - override suspend fun execute(userId: UserId, actionState: MutableState>) { - actionState.value = Async.Loading() + override suspend fun execute(userId: UserId, actionState: MutableState>) { + actionState.value = AsyncAction.Loading when (val result = matrixClient.startDM(userId)) { is StartDMResult.Success -> { if (result.isNew) { analyticsService.capture(CreatedRoom(isDM = true)) } - actionState.value = Async.Success(result.roomId) + actionState.value = AsyncAction.Success(result.roomId) } is StartDMResult.Failure -> { - actionState.value = Async.Failure(result.throwable) + actionState.value = AsyncAction.Failure(result.throwable) } } } diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt index 4cefa82a31..6e077c6e50 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenter.kt @@ -29,7 +29,7 @@ import androidx.compose.runtime.rememberCoroutineScope import im.vector.app.features.analytics.plan.CreatedRoom import io.element.android.features.createroom.impl.CreateRoomConfig import io.element.android.features.createroom.impl.CreateRoomDataStore -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.mimetype.MimeTypes @@ -91,10 +91,10 @@ class ConfigureRoomPresenter @Inject constructor( } val localCoroutineScope = rememberCoroutineScope() - val createRoomAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val createRoomAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } fun createRoom(config: CreateRoomConfig) { - createRoomAction.value = Async.Uninitialized + createRoomAction.value = AsyncAction.Uninitialized localCoroutineScope.createRoom(config, createRoomAction) } @@ -118,7 +118,7 @@ class ConfigureRoomPresenter @Inject constructor( } } - ConfigureRoomEvents.CancelCreateRoom -> createRoomAction.value = Async.Uninitialized + ConfigureRoomEvents.CancelCreateRoom -> createRoomAction.value = AsyncAction.Uninitialized } } @@ -133,7 +133,7 @@ class ConfigureRoomPresenter @Inject constructor( private fun CoroutineScope.createRoom( config: CreateRoomConfig, - createRoomAction: MutableState> + createRoomAction: MutableState> ) = launch { suspend { val avatarUrl = config.avatarUri?.let { uploadAvatar(it) } diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomState.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomState.kt index 7e16cedaa7..f275a0e217 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomState.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomState.kt @@ -16,17 +16,17 @@ package io.element.android.features.createroom.impl.configureroom -import io.element.android.libraries.matrix.ui.media.AvatarAction import io.element.android.features.createroom.impl.CreateRoomConfig -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.RoomId +import io.element.android.libraries.matrix.ui.media.AvatarAction import io.element.android.libraries.permissions.api.PermissionsState import kotlinx.collections.immutable.ImmutableList data class ConfigureRoomState( val config: CreateRoomConfig, val avatarActions: ImmutableList, - val createRoomAction: Async, + val createRoomAction: AsyncAction, val cameraPermissionState: PermissionsState, val eventSink: (ConfigureRoomEvents) -> Unit ) { diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomStateProvider.kt index eafbe6915b..1065f746e0 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomStateProvider.kt @@ -19,7 +19,7 @@ package io.element.android.features.createroom.impl.configureroom import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.createroom.impl.CreateRoomConfig import io.element.android.features.createroom.impl.userlist.aListOfSelectedUsers -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.permissions.api.aPermissionsState import kotlinx.collections.immutable.persistentListOf @@ -41,7 +41,7 @@ open class ConfigureRoomStateProvider : PreviewParameterProvider> = remember { mutableStateOf(Async.Uninitialized) } + val startDmActionState: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } fun handleEvents(event: CreateRoomRootEvents) { when (event) { is CreateRoomRootEvents.StartDM -> localCoroutineScope.launch { startDMAction.execute(event.matrixUser.userId, startDmActionState) } - CreateRoomRootEvents.CancelStartDM -> startDmActionState.value = Async.Uninitialized + CreateRoomRootEvents.CancelStartDM -> startDmActionState.value = AsyncAction.Uninitialized } } diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt index 02f64a6c86..185c08c131 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootState.kt @@ -17,12 +17,12 @@ package io.element.android.features.createroom.impl.root import io.element.android.features.createroom.impl.userlist.UserListState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.RoomId data class CreateRoomRootState( val applicationName: String, val userListState: UserListState, - val startDmAction: Async, + val startDmAction: AsyncAction, val eventSink: (CreateRoomRootEvents) -> Unit, ) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt index 7a3bf6ef03..59980b7561 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootStateProvider.kt @@ -18,8 +18,8 @@ package io.element.android.features.createroom.impl.root import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.createroom.impl.userlist.aUserListState +import io.element.android.libraries.architecture.AsyncAction -import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.ui.components.aMatrixUser import io.element.android.libraries.usersearch.api.UserSearchResult @@ -30,7 +30,7 @@ open class CreateRoomRootStateProvider : PreviewParameterProvider>(Async.Uninitialized) + val state = mutableStateOf>(AsyncAction.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(Async.Success(A_ROOM_ID)) + assertThat(state.value).isEqualTo(AsyncAction.Success(A_ROOM_ID)) } @Test @@ -52,9 +52,9 @@ class DefaultStartDMActionTests { } val analyticsService = FakeAnalyticsService() val action = createStartDMAction(matrixClient, analyticsService) - val state = mutableStateOf>(Async.Uninitialized) + val state = mutableStateOf>(AsyncAction.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(Async.Success(A_ROOM_ID)) + assertThat(state.value).isEqualTo(AsyncAction.Success(A_ROOM_ID)) assertThat(analyticsService.capturedEvents).containsExactly(CreatedRoom(isDM = true)) } @@ -65,9 +65,9 @@ class DefaultStartDMActionTests { givenCreateDmResult(Result.failure(A_THROWABLE)) } val action = createStartDMAction(matrixClient) - val state = mutableStateOf>(Async.Uninitialized) + val state = mutableStateOf>(AsyncAction.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(state.value).isEqualTo(AsyncAction.Failure(A_THROWABLE)) } private fun createStartDMAction( diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenterTests.kt index 96935ed598..1834c0aee7 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomPresenterTests.kt @@ -25,7 +25,7 @@ import im.vector.app.features.analytics.plan.CreatedRoom import io.element.android.features.createroom.impl.CreateRoomConfig import io.element.android.features.createroom.impl.CreateRoomDataStore import io.element.android.features.createroom.impl.userlist.UserListDataStore -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.test.AN_AVATAR_URL import io.element.android.libraries.matrix.test.A_MESSAGE @@ -234,9 +234,9 @@ class ConfigureRoomPresenterTests { fakeMatrixClient.givenCreateRoomResult(createRoomResult) initialState.eventSink(ConfigureRoomEvents.CreateRoom(initialState.config)) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(Async.Success::class.java) + assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncAction.Success::class.java) assertThat(stateAfterCreateRoom.createRoomAction.dataOrNull()).isEqualTo(createRoomResult.getOrNull()) } } @@ -272,16 +272,16 @@ class ConfigureRoomPresenterTests { val initialState = awaitItem() initialState.eventSink(ConfigureRoomEvents.CreateRoom(initialState.config)) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(Async.Failure::class.java) + assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncAction.Failure::class.java) assertThat(fakeAnalyticsService.capturedEvents.filterIsInstance()).isEmpty() fakeMatrixClient.givenUploadMediaResult(Result.success(AN_AVATAR_URL)) stateAfterCreateRoom.eventSink(ConfigureRoomEvents.CreateRoom(initialState.config)) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Uninitialized::class.java) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Loading::class.java) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Success::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Uninitialized::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Success::class.java) } } @@ -297,22 +297,22 @@ class ConfigureRoomPresenterTests { // Create initialState.eventSink(ConfigureRoomEvents.CreateRoom(initialState.config)) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(Async.Failure::class.java) - assertThat((stateAfterCreateRoom.createRoomAction as? Async.Failure)?.error).isEqualTo(createRoomResult.exceptionOrNull()) + assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncAction.Failure::class.java) + assertThat((stateAfterCreateRoom.createRoomAction as? AsyncAction.Failure)?.error).isEqualTo(createRoomResult.exceptionOrNull()) // Retry stateAfterCreateRoom.eventSink(ConfigureRoomEvents.CreateRoom(initialState.config)) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Uninitialized::class.java) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Uninitialized::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterRetry = awaitItem() - assertThat(stateAfterRetry.createRoomAction).isInstanceOf(Async.Failure::class.java) - assertThat((stateAfterRetry.createRoomAction as? Async.Failure)?.error).isEqualTo(createRoomResult.exceptionOrNull()) + assertThat(stateAfterRetry.createRoomAction).isInstanceOf(AsyncAction.Failure::class.java) + assertThat((stateAfterRetry.createRoomAction as? AsyncAction.Failure)?.error).isEqualTo(createRoomResult.exceptionOrNull()) // Cancel stateAfterRetry.eventSink(ConfigureRoomEvents.CancelCreateRoom) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Uninitialized::class.java) } } } diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt index a0fb71dd31..63241a3a50 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootPresenterTests.kt @@ -25,8 +25,7 @@ import io.element.android.features.createroom.impl.userlist.FakeUserListPresente import io.element.android.features.createroom.impl.userlist.FakeUserListPresenterFactory import io.element.android.features.createroom.impl.userlist.UserListDataStore import io.element.android.features.createroom.test.FakeStartDMAction -import io.element.android.libraries.architecture.Async -import io.element.android.libraries.matrix.api.core.RoomId +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.test.A_ROOM_ID @@ -52,20 +51,20 @@ class CreateRoomRootPresenterTests { }.test { val initialState = awaitItem() - assertThat(initialState.startDmAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(initialState.startDmAction).isInstanceOf(AsyncAction.Uninitialized::class.java) assertThat(initialState.applicationName).isEqualTo(aBuildMeta().applicationName) assertThat(initialState.userListState.selectedUsers).isEmpty() assertThat(initialState.userListState.isSearchActive).isFalse() assertThat(initialState.userListState.isMultiSelectionEnabled).isFalse() val matrixUser = MatrixUser(UserId("@name:domain")) - val startDMSuccessResult = Async.Success(A_ROOM_ID) - val startDMFailureResult = Async.Failure(A_THROWABLE) + val startDMSuccessResult = AsyncAction.Success(A_ROOM_ID) + val startDMFailureResult = AsyncAction.Failure(A_THROWABLE) // Failure startDMAction.givenExecuteResult(startDMFailureResult) initialState.eventSink(CreateRoomRootEvents.StartDM(matrixUser)) - assertThat(awaitItem().startDmAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmAction).isInstanceOf(AsyncAction.Loading::class.java) awaitItem().also { state -> assertThat(state.startDmAction).isEqualTo(startDMFailureResult) state.eventSink(CreateRoomRootEvents.CancelStartDM) @@ -74,10 +73,10 @@ class CreateRoomRootPresenterTests { // Success startDMAction.givenExecuteResult(startDMSuccessResult) awaitItem().also { state -> - assertThat(state.startDmAction).isEqualTo(Async.Uninitialized) + assertThat(state.startDmAction).isEqualTo(AsyncAction.Uninitialized) state.eventSink(CreateRoomRootEvents.StartDM(matrixUser)) } - assertThat(awaitItem().startDmAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmAction).isInstanceOf(AsyncAction.Loading::class.java) awaitItem().also { state -> assertThat(state.startDmAction).isEqualTo(startDMSuccessResult) } diff --git a/features/createroom/test/src/main/kotlin/io/element/android/features/createroom/test/FakeStartDMAction.kt b/features/createroom/test/src/main/kotlin/io/element/android/features/createroom/test/FakeStartDMAction.kt index c1888dc53f..9e96f68fc3 100644 --- a/features/createroom/test/src/main/kotlin/io/element/android/features/createroom/test/FakeStartDMAction.kt +++ b/features/createroom/test/src/main/kotlin/io/element/android/features/createroom/test/FakeStartDMAction.kt @@ -18,7 +18,7 @@ package io.element.android.features.createroom.test import androidx.compose.runtime.MutableState import io.element.android.features.createroom.api.StartDMAction -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.test.A_ROOM_ID @@ -26,14 +26,14 @@ import kotlinx.coroutines.delay class FakeStartDMAction : StartDMAction { - private var executeResult: Async = Async.Success(A_ROOM_ID) + private var executeResult: AsyncAction = AsyncAction.Success(A_ROOM_ID) - fun givenExecuteResult(result: Async) { + fun givenExecuteResult(result: AsyncAction) { executeResult = result } - override suspend fun execute(userId: UserId, actionState: MutableState>) { - actionState.value = Async.Loading() + override suspend fun execute(userId: UserId, actionState: MutableState>) { + actionState.value = AsyncAction.Loading delay(1) actionState.value = executeResult } 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..403f312a22 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 @@ -29,7 +29,7 @@ import im.vector.app.features.analytics.plan.JoinedRoom import io.element.android.features.invitelist.api.SeenInvitesStore import io.element.android.features.invitelist.impl.model.InviteListInviteSummary import io.element.android.features.invitelist.impl.model.InviteSender -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.designsystem.components.avatar.AvatarData @@ -77,14 +77,14 @@ class InviteListPresenter @Inject constructor( } val localCoroutineScope = rememberCoroutineScope() - val acceptedAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } - val declinedAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val acceptedAction: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } + val declinedAction: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } val decliningInvite: MutableState = remember { mutableStateOf(null) } fun handleEvent(event: InviteListEvents) { when (event) { is InviteListEvents.AcceptInvite -> { - acceptedAction.value = Async.Uninitialized + acceptedAction.value = AsyncData.Uninitialized localCoroutineScope.acceptInvite(event.invite.roomId, acceptedAction) } @@ -93,7 +93,7 @@ class InviteListPresenter @Inject constructor( } is InviteListEvents.ConfirmDeclineInvite -> { - declinedAction.value = Async.Uninitialized + declinedAction.value = AsyncData.Uninitialized decliningInvite.value?.let { localCoroutineScope.declineInvite(it.roomId, declinedAction) } @@ -105,11 +105,11 @@ class InviteListPresenter @Inject constructor( } is InviteListEvents.DismissAcceptError -> { - acceptedAction.value = Async.Uninitialized + acceptedAction.value = AsyncData.Uninitialized } is InviteListEvents.DismissDeclineError -> { - declinedAction.value = Async.Uninitialized + declinedAction.value = AsyncData.Uninitialized } } } @@ -137,7 +137,7 @@ class InviteListPresenter @Inject constructor( ) } - private fun CoroutineScope.acceptInvite(roomId: RoomId, acceptedAction: MutableState>) = launch { + private fun CoroutineScope.acceptInvite(roomId: RoomId, acceptedAction: MutableState>) = launch { suspend { client.getRoom(roomId)?.use { it.join().getOrThrow() @@ -148,7 +148,7 @@ class InviteListPresenter @Inject constructor( }.runCatchingUpdatingState(acceptedAction) } - private fun CoroutineScope.declineInvite(roomId: RoomId, declinedAction: MutableState>) = launch { + private fun CoroutineScope.declineInvite(roomId: RoomId, declinedAction: MutableState>) = launch { suspend { client.getRoom(roomId)?.use { it.leave().getOrThrow() diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListState.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListState.kt index 43644cd6aa..b576861475 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListState.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListState.kt @@ -18,7 +18,7 @@ package io.element.android.features.invitelist.impl import androidx.compose.runtime.Immutable import io.element.android.features.invitelist.impl.model.InviteListInviteSummary -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.RoomId import kotlinx.collections.immutable.ImmutableList @@ -26,8 +26,8 @@ import kotlinx.collections.immutable.ImmutableList data class InviteListState( val inviteList: ImmutableList, val declineConfirmationDialog: InviteDeclineConfirmationDialog, - val acceptedAction: Async, - val declinedAction: Async, + val acceptedAction: AsyncData, + val declinedAction: AsyncData, val eventSink: (InviteListEvents) -> Unit ) diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListStateProvider.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListStateProvider.kt index f187398689..e61bd9ff93 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListStateProvider.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListStateProvider.kt @@ -19,7 +19,7 @@ package io.element.android.features.invitelist.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.invitelist.impl.model.InviteListInviteSummary import io.element.android.features.invitelist.impl.model.InviteSender -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId import kotlinx.collections.immutable.ImmutableList @@ -32,16 +32,16 @@ open class InviteListStateProvider : PreviewParameterProvider { aInviteListState().copy(inviteList = persistentListOf()), aInviteListState().copy(declineConfirmationDialog = InviteDeclineConfirmationDialog.Visible(true, "Alice")), aInviteListState().copy(declineConfirmationDialog = InviteDeclineConfirmationDialog.Visible(false, "Some Room")), - aInviteListState().copy(acceptedAction = Async.Failure(Throwable("Whoops"))), - aInviteListState().copy(declinedAction = Async.Failure(Throwable("Whoops"))), + aInviteListState().copy(acceptedAction = AsyncData.Failure(Throwable("Whoops"))), + aInviteListState().copy(declinedAction = AsyncData.Failure(Throwable("Whoops"))), ) } internal fun aInviteListState() = InviteListState( inviteList = aInviteListInviteSummaryList(), declineConfirmationDialog = InviteDeclineConfirmationDialog.Hidden, - acceptedAction = Async.Uninitialized, - declinedAction = Async.Uninitialized, + acceptedAction = AsyncData.Uninitialized, + declinedAction = AsyncData.Uninitialized, eventSink = {}, ) diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListView.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListView.kt index c831024448..3a804de7bc 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListView.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListView.kt @@ -35,7 +35,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.features.invitelist.impl.components.InviteSummaryRow -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog @@ -56,7 +56,7 @@ fun InviteListView( onInviteAccepted: (RoomId) -> Unit, modifier: Modifier = Modifier, ) { - if (state.acceptedAction is Async.Success) { + if (state.acceptedAction is AsyncData.Success) { LaunchedEffect(state.acceptedAction) { onInviteAccepted(state.acceptedAction.data) } @@ -89,7 +89,7 @@ fun InviteListView( ) } - if (state.acceptedAction is Async.Failure) { + if (state.acceptedAction is AsyncData.Failure) { ErrorDialog( content = stringResource(CommonStrings.error_unknown), title = stringResource(CommonStrings.common_error), @@ -98,7 +98,7 @@ fun InviteListView( ) } - if (state.declinedAction is Async.Failure) { + if (state.declinedAction is AsyncData.Failure) { ErrorDialog( content = stringResource(CommonStrings.error_unknown), title = stringResource(CommonStrings.common_error), 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..a3bafdb034 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 @@ -22,7 +22,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.invitelist.api.SeenInvitesStore import io.element.android.features.invitelist.test.FakeSeenInvitesStore -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize import io.element.android.libraries.matrix.api.MatrixClient @@ -245,7 +245,7 @@ class InviteListPresenterTests { val newState = awaitItem() - assertThat(newState.declinedAction).isEqualTo(Async.Failure(ex)) + assertThat(newState.declinedAction).isEqualTo(AsyncData.Failure(ex)) } } @@ -277,7 +277,7 @@ class InviteListPresenterTests { val newState = awaitItem() - assertThat(newState.declinedAction).isEqualTo(Async.Uninitialized) + assertThat(newState.declinedAction).isEqualTo(AsyncData.Uninitialized) } } @@ -300,7 +300,7 @@ class InviteListPresenterTests { val newState = awaitItem() - assertThat(newState.acceptedAction).isEqualTo(Async.Success(A_ROOM_ID)) + assertThat(newState.acceptedAction).isEqualTo(AsyncData.Success(A_ROOM_ID)) assertThat(fakeNotificationDrawerManager.getClearMembershipNotificationForRoomCount(client.sessionId, A_ROOM_ID)).isEqualTo(1) } } @@ -323,7 +323,7 @@ class InviteListPresenterTests { val originalState = awaitItem() originalState.eventSink(InviteListEvents.AcceptInvite(originalState.inviteList[0])) - assertThat(awaitItem().acceptedAction).isEqualTo(Async.Failure(ex)) + assertThat(awaitItem().acceptedAction).isEqualTo(AsyncData.Failure(ex)) } } @@ -350,7 +350,7 @@ class InviteListPresenterTests { originalState.eventSink(InviteListEvents.DismissAcceptError) val newState = awaitItem() - assertThat(newState.acceptedAction).isEqualTo(Async.Uninitialized) + assertThat(newState.acceptedAction).isEqualTo(AsyncData.Uninitialized) } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt index 1b5ce80085..5fe7fdddde 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenter.kt @@ -29,7 +29,7 @@ import io.element.android.features.lockscreen.impl.biometric.BiometricUnlockMana import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.pin.model.PinEntry import io.element.android.features.lockscreen.impl.unlock.keypad.PinKeypadModel -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.bool.orFalse @@ -49,11 +49,11 @@ class PinUnlockPresenter @Inject constructor( @Composable override fun present(): PinUnlockState { val pinEntryState = remember { - mutableStateOf>(Async.Uninitialized) + mutableStateOf>(AsyncData.Uninitialized) } val pinEntry by pinEntryState var remainingAttempts by remember { - mutableStateOf>(Async.Uninitialized) + mutableStateOf>(AsyncData.Uninitialized) } var showWrongPinTitle by rememberSaveable { mutableStateOf(false) @@ -62,7 +62,7 @@ class PinUnlockPresenter @Inject constructor( mutableStateOf(false) } val signOutAction = remember { - mutableStateOf>(Async.Uninitialized) + mutableStateOf>(AsyncData.Uninitialized) } var biometricUnlockResult by remember { mutableStateOf(null) @@ -91,7 +91,7 @@ class PinUnlockPresenter @Inject constructor( } } val remainingAttemptsNumber = pinCodeManager.getRemainingPinCodeAttemptsNumber() - remainingAttempts = Async.Success(remainingAttemptsNumber) + remainingAttempts = AsyncData.Success(remainingAttemptsNumber) if (remainingAttemptsNumber == 0) { showSignOutPrompt = true } @@ -139,46 +139,46 @@ class PinUnlockPresenter @Inject constructor( ) } - private fun Async.isComplete(): Boolean { + private fun AsyncData.isComplete(): Boolean { return dataOrNull()?.isComplete().orFalse() } - private fun Async.toText(): String { + private fun AsyncData.toText(): String { return dataOrNull()?.toText() ?: "" } - private fun Async.clear(): Async { + private fun AsyncData.clear(): AsyncData { return when (this) { - is Async.Success -> Async.Success(data.clear()) + is AsyncData.Success -> AsyncData.Success(data.clear()) else -> this } } - private fun Async.process(pinKeypadModel: PinKeypadModel): Async { + private fun AsyncData.process(pinKeypadModel: PinKeypadModel): AsyncData { return when (this) { - is Async.Success -> { + is AsyncData.Success -> { val pinEntry = when (pinKeypadModel) { PinKeypadModel.Back -> data.deleteLast() is PinKeypadModel.Number -> data.addDigit(pinKeypadModel.number) PinKeypadModel.Empty -> data } - Async.Success(pinEntry) + AsyncData.Success(pinEntry) } else -> this } } - private fun Async.process(pinEntryAsText: String): Async { + private fun AsyncData.process(pinEntryAsText: String): AsyncData { return when (this) { - is Async.Success -> { + is AsyncData.Success -> { val pinEntry = data.fillWith(pinEntryAsText) - Async.Success(pinEntry) + AsyncData.Success(pinEntry) } else -> this } } - private fun CoroutineScope.signOut(signOutAction: MutableState>) = launch { + private fun CoroutineScope.signOut(signOutAction: MutableState>) = launch { suspend { matrixClient.logout(ignoreSdkError = true) }.runCatchingUpdatingState(signOutAction) diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt index 006234270c..ae381f7031 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockState.kt @@ -19,21 +19,21 @@ package io.element.android.features.lockscreen.impl.unlock import io.element.android.features.lockscreen.impl.biometric.BiometricUnlock import io.element.android.features.lockscreen.impl.biometric.BiometricUnlockError import io.element.android.features.lockscreen.impl.pin.model.PinEntry -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData data class PinUnlockState( - val pinEntry: Async, + val pinEntry: AsyncData, val showWrongPinTitle: Boolean, - val remainingAttempts: Async, + val remainingAttempts: AsyncData, val showSignOutPrompt: Boolean, - val signOutAction: Async, + val signOutAction: AsyncData, val showBiometricUnlock: Boolean, val isUnlocked: Boolean, val biometricUnlockResult: BiometricUnlock.AuthenticationResult?, val eventSink: (PinUnlockEvents) -> Unit ) { val isSignOutPromptCancellable = when (remainingAttempts) { - is Async.Success -> remainingAttempts.data > 0 + is AsyncData.Success -> remainingAttempts.data > 0 else -> true } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockStateProvider.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockStateProvider.kt index 02da0e0350..151c3079ee 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockStateProvider.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockStateProvider.kt @@ -19,7 +19,7 @@ package io.element.android.features.lockscreen.impl.unlock import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.lockscreen.impl.biometric.BiometricUnlock import io.element.android.features.lockscreen.impl.pin.model.PinEntry -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData open class PinUnlockStateProvider : PreviewParameterProvider { override val values: Sequence @@ -30,7 +30,7 @@ open class PinUnlockStateProvider : PreviewParameterProvider { aPinUnlockState(showSignOutPrompt = true), aPinUnlockState(showBiometricUnlock = false), aPinUnlockState(showSignOutPrompt = true, remainingAttempts = 0), - aPinUnlockState(signOutAction = Async.Loading()), + aPinUnlockState(signOutAction = AsyncData.Loading()), ) } @@ -42,11 +42,11 @@ fun aPinUnlockState( showBiometricUnlock: Boolean = true, biometricUnlockResult: BiometricUnlock.AuthenticationResult? = null, isUnlocked: Boolean = false, - signOutAction: Async = Async.Uninitialized, + signOutAction: AsyncData = AsyncData.Uninitialized, ) = PinUnlockState( - pinEntry = Async.Success(pinEntry), + pinEntry = AsyncData.Success(pinEntry), showWrongPinTitle = showWrongPinTitle, - remainingAttempts = Async.Success(remainingAttempts), + remainingAttempts = AsyncData.Success(remainingAttempts), showSignOutPrompt = showSignOutPrompt, showBiometricUnlock = showBiometricUnlock, signOutAction = signOutAction, diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockView.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockView.kt index 325a41c393..6c9fd2bb6e 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockView.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockView.kt @@ -56,7 +56,7 @@ import io.element.android.features.lockscreen.impl.components.PinEntryTextField import io.element.android.features.lockscreen.impl.pin.model.PinDigit import io.element.android.features.lockscreen.impl.pin.model.PinEntry import io.element.android.features.lockscreen.impl.unlock.keypad.PinKeypad -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.atoms.RoundedIconAtom import io.element.android.libraries.designsystem.components.ProgressDialog import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog @@ -92,7 +92,7 @@ fun PinUnlockView( onDismiss = { state.eventSink(PinUnlockEvents.ClearSignOutPrompt) }, ) } - if (state.signOutAction is Async.Loading) { + if (state.signOutAction is AsyncData.Loading) { ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content)) } if (state.showBiometricUnlockError) { @@ -335,7 +335,7 @@ private fun PinUnlockHeader( style = ElementTheme.typography.fontBodyMdRegular, color = subtitleColor, ) - if (!isInAppUnlock && state.pinEntry is Async.Success) { + if (!isInAppUnlock && state.pinEntry is AsyncData.Success) { Spacer(Modifier.height(24.dp)) PinDotsRow(state.pinEntry.data) } diff --git a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt index 87d673066d..1c1451f9bf 100644 --- a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt +++ b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/unlock/PinUnlockPresenterTest.kt @@ -28,7 +28,7 @@ import io.element.android.features.lockscreen.impl.pin.PinCodeManager import io.element.android.features.lockscreen.impl.pin.model.PinEntry import io.element.android.features.lockscreen.impl.pin.model.assertText import io.element.android.features.lockscreen.impl.unlock.keypad.PinKeypadModel -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.tests.testutils.awaitLastSequentialItem import io.element.android.tests.testutils.consumeItemsUntilPredicate @@ -48,15 +48,15 @@ class PinUnlockPresenterTest { presenter.present() }.test { awaitItem().also { state -> - assertThat(state.pinEntry).isInstanceOf(Async.Uninitialized::class.java) + assertThat(state.pinEntry).isInstanceOf(AsyncData.Uninitialized::class.java) assertThat(state.showWrongPinTitle).isFalse() assertThat(state.showSignOutPrompt).isFalse() assertThat(state.isUnlocked).isFalse() - assertThat(state.signOutAction).isInstanceOf(Async.Uninitialized::class.java) - assertThat(state.remainingAttempts).isInstanceOf(Async.Uninitialized::class.java) + assertThat(state.signOutAction).isInstanceOf(AsyncData.Uninitialized::class.java) + assertThat(state.remainingAttempts).isInstanceOf(AsyncData.Uninitialized::class.java) } consumeItemsUntilPredicate { - it.pinEntry is Async.Success && it.remainingAttempts is Async.Success + it.pinEntry is AsyncData.Success && it.remainingAttempts is AsyncData.Success }.last().also { state -> state.eventSink(PinUnlockEvents.OnPinKeypadPressed(PinKeypadModel.Number('1'))) state.eventSink(PinUnlockEvents.OnPinKeypadPressed(PinKeypadModel.Number('2'))) @@ -83,7 +83,7 @@ class PinUnlockPresenterTest { presenter.present() }.test { val initialState = consumeItemsUntilPredicate { - it.pinEntry is Async.Success && it.remainingAttempts is Async.Success + it.pinEntry is AsyncData.Success && it.remainingAttempts is AsyncData.Success }.last() val numberOfAttempts = initialState.remainingAttempts.dataOrNull() ?: 0 repeat(numberOfAttempts) { @@ -107,7 +107,7 @@ class PinUnlockPresenterTest { presenter.present() }.test { consumeItemsUntilPredicate { - it.pinEntry is Async.Success && it.remainingAttempts is Async.Success + it.pinEntry is AsyncData.Success && it.remainingAttempts is AsyncData.Success }.last().also { state -> state.eventSink(PinUnlockEvents.OnForgetPin) } @@ -125,12 +125,12 @@ class PinUnlockPresenterTest { state.eventSink(PinUnlockEvents.SignOut) } consumeItemsUntilPredicate { state -> - state.signOutAction is Async.Success + state.signOutAction is AsyncData.Success } } } - private fun Async.assertText(text: String) { + private fun AsyncData.assertText(text: String) { dataOrNull()?.assertText(text) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt index 726e241253..f360afbae2 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenter.kt @@ -24,7 +24,7 @@ import androidx.compose.runtime.rememberCoroutineScope import io.element.android.features.login.impl.accountprovider.AccountProvider import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource import io.element.android.features.login.impl.error.ChangeServerError -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService @@ -41,14 +41,14 @@ class ChangeServerPresenter @Inject constructor( override fun present(): ChangeServerState { val localCoroutineScope = rememberCoroutineScope() - val changeServerAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val changeServerAction: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } fun handleEvents(event: ChangeServerEvents) { when (event) { is ChangeServerEvents.ChangeServer -> localCoroutineScope.changeServer(event.accountProvider, changeServerAction) - ChangeServerEvents.ClearError -> changeServerAction.value = Async.Uninitialized + ChangeServerEvents.ClearError -> changeServerAction.value = AsyncData.Uninitialized } } @@ -60,7 +60,7 @@ class ChangeServerPresenter @Inject constructor( private fun CoroutineScope.changeServer( data: AccountProvider, - changeServerAction: MutableState>, + changeServerAction: MutableState>, ) = launch { suspend { authenticationService.setHomeserver(data.url).map { diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt index e49fa1f2fe..c5c8ba5417 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerState.kt @@ -16,9 +16,9 @@ package io.element.android.features.login.impl.changeserver -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData data class ChangeServerState( - val changeServerAction: Async, + val changeServerAction: AsyncData, val eventSink: (ChangeServerEvents) -> Unit ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt index 90c2bff455..014c3352ce 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.login.impl.changeserver import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData open class ChangeServerStateProvider : PreviewParameterProvider { override val values: Sequence @@ -27,6 +27,6 @@ open class ChangeServerStateProvider : PreviewParameterProvider { + is AsyncData.Failure -> { when (val error = state.changeServerAction.error) { is ChangeServerError.Error -> { ErrorDialog( @@ -60,11 +60,11 @@ fun ChangeServerView( } } } - is Async.Loading -> ProgressDialog() - is Async.Success -> LaunchedEffect(state.changeServerAction) { + is AsyncData.Loading -> ProgressDialog() + is AsyncData.Success -> LaunchedEffect(state.changeServerAction) { onDone() } - Async.Uninitialized -> Unit + AsyncData.Uninitialized -> Unit } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenter.kt index 66926b3734..0a6d999871 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenter.kt @@ -26,7 +26,7 @@ import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject import io.element.android.features.login.api.oidc.OidcAction -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.api.auth.OidcDetails @@ -44,33 +44,33 @@ class OidcPresenter @AssistedInject constructor( @Composable override fun present(): OidcState { - var requestState: Async by remember { - mutableStateOf(Async.Uninitialized) + var requestState: AsyncAction by remember { + mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() fun handleCancel() { - requestState = Async.Loading() + requestState = AsyncAction.Loading localCoroutineScope.launch { authenticationService.cancelOidcLogin() .fold( onSuccess = { // Then go back - requestState = Async.Success(Unit) + requestState = AsyncAction.Success(Unit) }, onFailure = { - requestState = Async.Failure(it) + requestState = AsyncAction.Failure(it) } ) } } fun handleSuccess(url: String) { - requestState = Async.Loading() + requestState = AsyncAction.Loading localCoroutineScope.launch { authenticationService.loginWithOidc(url) .onFailure { - requestState = Async.Failure(it) + requestState = AsyncAction.Failure(it) } // On success, the node tree will be updated, there is nothing to do } @@ -87,7 +87,7 @@ class OidcPresenter @AssistedInject constructor( when (event) { OidcEvents.Cancel -> handleCancel() is OidcEvents.OidcActionEvent -> handleAction(event.oidcAction) - OidcEvents.ClearError -> requestState = Async.Uninitialized + OidcEvents.ClearError -> requestState = AsyncAction.Uninitialized } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcState.kt index fc9507a89d..dc4f26d51e 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcState.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcState.kt @@ -16,11 +16,11 @@ package io.element.android.features.login.impl.oidc.webview -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.auth.OidcDetails data class OidcState( val oidcDetails: OidcDetails, - val requestState: Async, + val requestState: AsyncAction, val eventSink: (OidcEvents) -> Unit ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcStateProvider.kt index 80878cf8f8..5d44657462 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcStateProvider.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcStateProvider.kt @@ -17,20 +17,20 @@ package io.element.android.features.login.impl.oidc.webview import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.auth.OidcDetails open class OidcStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aOidcState(), - aOidcState().copy(requestState = Async.Loading()), + aOidcState().copy(requestState = AsyncAction.Loading), ) } fun aOidcState() = OidcState( oidcDetails = aOidcDetails(), - requestState = Async.Uninitialized, + requestState = AsyncAction.Uninitialized, eventSink = {} ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcView.kt index 66e3b31496..fb86ae18a5 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcView.kt @@ -30,7 +30,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.viewinterop.AndroidView import io.element.android.features.login.impl.oidc.OidcUrlParser import io.element.android.libraries.core.bool.orFalse -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -76,7 +76,7 @@ fun OidcView( } ) - AsyncView( + AsyncActionView( async = state.requestState, onSuccess = { onNavigateBack() }, onErrorDismiss = { state.eventSink(OidcEvents.ClearError) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt index 21896e4408..82c11047a3 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenter.kt @@ -32,7 +32,7 @@ import io.element.android.features.login.impl.DefaultLoginUserStory import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource import io.element.android.features.login.impl.error.ChangeServerError import io.element.android.features.login.impl.oidc.customtab.DefaultOidcActionFlow -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService @@ -61,8 +61,8 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor( val accountProvider by accountProviderDataSource.flow().collectAsState() val localCoroutineScope = rememberCoroutineScope() - val loginFlowAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val loginFlowAction: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } LaunchedEffect(Unit) { @@ -78,7 +78,7 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor( ConfirmAccountProviderEvents.Continue -> { localCoroutineScope.submit(accountProvider.url, loginFlowAction) } - ConfirmAccountProviderEvents.ClearError -> loginFlowAction.value = Async.Uninitialized + ConfirmAccountProviderEvents.ClearError -> loginFlowAction.value = AsyncData.Uninitialized } } @@ -92,7 +92,7 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor( private fun CoroutineScope.submit( homeserverUrl: String, - loginFlowAction: MutableState>, + loginFlowAction: MutableState>, ) = launch { suspend { authenticationService.setHomeserver(homeserverUrl).map { @@ -111,17 +111,17 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor( private suspend fun onOidcAction( oidcAction: OidcAction, - loginFlowAction: MutableState>, + loginFlowAction: MutableState>, ) { - loginFlowAction.value = Async.Loading() + loginFlowAction.value = AsyncData.Loading() when (oidcAction) { OidcAction.GoBack -> { authenticationService.cancelOidcLogin() .onSuccess { - loginFlowAction.value = Async.Uninitialized + loginFlowAction.value = AsyncData.Uninitialized } .onFailure { failure -> - loginFlowAction.value = Async.Failure(failure) + loginFlowAction.value = AsyncData.Failure(failure) } } is OidcAction.Success -> { @@ -130,7 +130,7 @@ class ConfirmAccountProviderPresenter @AssistedInject constructor( defaultLoginUserStory.setLoginFlowIsDone(true) } .onFailure { failure -> - loginFlowAction.value = Async.Failure(failure) + loginFlowAction.value = AsyncData.Failure(failure) } } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderState.kt index 2fcb57af94..2074b7b5ce 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderState.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderState.kt @@ -17,17 +17,17 @@ package io.element.android.features.login.impl.screens.confirmaccountprovider import io.element.android.features.login.impl.accountprovider.AccountProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.auth.OidcDetails // Do not use default value, so no member get forgotten in the presenters. data class ConfirmAccountProviderState( val accountProvider: AccountProvider, val isAccountCreation: Boolean, - val loginFlow: Async, + val loginFlow: AsyncData, val eventSink: (ConfirmAccountProviderEvents) -> Unit ) { - val submitEnabled: Boolean get() = accountProvider.url.isNotEmpty() && (loginFlow is Async.Uninitialized || loginFlow is Async.Loading) + val submitEnabled: Boolean get() = accountProvider.url.isNotEmpty() && (loginFlow is AsyncData.Uninitialized || loginFlow is AsyncData.Loading) } sealed interface LoginFlow { diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderStateProvider.kt index d5f98f5716..3f7bf89278 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderStateProvider.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderStateProvider.kt @@ -18,7 +18,7 @@ package io.element.android.features.login.impl.screens.confirmaccountprovider import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.login.impl.accountprovider.anAccountProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData open class ConfirmAccountProviderStateProvider : PreviewParameterProvider { override val values: Sequence @@ -31,6 +31,6 @@ open class ConfirmAccountProviderStateProvider : PreviewParameterProvider { + is AsyncData.Failure -> { when (val error = state.loginFlow.error) { is ChangeServerError.Error -> { ErrorDialog( @@ -127,14 +127,14 @@ fun ConfirmAccountProviderView( } } } - is Async.Loading -> Unit // The Continue button shows the loading state - is Async.Success -> { + is AsyncData.Loading -> Unit // The Continue button shows the loading state + is AsyncData.Success -> { when (val loginFlowState = state.loginFlow.data) { is LoginFlow.OidcFlow -> onOidcDetails(loginFlowState.oidcDetails) LoginFlow.PasswordLogin -> onLoginPasswordNeeded() } } - Async.Uninitialized -> Unit + AsyncData.Uninitialized -> Unit } } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt index b2ea5fb985..9d7bfde0fa 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenter.kt @@ -26,7 +26,7 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable import io.element.android.features.login.impl.DefaultLoginUserStory import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.api.core.SessionId @@ -43,8 +43,8 @@ class LoginPasswordPresenter @Inject constructor( @Composable override fun present(): LoginPasswordState { val localCoroutineScope = rememberCoroutineScope() - val loginAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val loginAction: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } val formState = rememberSaveable { @@ -63,7 +63,7 @@ class LoginPasswordPresenter @Inject constructor( LoginPasswordEvents.Submit -> { localCoroutineScope.submit(formState.value, loginAction) } - LoginPasswordEvents.ClearError -> loginAction.value = Async.Uninitialized + LoginPasswordEvents.ClearError -> loginAction.value = AsyncData.Uninitialized } } @@ -75,16 +75,16 @@ class LoginPasswordPresenter @Inject constructor( ) } - private fun CoroutineScope.submit(formState: LoginFormState, loggedInState: MutableState>) = launch { - loggedInState.value = Async.Loading() + private fun CoroutineScope.submit(formState: LoginFormState, loggedInState: MutableState>) = launch { + loggedInState.value = AsyncData.Loading() authenticationService.login(formState.login.trim(), formState.password) .onSuccess { sessionId -> // We will not navigate to the WaitList screen, so the login user story is done defaultLoginUserStory.setLoginFlowIsDone(true) - loggedInState.value = Async.Success(sessionId) + loggedInState.value = AsyncData.Success(sessionId) } .onFailure { failure -> - loggedInState.value = Async.Failure(failure) + loggedInState.value = AsyncData.Failure(failure) } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordState.kt index cf4e0d8ee5..d17c44a671 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordState.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordState.kt @@ -18,18 +18,18 @@ package io.element.android.features.login.impl.screens.loginpassword import android.os.Parcelable import io.element.android.features.login.impl.accountprovider.AccountProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.SessionId import kotlinx.parcelize.Parcelize data class LoginPasswordState( val accountProvider: AccountProvider, val formState: LoginFormState, - val loginAction: Async, + val loginAction: AsyncData, val eventSink: (LoginPasswordEvents) -> Unit ) { val submitEnabled: Boolean - get() = loginAction !is Async.Failure && + get() = loginAction !is AsyncData.Failure && formState.login.isNotEmpty() && formState.password.isNotEmpty() } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordStateProvider.kt index b4f5a84691..9b501ac238 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordStateProvider.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordStateProvider.kt @@ -18,22 +18,22 @@ package io.element.android.features.login.impl.screens.loginpassword import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.login.impl.accountprovider.anAccountProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData open class LoginPasswordStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aLoginPasswordState(), // Loading - aLoginPasswordState().copy(loginAction = Async.Loading()), + aLoginPasswordState().copy(loginAction = AsyncData.Loading()), // Error - aLoginPasswordState().copy(loginAction = Async.Failure(Exception("An error occurred"))), + aLoginPasswordState().copy(loginAction = AsyncData.Failure(Exception("An error occurred"))), ) } fun aLoginPasswordState() = LoginPasswordState( accountProvider = anAccountProvider(), formState = LoginFormState.Default, - loginAction = Async.Uninitialized, + loginAction = AsyncData.Uninitialized, eventSink = {} ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordView.kt index 9a5735fe10..b49fe6cf00 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordView.kt @@ -54,7 +54,7 @@ import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.login.impl.R import io.element.android.features.login.impl.error.isWaitListError import io.element.android.features.login.impl.error.loginError -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.molecules.IconTitleSubtitleMolecule import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog @@ -84,7 +84,7 @@ fun LoginPasswordView( ) { val isLoading by remember(state.loginAction) { derivedStateOf { - state.loginAction is Async.Loading + state.loginAction is AsyncData.Loading } } val focusManager = LocalFocusManager.current @@ -148,7 +148,7 @@ fun LoginPasswordView( ) Spacer(modifier = Modifier.height(60.dp)) - if (state.loginAction is Async.Failure) { + if (state.loginAction is AsyncData.Failure) { when { state.loginAction.error.isWaitListError() -> { onWaitListError(state.formState) @@ -224,7 +224,7 @@ private fun LoginForm( ) var passwordVisible by remember { mutableStateOf(false) } - if (state.loginAction is Async.Loading) { + if (state.loginAction is AsyncData.Loading) { // Ensure password is hidden when user submits the form passwordVisible = false } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt index 1d8271e394..247624316d 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenter.kt @@ -27,7 +27,7 @@ import androidx.compose.runtime.setValue import io.element.android.features.login.impl.changeserver.ChangeServerPresenter import io.element.android.features.login.impl.resolver.HomeserverData import io.element.android.features.login.impl.resolver.HomeserverResolver -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.delay @@ -46,8 +46,8 @@ class SearchAccountProviderPresenter @Inject constructor( } val changeServerState = changeServerPresenter.present() - val data: MutableState>> = remember { - mutableStateOf(Async.Uninitialized) + val data: MutableState>> = remember { + mutableStateOf(AsyncData.Uninitialized) } LaunchedEffect(userInput) { @@ -70,16 +70,16 @@ class SearchAccountProviderPresenter @Inject constructor( ) } - private fun CoroutineScope.onUserInput(userInput: String, data: MutableState>>) = launch { - data.value = Async.Uninitialized + private fun CoroutineScope.onUserInput(userInput: String, data: MutableState>>) = launch { + data.value = AsyncData.Uninitialized // Debounce delay(300) - data.value = Async.Loading() + data.value = AsyncData.Loading() homeserverResolver.resolve(userInput).collect { - data.value = Async.Success(it) + data.value = AsyncData.Success(it) } - if (data.value !is Async.Success) { - data.value = Async.Uninitialized + if (data.value !is AsyncData.Success) { + data.value = AsyncData.Uninitialized } } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderState.kt index 15859afde1..825befa356 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderState.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderState.kt @@ -18,12 +18,12 @@ package io.element.android.features.login.impl.screens.searchaccountprovider import io.element.android.features.login.impl.changeserver.ChangeServerState import io.element.android.features.login.impl.resolver.HomeserverData -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData // Do not use default value, so no member get forgotten in the presenters. data class SearchAccountProviderState( val userInput: String, - val userInputResult: Async>, + val userInputResult: AsyncData>, val changeServerState: ChangeServerState, val eventSink: (SearchAccountProviderEvents) -> Unit ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderStateProvider.kt index 50b24b3964..2df65afee4 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderStateProvider.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderStateProvider.kt @@ -20,20 +20,20 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.appconfig.AuthenticationConfig import io.element.android.features.login.impl.changeserver.aChangeServerState import io.element.android.features.login.impl.resolver.HomeserverData -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData open class SearchAccountProviderStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aSearchAccountProviderState(), - aSearchAccountProviderState(userInputResult = Async.Success(aHomeserverDataList())), + aSearchAccountProviderState(userInputResult = AsyncData.Success(aHomeserverDataList())), // Add other state here ) } fun aSearchAccountProviderState( userInput: String = "", - userInputResult: Async> = Async.Uninitialized, + userInputResult: AsyncData> = AsyncData.Uninitialized, ) = SearchAccountProviderState( userInput = userInput, userInputResult = userInputResult, diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderView.kt index 09e8661b77..245c874ae2 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderView.kt @@ -55,7 +55,7 @@ import io.element.android.features.login.impl.accountprovider.AccountProviderVie import io.element.android.features.login.impl.changeserver.ChangeServerEvents import io.element.android.features.login.impl.changeserver.ChangeServerView import io.element.android.features.login.impl.resolver.HomeserverData -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.molecules.IconTitleSubtitleMolecule import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.components.form.textFieldState @@ -152,10 +152,10 @@ fun SearchAccountProviderView( } when (state.userInputResult) { - is Async.Failure -> { + is AsyncData.Failure -> { // Ignore errors (let the user type more chars) } - is Async.Loading -> { + is AsyncData.Loading -> { item { Box( modifier = Modifier @@ -167,7 +167,7 @@ fun SearchAccountProviderView( } } } - is Async.Success -> { + is AsyncData.Success -> { items(state.userInputResult.data) { homeserverData -> val item = homeserverData.toAccountProvider() AccountProviderView( @@ -178,7 +178,7 @@ fun SearchAccountProviderView( ) } } - Async.Uninitialized -> Unit + AsyncData.Uninitialized -> Unit } item { Spacer(Modifier.height(32.dp)) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenter.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenter.kt index 039986343b..7432111b22 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenter.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenter.kt @@ -27,7 +27,7 @@ import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject import io.element.android.features.login.impl.DefaultLoginUserStory import io.element.android.features.login.impl.screens.loginpassword.LoginFormState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.meta.BuildMeta import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService @@ -55,8 +55,8 @@ class WaitListPresenter @AssistedInject constructor( authenticationService.getHomeserverDetails().value?.url ?: "server" } - val loginAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val loginAction: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } val attemptNumber = remember { mutableIntStateOf(0) } @@ -70,7 +70,7 @@ class WaitListPresenter @AssistedInject constructor( coroutineScope.loginAttempt(formState, loginAction) } } - WaitListEvents.ClearError -> loginAction.value = Async.Uninitialized + WaitListEvents.ClearError -> loginAction.value = AsyncData.Uninitialized WaitListEvents.Continue -> defaultLoginUserStory.setLoginFlowIsDone(true) } } @@ -83,15 +83,15 @@ class WaitListPresenter @AssistedInject constructor( ) } - private fun CoroutineScope.loginAttempt(formState: LoginFormState, loggedInState: MutableState>) = launch { + private fun CoroutineScope.loginAttempt(formState: LoginFormState, loggedInState: MutableState>) = launch { Timber.w("Attempt to login...") - loggedInState.value = Async.Loading() + loggedInState.value = AsyncData.Loading() authenticationService.login(formState.login.trim(), formState.password) .onSuccess { sessionId -> - loggedInState.value = Async.Success(sessionId) + loggedInState.value = AsyncData.Success(sessionId) } .onFailure { failure -> - loggedInState.value = Async.Failure(failure) + loggedInState.value = AsyncData.Failure(failure) } } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListState.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListState.kt index f50de7e194..fc85f6637a 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListState.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListState.kt @@ -16,13 +16,13 @@ package io.element.android.features.login.impl.screens.waitlistscreen -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.SessionId // Do not use default value, so no member get forgotten in the presenters. data class WaitListState( val appName: String, val serverName: String, - val loginAction: Async, + val loginAction: AsyncData, val eventSink: (WaitListEvents) -> Unit ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListStateProvider.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListStateProvider.kt index 94a38fa406..61550a230d 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListStateProvider.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListStateProvider.kt @@ -17,17 +17,17 @@ package io.element.android.features.login.impl.screens.waitlistscreen import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.SessionId open class WaitListStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( - aWaitListState(loginAction = Async.Uninitialized), - aWaitListState(loginAction = Async.Loading()), - aWaitListState(loginAction = Async.Failure(Throwable("error"))), - aWaitListState(loginAction = Async.Failure(Throwable(message = "IO_ELEMENT_X_WAIT_LIST"))), - aWaitListState(loginAction = Async.Success(SessionId("@alice:element.io"))), + aWaitListState(loginAction = AsyncData.Uninitialized), + aWaitListState(loginAction = AsyncData.Loading()), + aWaitListState(loginAction = AsyncData.Failure(Throwable("error"))), + aWaitListState(loginAction = AsyncData.Failure(Throwable(message = "IO_ELEMENT_X_WAIT_LIST"))), + aWaitListState(loginAction = AsyncData.Success(SessionId("@alice:element.io"))), // Add other state here ) } @@ -35,7 +35,7 @@ open class WaitListStateProvider : PreviewParameterProvider { fun aWaitListState( appName: String = "Element X", serverName: String = "server.org", - loginAction: Async = Async.Uninitialized, + loginAction: AsyncData = AsyncData.Uninitialized, ) = WaitListState( appName = appName, serverName = serverName, diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListView.kt index 0e40a4827a..e56d1b5bca 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListView.kt @@ -33,7 +33,7 @@ import androidx.lifecycle.Lifecycle import io.element.android.features.login.impl.R import io.element.android.features.login.impl.error.isWaitListError import io.element.android.features.login.impl.error.loginError -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.pages.SunsetPage import io.element.android.libraries.designsystem.components.dialogs.RetryDialog import io.element.android.libraries.designsystem.preview.ElementPreview @@ -89,12 +89,12 @@ private fun WaitListContent( ) { val title = stringResource( when (state.loginAction) { - is Async.Success -> R.string.screen_waitlist_title_success + is AsyncData.Success -> R.string.screen_waitlist_title_success else -> R.string.screen_waitlist_title } ) val subtitle = when (state.loginAction) { - is Async.Success -> stringResource( + is AsyncData.Success -> stringResource( id = R.string.screen_waitlist_message_success, state.appName, ) @@ -122,7 +122,7 @@ private fun OverallContent( modifier: Modifier = Modifier, ) { Box(modifier = modifier.fillMaxSize()) { - if (state.loginAction !is Async.Success) { + if (state.loginAction !is AsyncData.Success) { CompositionLocalProvider(LocalContentColor provides Color.Black) { TextButton( text = stringResource(CommonStrings.action_cancel), @@ -130,7 +130,7 @@ private fun OverallContent( ) } } - if (state.loginAction is Async.Success) { + if (state.loginAction is AsyncData.Success) { Button( text = stringResource(id = CommonStrings.action_continue), onClick = { state.eventSink.invoke(WaitListEvents.Continue) }, diff --git a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt index 44c36128e2..0615b94ce6 100644 --- a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerPresenterTest.kt @@ -22,7 +22,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.login.impl.accountprovider.AccountProvider import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.test.A_HOMESERVER import io.element.android.libraries.matrix.test.A_HOMESERVER_URL import io.element.android.libraries.matrix.test.auth.FakeAuthenticationService @@ -46,7 +46,7 @@ class ChangeServerPresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.changeServerAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.changeServerAction).isEqualTo(AsyncData.Uninitialized) } } @@ -61,13 +61,13 @@ class ChangeServerPresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.changeServerAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.changeServerAction).isEqualTo(AsyncData.Uninitialized) authenticationService.givenHomeserver(A_HOMESERVER) initialState.eventSink.invoke(ChangeServerEvents.ChangeServer(AccountProvider(url = A_HOMESERVER_URL))) val loadingState = awaitItem() - assertThat(loadingState.changeServerAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.changeServerAction).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() - assertThat(successState.changeServerAction).isEqualTo(Async.Success(Unit)) + assertThat(successState.changeServerAction).isEqualTo(AsyncData.Success(Unit)) } } @@ -82,16 +82,16 @@ class ChangeServerPresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.changeServerAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.changeServerAction).isEqualTo(AsyncData.Uninitialized) initialState.eventSink.invoke(ChangeServerEvents.ChangeServer(AccountProvider(url = A_HOMESERVER_URL))) val loadingState = awaitItem() - assertThat(loadingState.changeServerAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.changeServerAction).isInstanceOf(AsyncData.Loading::class.java) val failureState = awaitItem() - assertThat(failureState.changeServerAction).isInstanceOf(Async.Failure::class.java) + assertThat(failureState.changeServerAction).isInstanceOf(AsyncData.Failure::class.java) // Clear error failureState.eventSink.invoke(ChangeServerEvents.ClearError) val finalState = awaitItem() - assertThat(finalState.changeServerAction).isEqualTo(Async.Uninitialized) + assertThat(finalState.changeServerAction).isEqualTo(AsyncData.Uninitialized) } } } diff --git a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenterTest.kt index 70d6da7783..3920ceb597 100644 --- a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/oidc/webview/OidcPresenterTest.kt @@ -23,7 +23,7 @@ import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.login.api.oidc.OidcAction -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.test.A_THROWABLE import io.element.android.libraries.matrix.test.auth.A_OIDC_DATA import io.element.android.libraries.matrix.test.auth.FakeAuthenticationService @@ -49,7 +49,7 @@ class OidcPresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.oidcDetails).isEqualTo(A_OIDC_DATA) - assertThat(initialState.requestState).isEqualTo(Async.Uninitialized) + assertThat(initialState.requestState).isEqualTo(AsyncAction.Uninitialized) } } @@ -65,9 +65,9 @@ class OidcPresenterTest { val initialState = awaitItem() initialState.eventSink.invoke(OidcEvents.Cancel) val loadingState = awaitItem() - assertThat(loadingState.requestState).isEqualTo(Async.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Success(Unit)) + assertThat(finalState.requestState).isEqualTo(AsyncAction.Success(Unit)) } } @@ -85,9 +85,9 @@ class OidcPresenterTest { val initialState = awaitItem() initialState.eventSink.invoke(OidcEvents.Cancel) val loadingState = awaitItem() - assertThat(loadingState.requestState).isEqualTo(Async.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(finalState.requestState).isEqualTo(AsyncAction.Failure(A_THROWABLE)) // Note: in real life I do not think this can happen, and the app should not block the user. } } @@ -104,9 +104,9 @@ class OidcPresenterTest { val initialState = awaitItem() initialState.eventSink.invoke(OidcEvents.OidcActionEvent(OidcAction.GoBack)) val loadingState = awaitItem() - assertThat(loadingState.requestState).isEqualTo(Async.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Success(Unit)) + assertThat(finalState.requestState).isEqualTo(AsyncAction.Success(Unit)) } } @@ -122,7 +122,7 @@ class OidcPresenterTest { val initialState = awaitItem() initialState.eventSink.invoke(OidcEvents.OidcActionEvent(OidcAction.Success("A_URL"))) val loadingState = awaitItem() - assertThat(loadingState.requestState).isEqualTo(Async.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) // In this case, no success, the session is created and the node get destroyed. } } @@ -141,12 +141,12 @@ class OidcPresenterTest { val initialState = awaitItem() initialState.eventSink.invoke(OidcEvents.OidcActionEvent(OidcAction.Success("A_URL"))) val loadingState = awaitItem() - assertThat(loadingState.requestState).isEqualTo(Async.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val errorState = awaitItem() - assertThat(errorState.requestState).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.requestState).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(OidcEvents.ClearError) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Uninitialized) + assertThat(finalState.requestState).isEqualTo(AsyncAction.Uninitialized) } } } diff --git a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenterTest.kt index f348839c97..ad78f7b328 100644 --- a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/confirmaccountprovider/ConfirmAccountProviderPresenterTest.kt @@ -25,7 +25,7 @@ import io.element.android.features.login.impl.DefaultLoginUserStory import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource import io.element.android.features.login.impl.oidc.customtab.DefaultOidcActionFlow import io.element.android.features.login.impl.util.defaultAccountProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.auth.MatrixAuthenticationService import io.element.android.libraries.matrix.test.A_HOMESERVER import io.element.android.libraries.matrix.test.A_HOMESERVER_OIDC @@ -52,7 +52,7 @@ class ConfirmAccountProviderPresenterTest { assertThat(initialState.isAccountCreation).isFalse() assertThat(initialState.submitEnabled).isTrue() assertThat(initialState.accountProvider).isEqualTo(defaultAccountProvider) - assertThat(initialState.loginFlow).isEqualTo(Async.Uninitialized) + assertThat(initialState.loginFlow).isEqualTo(AsyncData.Uninitialized) } } @@ -70,10 +70,10 @@ class ConfirmAccountProviderPresenterTest { initialState.eventSink.invoke(ConfirmAccountProviderEvents.Continue) val loadingState = awaitItem() assertThat(loadingState.submitEnabled).isTrue() - assertThat(loadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() assertThat(successState.submitEnabled).isFalse() - assertThat(successState.loginFlow).isInstanceOf(Async.Success::class.java) + assertThat(successState.loginFlow).isInstanceOf(AsyncData.Success::class.java) assertThat(successState.loginFlow.dataOrNull()).isEqualTo(LoginFlow.PasswordLogin) } } @@ -92,10 +92,10 @@ class ConfirmAccountProviderPresenterTest { initialState.eventSink.invoke(ConfirmAccountProviderEvents.Continue) val loadingState = awaitItem() assertThat(loadingState.submitEnabled).isTrue() - assertThat(loadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() assertThat(successState.submitEnabled).isFalse() - assertThat(successState.loginFlow).isInstanceOf(Async.Success::class.java) + assertThat(successState.loginFlow).isInstanceOf(AsyncData.Success::class.java) assertThat(successState.loginFlow.dataOrNull()).isInstanceOf(LoginFlow.OidcFlow::class.java) } } @@ -116,15 +116,15 @@ class ConfirmAccountProviderPresenterTest { initialState.eventSink.invoke(ConfirmAccountProviderEvents.Continue) val loadingState = awaitItem() assertThat(loadingState.submitEnabled).isTrue() - assertThat(loadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() assertThat(successState.submitEnabled).isFalse() - assertThat(successState.loginFlow).isInstanceOf(Async.Success::class.java) + assertThat(successState.loginFlow).isInstanceOf(AsyncData.Success::class.java) assertThat(successState.loginFlow.dataOrNull()).isInstanceOf(LoginFlow.OidcFlow::class.java) authenticationService.givenOidcCancelError(A_THROWABLE) defaultOidcActionFlow.post(OidcAction.GoBack) val cancelFailureState = awaitItem() - assertThat(cancelFailureState.loginFlow).isInstanceOf(Async.Failure::class.java) + assertThat(cancelFailureState.loginFlow).isInstanceOf(AsyncData.Failure::class.java) } } @@ -144,14 +144,14 @@ class ConfirmAccountProviderPresenterTest { initialState.eventSink.invoke(ConfirmAccountProviderEvents.Continue) val loadingState = awaitItem() assertThat(loadingState.submitEnabled).isTrue() - assertThat(loadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() assertThat(successState.submitEnabled).isFalse() - assertThat(successState.loginFlow).isInstanceOf(Async.Success::class.java) + assertThat(successState.loginFlow).isInstanceOf(AsyncData.Success::class.java) assertThat(successState.loginFlow.dataOrNull()).isInstanceOf(LoginFlow.OidcFlow::class.java) defaultOidcActionFlow.post(OidcAction.GoBack) val cancelFinalState = awaitItem() - assertThat(cancelFinalState.loginFlow).isInstanceOf(Async.Uninitialized::class.java) + assertThat(cancelFinalState.loginFlow).isInstanceOf(AsyncData.Uninitialized::class.java) } } @@ -171,17 +171,17 @@ class ConfirmAccountProviderPresenterTest { initialState.eventSink.invoke(ConfirmAccountProviderEvents.Continue) val loadingState = awaitItem() assertThat(loadingState.submitEnabled).isTrue() - assertThat(loadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() assertThat(successState.submitEnabled).isFalse() - assertThat(successState.loginFlow).isInstanceOf(Async.Success::class.java) + assertThat(successState.loginFlow).isInstanceOf(AsyncData.Success::class.java) assertThat(successState.loginFlow.dataOrNull()).isInstanceOf(LoginFlow.OidcFlow::class.java) authenticationService.givenLoginError(A_THROWABLE) defaultOidcActionFlow.post(OidcAction.Success("aUrl")) val cancelLoadingState = awaitItem() - assertThat(cancelLoadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(cancelLoadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val cancelFailureState = awaitItem() - assertThat(cancelFailureState.loginFlow).isInstanceOf(Async.Failure::class.java) + assertThat(cancelFailureState.loginFlow).isInstanceOf(AsyncData.Failure::class.java) } } @@ -205,15 +205,15 @@ class ConfirmAccountProviderPresenterTest { initialState.eventSink.invoke(ConfirmAccountProviderEvents.Continue) val loadingState = awaitItem() assertThat(loadingState.submitEnabled).isTrue() - assertThat(loadingState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() assertThat(successState.submitEnabled).isFalse() - assertThat(successState.loginFlow).isInstanceOf(Async.Success::class.java) + assertThat(successState.loginFlow).isInstanceOf(AsyncData.Success::class.java) assertThat(successState.loginFlow.dataOrNull()).isInstanceOf(LoginFlow.OidcFlow::class.java) assertThat(defaultLoginUserStory.loginFlowIsDone.value).isFalse() defaultOidcActionFlow.post(OidcAction.Success("aUrl")) val successSuccessState = awaitItem() - assertThat(successSuccessState.loginFlow).isInstanceOf(Async.Loading::class.java) + assertThat(successSuccessState.loginFlow).isInstanceOf(AsyncData.Loading::class.java) waitForPredicate { defaultLoginUserStory.loginFlowIsDone.value } } } @@ -233,7 +233,7 @@ class ConfirmAccountProviderPresenterTest { skipItems(1) // Loading val failureState = awaitItem() assertThat(failureState.submitEnabled).isFalse() - assertThat(failureState.loginFlow).isInstanceOf(Async.Failure::class.java) + assertThat(failureState.loginFlow).isInstanceOf(AsyncData.Failure::class.java) } } @@ -256,12 +256,12 @@ class ConfirmAccountProviderPresenterTest { // Check an error was returned val submittedState = awaitItem() - assertThat(submittedState.loginFlow).isInstanceOf(Async.Failure::class.java) + assertThat(submittedState.loginFlow).isInstanceOf(AsyncData.Failure::class.java) // Assert the error is then cleared submittedState.eventSink(ConfirmAccountProviderEvents.ClearError) val clearedState = awaitItem() - assertThat(clearedState.loginFlow).isEqualTo(Async.Uninitialized) + assertThat(clearedState.loginFlow).isEqualTo(AsyncData.Uninitialized) } } diff --git a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenterTest.kt index a2b0fae449..23672974ee 100644 --- a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/loginpassword/LoginPasswordPresenterTest.kt @@ -23,7 +23,7 @@ import com.google.common.truth.Truth.assertThat import io.element.android.features.login.impl.DefaultLoginUserStory import io.element.android.features.login.impl.accountprovider.AccountProviderDataSource import io.element.android.features.login.impl.util.defaultAccountProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.test.A_HOMESERVER import io.element.android.libraries.matrix.test.A_PASSWORD @@ -57,7 +57,7 @@ class LoginPasswordPresenterTest { val initialState = awaitItem() assertThat(initialState.accountProvider).isEqualTo(defaultAccountProvider) assertThat(initialState.formState).isEqualTo(LoginFormState.Default) - assertThat(initialState.loginAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.loginAction).isEqualTo(AsyncData.Uninitialized) assertThat(initialState.submitEnabled).isFalse() } } @@ -110,9 +110,9 @@ class LoginPasswordPresenterTest { val loginAndPasswordState = awaitItem() loginAndPasswordState.eventSink.invoke(LoginPasswordEvents.Submit) val submitState = awaitItem() - assertThat(submitState.loginAction).isInstanceOf(Async.Loading::class.java) + assertThat(submitState.loginAction).isInstanceOf(AsyncData.Loading::class.java) val loggedInState = awaitItem() - assertThat(loggedInState.loginAction).isEqualTo(Async.Success(A_SESSION_ID)) + assertThat(loggedInState.loginAction).isEqualTo(AsyncData.Success(A_SESSION_ID)) assertThat(loginUserStory.loginFlowIsDone.value).isTrue() } } @@ -139,9 +139,9 @@ class LoginPasswordPresenterTest { authenticationService.givenLoginError(A_THROWABLE) loginAndPasswordState.eventSink.invoke(LoginPasswordEvents.Submit) val submitState = awaitItem() - assertThat(submitState.loginAction).isInstanceOf(Async.Loading::class.java) + assertThat(submitState.loginAction).isInstanceOf(AsyncData.Loading::class.java) val loggedInState = awaitItem() - assertThat(loggedInState.loginAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(loggedInState.loginAction).isEqualTo(AsyncData.Failure(A_THROWABLE)) } } @@ -167,14 +167,14 @@ class LoginPasswordPresenterTest { authenticationService.givenLoginError(A_THROWABLE) loginAndPasswordState.eventSink.invoke(LoginPasswordEvents.Submit) val submitState = awaitItem() - assertThat(submitState.loginAction).isInstanceOf(Async.Loading::class.java) + assertThat(submitState.loginAction).isInstanceOf(AsyncData.Loading::class.java) val loggedInState = awaitItem() // Check an error was returned - assertThat(loggedInState.loginAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(loggedInState.loginAction).isEqualTo(AsyncData.Failure(A_THROWABLE)) // Assert the error is then cleared loggedInState.eventSink(LoginPasswordEvents.ClearError) val clearedState = awaitItem() - assertThat(clearedState.loginAction).isEqualTo(Async.Uninitialized) + assertThat(clearedState.loginAction).isEqualTo(AsyncData.Uninitialized) } } } diff --git a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenterTest.kt index 84bd6925db..d951902490 100644 --- a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/searchaccountprovider/SearchAccountProviderPresenterTest.kt @@ -27,7 +27,7 @@ import io.element.android.features.login.impl.resolver.network.FakeWellknownRequ import io.element.android.features.login.impl.resolver.network.WellKnown import io.element.android.features.login.impl.resolver.network.WellKnownBaseConfig import io.element.android.features.login.impl.resolver.network.WellKnownSlidingSyncConfig -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.test.A_HOMESERVER_URL import io.element.android.libraries.matrix.test.auth.FakeAuthenticationService import io.element.android.tests.testutils.WarmUpRule @@ -57,7 +57,7 @@ class SearchAccountProviderPresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.userInput).isEmpty() - assertThat(initialState.userInputResult).isEqualTo(Async.Uninitialized) + assertThat(initialState.userInputResult).isEqualTo(AsyncData.Uninitialized) } } @@ -79,9 +79,9 @@ class SearchAccountProviderPresenterTest { initialState.eventSink.invoke(SearchAccountProviderEvents.UserInput("test")) val withInputState = awaitItem() assertThat(withInputState.userInput).isEqualTo("test") - assertThat(initialState.userInputResult).isEqualTo(Async.Uninitialized) - assertThat(awaitItem().userInputResult).isInstanceOf(Async.Loading::class.java) - assertThat(awaitItem().userInputResult).isEqualTo(Async.Uninitialized) + assertThat(initialState.userInputResult).isEqualTo(AsyncData.Uninitialized) + assertThat(awaitItem().userInputResult).isInstanceOf(AsyncData.Loading::class.java) + assertThat(awaitItem().userInputResult).isEqualTo(AsyncData.Uninitialized) } } @@ -103,10 +103,10 @@ class SearchAccountProviderPresenterTest { initialState.eventSink.invoke(SearchAccountProviderEvents.UserInput("https://test.org")) val withInputState = awaitItem() assertThat(withInputState.userInput).isEqualTo("https://test.org") - assertThat(initialState.userInputResult).isEqualTo(Async.Uninitialized) - assertThat(awaitItem().userInputResult).isInstanceOf(Async.Loading::class.java) + assertThat(initialState.userInputResult).isEqualTo(AsyncData.Uninitialized) + assertThat(awaitItem().userInputResult).isInstanceOf(AsyncData.Loading::class.java) assertThat(awaitItem().userInputResult).isEqualTo( - Async.Success( + AsyncData.Success( listOf( aHomeserverData(homeserverUrl = "https://test.org", isWellknownValid = false, supportSlidingSync = false) ) @@ -138,10 +138,10 @@ class SearchAccountProviderPresenterTest { initialState.eventSink.invoke(SearchAccountProviderEvents.UserInput("test")) val withInputState = awaitItem() assertThat(withInputState.userInput).isEqualTo("test") - assertThat(initialState.userInputResult).isEqualTo(Async.Uninitialized) - assertThat(awaitItem().userInputResult).isInstanceOf(Async.Loading::class.java) + assertThat(initialState.userInputResult).isEqualTo(AsyncData.Uninitialized) + assertThat(awaitItem().userInputResult).isInstanceOf(AsyncData.Loading::class.java) assertThat(awaitItem().userInputResult).isEqualTo( - Async.Success( + AsyncData.Success( listOf( aHomeserverData(homeserverUrl = "https://test.org", isWellknownValid = true, supportSlidingSync = false) ) @@ -173,10 +173,10 @@ class SearchAccountProviderPresenterTest { initialState.eventSink.invoke(SearchAccountProviderEvents.UserInput("test")) val withInputState = awaitItem() assertThat(withInputState.userInput).isEqualTo("test") - assertThat(initialState.userInputResult).isEqualTo(Async.Uninitialized) - assertThat(awaitItem().userInputResult).isInstanceOf(Async.Loading::class.java) + assertThat(initialState.userInputResult).isEqualTo(AsyncData.Uninitialized) + assertThat(awaitItem().userInputResult).isInstanceOf(AsyncData.Loading::class.java) assertThat(awaitItem().userInputResult).isEqualTo( - Async.Success( + AsyncData.Success( listOf( aHomeserverData(homeserverUrl = "https://test.io") ) diff --git a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenterTest.kt b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenterTest.kt index 590fa8efc0..9cdac92dbb 100644 --- a/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenterTest.kt +++ b/features/login/impl/src/test/kotlin/io/element/android/features/login/impl/screens/waitlistscreen/WaitListPresenterTest.kt @@ -22,7 +22,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.login.impl.DefaultLoginUserStory import io.element.android.features.login.impl.screens.loginpassword.LoginFormState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.matrix.test.A_HOMESERVER import io.element.android.libraries.matrix.test.A_HOMESERVER_URL @@ -58,7 +58,7 @@ class WaitListPresenterTest { val initialState = awaitItem() assertThat(initialState.appName).isEqualTo("Application Name") assertThat(initialState.serverName).isEqualTo(A_HOMESERVER_URL) - assertThat(initialState.loginAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.loginAction).isEqualTo(AsyncData.Uninitialized) } } @@ -83,13 +83,13 @@ class WaitListPresenterTest { expectNoEvents() initialState.eventSink.invoke(WaitListEvents.AttemptLogin) val submitState = awaitItem() - assertThat(submitState.loginAction).isInstanceOf(Async.Loading::class.java) + assertThat(submitState.loginAction).isInstanceOf(AsyncData.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.loginAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.loginAction).isEqualTo(AsyncData.Failure(A_THROWABLE)) // Assert the error can be cleared errorState.eventSink(WaitListEvents.ClearError) val clearedState = awaitItem() - assertThat(clearedState.loginAction).isEqualTo(Async.Uninitialized) + assertThat(clearedState.loginAction).isEqualTo(AsyncData.Uninitialized) } } @@ -113,9 +113,9 @@ class WaitListPresenterTest { expectNoEvents() initialState.eventSink.invoke(WaitListEvents.AttemptLogin) val submitState = awaitItem() - assertThat(submitState.loginAction).isInstanceOf(Async.Loading::class.java) + assertThat(submitState.loginAction).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() - assertThat(successState.loginAction).isEqualTo(Async.Success(A_USER_ID)) + assertThat(successState.loginAction).isEqualTo(AsyncData.Success(A_USER_ID)) assertThat(loginUserStory.loginFlowIsDone.value).isFalse() successState.eventSink.invoke(WaitListEvents.Continue) assertThat(loginUserStory.loginFlowIsDone.value).isTrue() diff --git a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutState.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutState.kt index 71e97a856d..e5b6af99e4 100644 --- a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutState.kt +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutState.kt @@ -16,11 +16,10 @@ package io.element.android.features.logout.api.direct -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction data class DirectLogoutState( val canDoDirectSignOut: Boolean, - val showConfirmationDialog: Boolean, - val logoutAction: Async, + val logoutAction: AsyncAction, val eventSink: (DirectLogoutEvents) -> Unit, ) diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt index b8d8772104..165987900c 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutPresenter.kt @@ -25,7 +25,8 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.bool.orTrue @@ -50,8 +51,8 @@ class LogoutPresenter @Inject constructor( @Composable override fun present(): LogoutState { val localCoroutineScope = rememberCoroutineScope() - val logoutAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val logoutAction: MutableState> = remember { + mutableStateOf(AsyncAction.Uninitialized) } val secureStorageFlag by featureFlagService.isFeatureEnabledFlow(FeatureFlags.SecureStorage) @@ -66,7 +67,6 @@ class LogoutPresenter @Inject constructor( } .collectAsState(initial = BackupUploadState.Unknown) - var showLogoutDialog by remember { mutableStateOf(false) } var isLastSession by remember { mutableStateOf(false) } LaunchedEffect(Unit) { isLastSession = encryptionService.isLastDevice().getOrNull() ?: false @@ -75,8 +75,8 @@ class LogoutPresenter @Inject constructor( val backupState by encryptionService.backupStateStateFlow.collectAsState() val recoveryState by encryptionService.recoveryStateStateFlow.collectAsState() - val doesBackupExistOnServerAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val doesBackupExistOnServerAction: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } LaunchedEffect(backupState) { @@ -88,16 +88,14 @@ class LogoutPresenter @Inject constructor( fun handleEvents(event: LogoutEvents) { when (event) { is LogoutEvents.Logout -> { - if (showLogoutDialog || event.ignoreSdkError) { - showLogoutDialog = false + if (logoutAction.value.isConfirming() || event.ignoreSdkError) { localCoroutineScope.logout(logoutAction, event.ignoreSdkError) } else { - showLogoutDialog = true + logoutAction.value = AsyncAction.Confirming } } LogoutEvents.CloseDialogs -> { - logoutAction.value = Async.Uninitialized - showLogoutDialog = false + logoutAction.value = AsyncAction.Uninitialized } } } @@ -108,20 +106,19 @@ class LogoutPresenter @Inject constructor( doesBackupExistOnServer = doesBackupExistOnServerAction.value.dataOrNull().orTrue(), recoveryState = recoveryState, backupUploadState = backupUploadState, - showConfirmationDialog = showLogoutDialog, logoutAction = logoutAction.value, eventSink = ::handleEvents ) } - private fun CoroutineScope.getKeyBackupStatus(action: MutableState>) = launch { + private fun CoroutineScope.getKeyBackupStatus(action: MutableState>) = launch { suspend { encryptionService.doesBackupExistOnServer().getOrThrow() }.runCatchingUpdatingState(action) } private fun CoroutineScope.logout( - logoutAction: MutableState>, + logoutAction: MutableState>, ignoreSdkError: Boolean, ) = launch { suspend { diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutState.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutState.kt index abade32b96..6da9df8e72 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutState.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutState.kt @@ -16,7 +16,7 @@ package io.element.android.features.logout.impl -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.BackupUploadState import io.element.android.libraries.matrix.api.encryption.RecoveryState @@ -27,7 +27,6 @@ data class LogoutState( val doesBackupExistOnServer: Boolean, val recoveryState: RecoveryState, val backupUploadState: BackupUploadState, - val showConfirmationDialog: Boolean, - val logoutAction: Async, + val logoutAction: AsyncAction, val eventSink: (LogoutEvents) -> Unit, ) diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutStateProvider.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutStateProvider.kt index 8c9482105d..33c60a851f 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutStateProvider.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.logout.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.BackupUploadState import io.element.android.libraries.matrix.api.encryption.RecoveryState @@ -30,9 +30,9 @@ open class LogoutStateProvider : PreviewParameterProvider { aLogoutState(isLastSession = true), aLogoutState(isLastSession = false, backupUploadState = BackupUploadState.Uploading(66, 200)), aLogoutState(isLastSession = true, backupUploadState = BackupUploadState.Done), - aLogoutState(showConfirmationDialog = true), - aLogoutState(logoutAction = Async.Loading()), - aLogoutState(logoutAction = Async.Failure(Exception("Failed to logout"))), + aLogoutState(logoutAction = AsyncAction.Confirming), + aLogoutState(logoutAction = AsyncAction.Loading), + aLogoutState(logoutAction = AsyncAction.Failure(Exception("Failed to logout"))), aLogoutState(backupUploadState = BackupUploadState.SteadyException(SteadyStateException.Connection("No network"))), // Last session no recovery aLogoutState(isLastSession = true, recoveryState = RecoveryState.DISABLED), @@ -47,15 +47,13 @@ fun aLogoutState( doesBackupExistOnServer: Boolean = true, recoveryState: RecoveryState = RecoveryState.ENABLED, backupUploadState: BackupUploadState = BackupUploadState.Unknown, - showConfirmationDialog: Boolean = false, - logoutAction: Async = Async.Uninitialized, + logoutAction: AsyncAction = AsyncAction.Uninitialized, ) = LogoutState( isLastSession = isLastSession, backupState = backupState, doesBackupExistOnServer = doesBackupExistOnServer, recoveryState = recoveryState, backupUploadState = backupUploadState, - showConfirmationDialog = showConfirmationDialog, logoutAction = logoutAction, eventSink = {} ) diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutView.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutView.kt index e025f4825a..ecec90cf06 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutView.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/LogoutView.kt @@ -32,8 +32,7 @@ import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.features.logout.impl.tools.isBackingUp import io.element.android.features.logout.impl.ui.LogoutActionDialog -import io.element.android.features.logout.impl.ui.LogoutConfirmationDialog -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.designsystem.atomic.pages.FlowStepPage import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -79,20 +78,11 @@ fun LogoutView( }, ) - // Log out confirmation dialog - if (state.showConfirmationDialog) { - LogoutConfirmationDialog( - onSubmitClicked = { - eventSink(LogoutEvents.Logout(ignoreSdkError = false)) - }, - onDismiss = { - eventSink(LogoutEvents.CloseDialogs) - } - ) - } - LogoutActionDialog( state.logoutAction, + onConfirmClicked = { + eventSink(LogoutEvents.Logout(ignoreSdkError = false)) + }, onForceLogoutClicked = { eventSink(LogoutEvents.Logout(ignoreSdkError = true)) }, @@ -148,13 +138,13 @@ private fun ColumnScope.Buttons( ) } val signOutSubmitRes = when { - logoutAction is Async.Loading -> R.string.screen_signout_in_progress_dialog_content + logoutAction is AsyncAction.Loading -> R.string.screen_signout_in_progress_dialog_content state.backupUploadState.isBackingUp() -> CommonStrings.action_signout_anyway else -> CommonStrings.action_signout } Button( text = stringResource(id = signOutSubmitRes), - showProgress = logoutAction is Async.Loading, + showProgress = logoutAction is AsyncAction.Loading, destructive = true, modifier = Modifier .fillMaxWidth() diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenter.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenter.kt index 70827e8ab0..8ee46b63ac 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenter.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenter.kt @@ -30,7 +30,7 @@ import io.element.android.features.logout.api.direct.DirectLogoutEvents import io.element.android.features.logout.api.direct.DirectLogoutPresenter import io.element.android.features.logout.api.direct.DirectLogoutState import io.element.android.features.logout.impl.tools.isBackingUp -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.di.SessionScope import io.element.android.libraries.featureflag.api.FeatureFlagService @@ -54,8 +54,8 @@ class DefaultDirectLogoutPresenter @Inject constructor( override fun present(): DirectLogoutState { val localCoroutineScope = rememberCoroutineScope() - val logoutAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val logoutAction: MutableState> = remember { + mutableStateOf(AsyncAction.Uninitialized) } val secureStorageFlag by featureFlagService.isFeatureEnabledFlow(FeatureFlags.SecureStorage) @@ -70,7 +70,6 @@ class DefaultDirectLogoutPresenter @Inject constructor( } .collectAsState(initial = BackupUploadState.Unknown) - var showLogoutDialog by remember { mutableStateOf(false) } var isLastSession by remember { mutableStateOf(false) } LaunchedEffect(Unit) { isLastSession = encryptionService.isLastDevice().getOrNull() ?: false @@ -79,16 +78,14 @@ class DefaultDirectLogoutPresenter @Inject constructor( fun handleEvents(event: DirectLogoutEvents) { when (event) { is DirectLogoutEvents.Logout -> { - if (showLogoutDialog || event.ignoreSdkError) { - showLogoutDialog = false + if (logoutAction.value.isConfirming() || event.ignoreSdkError) { localCoroutineScope.logout(logoutAction, event.ignoreSdkError) } else { - showLogoutDialog = true + logoutAction.value = AsyncAction.Confirming } } DirectLogoutEvents.CloseDialogs -> { - logoutAction.value = Async.Uninitialized - showLogoutDialog = false + logoutAction.value = AsyncAction.Uninitialized } } } @@ -96,14 +93,13 @@ class DefaultDirectLogoutPresenter @Inject constructor( return DirectLogoutState( canDoDirectSignOut = !isLastSession && !backupUploadState.isBackingUp(), - showConfirmationDialog = showLogoutDialog, logoutAction = logoutAction.value, eventSink = ::handleEvents ) } private fun CoroutineScope.logout( - logoutAction: MutableState>, + logoutAction: MutableState>, ignoreSdkError: Boolean, ) = launch { suspend { diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutView.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutView.kt index bd00975864..f646d86c9e 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutView.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutView.kt @@ -22,7 +22,6 @@ import io.element.android.features.logout.api.direct.DirectLogoutEvents import io.element.android.features.logout.api.direct.DirectLogoutState import io.element.android.features.logout.api.direct.DirectLogoutView import io.element.android.features.logout.impl.ui.LogoutActionDialog -import io.element.android.features.logout.impl.ui.LogoutConfirmationDialog import io.element.android.libraries.di.SessionScope import javax.inject.Inject @@ -34,20 +33,11 @@ class DefaultDirectLogoutView @Inject constructor() : DirectLogoutView { onSuccessLogout: (logoutUrlResult: String?) -> Unit, ) { val eventSink = state.eventSink - // Log out confirmation dialog - if (state.showConfirmationDialog) { - LogoutConfirmationDialog( - onSubmitClicked = { - eventSink(DirectLogoutEvents.Logout(ignoreSdkError = false)) - }, - onDismiss = { - eventSink(DirectLogoutEvents.CloseDialogs) - } - ) - } - LogoutActionDialog( state.logoutAction, + onConfirmClicked = { + eventSink(DirectLogoutEvents.Logout(ignoreSdkError = false)) + }, onForceLogoutClicked = { eventSink(DirectLogoutEvents.Logout(ignoreSdkError = true)) }, diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutActionDialog.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutActionDialog.kt index 9baad1d1f3..6a1891fd23 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutActionDialog.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutActionDialog.kt @@ -20,22 +20,30 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.res.stringResource import io.element.android.features.logout.impl.R -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.designsystem.components.ProgressDialog import io.element.android.libraries.designsystem.components.dialogs.RetryDialog import io.element.android.libraries.ui.strings.CommonStrings @Composable fun LogoutActionDialog( - state: Async, + state: AsyncAction, + onConfirmClicked: () -> Unit, onForceLogoutClicked: () -> Unit, - onDismissError: () -> Unit, + onDismissError: () -> Unit, // TODO Rename onSuccessLogout: (String?) -> Unit, ) { when (state) { - is Async.Loading -> + AsyncAction.Uninitialized -> + Unit + AsyncAction.Confirming -> + LogoutConfirmationDialog( + onSubmitClicked = onConfirmClicked, + onDismiss = onDismissError + ) + is AsyncAction.Loading -> ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content)) - is Async.Failure -> + is AsyncAction.Failure -> RetryDialog( title = stringResource(id = CommonStrings.dialog_title_error), content = stringResource(id = CommonStrings.error_unknown), @@ -43,9 +51,7 @@ fun LogoutActionDialog( onRetry = onForceLogoutClicked, onDismiss = onDismissError, ) - Async.Uninitialized -> - Unit - is Async.Success -> + is AsyncAction.Success -> LaunchedEffect(state) { onSuccessLogout(state.data) } diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPresenterTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPresenterTest.kt index c486e76312..6bcdce418e 100644 --- a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPresenterTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutPresenterTest.kt @@ -18,9 +18,10 @@ package io.element.android.features.logout.impl import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow +import app.cash.turbine.ReceiveTurbine import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.featureflag.api.FeatureFlags import io.element.android.libraries.featureflag.test.FakeFeatureFlagService import io.element.android.libraries.matrix.api.MatrixClient @@ -32,7 +33,6 @@ import io.element.android.libraries.matrix.test.A_THROWABLE import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.libraries.matrix.test.encryption.FakeEncryptionService import io.element.android.tests.testutils.WarmUpRule -import io.element.android.tests.testutils.awaitLastSequentialItem import kotlinx.coroutines.delay import kotlinx.coroutines.flow.flow import kotlinx.coroutines.test.runTest @@ -50,14 +50,13 @@ class LogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() assertThat(initialState.isLastSession).isFalse() assertThat(initialState.backupState).isEqualTo(BackupState.UNKNOWN) assertThat(initialState.doesBackupExistOnServer).isTrue() assertThat(initialState.recoveryState).isEqualTo(RecoveryState.UNKNOWN) assertThat(initialState.backupUploadState).isEqualTo(BackupUploadState.Unknown) - assertThat(initialState.showConfirmationDialog).isFalse() - assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -75,8 +74,7 @@ class LogoutPresenterTest { val initialState = awaitItem() assertThat(initialState.isLastSession).isTrue() assertThat(initialState.backupUploadState).isEqualTo(BackupUploadState.Unknown) - assertThat(initialState.showConfirmationDialog).isFalse() - assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -101,8 +99,7 @@ class LogoutPresenterTest { val initialState = awaitItem() assertThat(initialState.isLastSession).isFalse() assertThat(initialState.backupUploadState).isEqualTo(BackupUploadState.Unknown) - assertThat(initialState.showConfirmationDialog).isFalse() - assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) skipItems(1) val waitingState = awaitItem() assertThat(waitingState.backupUploadState).isEqualTo(BackupUploadState.Waiting) @@ -120,13 +117,13 @@ class LogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) initialState.eventSink.invoke(LogoutEvents.CloseDialogs) val finalState = awaitItem() - assertThat(finalState.showConfirmationDialog).isFalse() + assertThat(finalState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -136,17 +133,15 @@ class LogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) - skipItems(1) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val successState = awaitItem() - assertThat(successState.logoutAction).isInstanceOf(Async.Success::class.java) + assertThat(successState.logoutAction).isInstanceOf(AsyncAction.Success::class.java) } } @@ -161,22 +156,18 @@ class LogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - skipItems(1) - val initialState = awaitItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) - skipItems(1) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) - skipItems(1) + assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.logoutAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.logoutAction).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(LogoutEvents.CloseDialogs) val finalState = awaitItem() - assertThat(finalState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(finalState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -191,28 +182,28 @@ class LogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - skipItems(1) - val initialState = awaitItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) - skipItems(1) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) - skipItems(1) + assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.logoutAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.logoutAction).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = true)) val loadingState2 = awaitItem() - assertThat(loadingState2.showConfirmationDialog).isFalse() - assertThat(loadingState2.logoutAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState2.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val successState = awaitItem() - assertThat(successState.logoutAction).isInstanceOf(Async.Success::class.java) + assertThat(successState.logoutAction).isInstanceOf(AsyncAction.Success::class.java) } } + private suspend fun ReceiveTurbine.awaitFirstItem(): T { + skipItems(2) + return awaitItem() + } + private fun createLogoutPresenter( matrixClient: MatrixClient = FakeMatrixClient(), encryptionService: EncryptionService = FakeEncryptionService(), diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenterTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenterTest.kt index 5341a8c19e..6686e02efa 100644 --- a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenterTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenterTest.kt @@ -18,11 +18,11 @@ package io.element.android.features.logout.impl.direct import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow +import app.cash.turbine.ReceiveTurbine import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.logout.api.direct.DirectLogoutEvents -import io.element.android.features.logout.api.direct.DirectLogoutState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.featureflag.api.FeatureFlags import io.element.android.libraries.featureflag.test.FakeFeatureFlagService import io.element.android.libraries.matrix.api.MatrixClient @@ -32,7 +32,6 @@ import io.element.android.libraries.matrix.test.A_THROWABLE import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.libraries.matrix.test.encryption.FakeEncryptionService import io.element.android.tests.testutils.WarmUpRule -import io.element.android.tests.testutils.awaitLastSequentialItem import kotlinx.coroutines.flow.flow import kotlinx.coroutines.test.runTest import org.junit.Rule @@ -49,10 +48,9 @@ class DefaultDirectLogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() assertThat(initialState.canDoDirectSignOut).isTrue() - assertThat(initialState.showConfirmationDialog).isFalse() - assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -69,8 +67,7 @@ class DefaultDirectLogoutPresenterTest { skipItems(2) val initialState = awaitItem() assertThat(initialState.canDoDirectSignOut).isFalse() - assertThat(initialState.showConfirmationDialog).isFalse() - assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -91,8 +88,7 @@ class DefaultDirectLogoutPresenterTest { skipItems(2) val initialState = awaitItem() assertThat(initialState.canDoDirectSignOut).isFalse() - assertThat(initialState.showConfirmationDialog).isFalse() - assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -102,13 +98,13 @@ class DefaultDirectLogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) initialState.eventSink.invoke(DirectLogoutEvents.CloseDialogs) val finalState = awaitItem() - assertThat(finalState.showConfirmationDialog).isFalse() + assertThat(finalState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -118,17 +114,15 @@ class DefaultDirectLogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) - skipItems(1) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val successState = awaitItem() - assertThat(successState.logoutAction).isInstanceOf(Async.Success::class.java) + assertThat(successState.logoutAction).isInstanceOf(AsyncAction.Success::class.java) } } @@ -143,21 +137,18 @@ class DefaultDirectLogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - skipItems(1) - val initialState = awaitItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) - skipItems(1) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.logoutAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.logoutAction).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(DirectLogoutEvents.CloseDialogs) val finalState = awaitItem() - assertThat(finalState.logoutAction).isEqualTo(Async.Uninitialized) + assertThat(finalState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -172,27 +163,28 @@ class DefaultDirectLogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - skipItems(1) - val initialState = awaitItem() + val initialState = awaitFirstItem() initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) val confirmationState = awaitItem() - assertThat(confirmationState.showConfirmationDialog).isTrue() + assertThat(confirmationState.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) - skipItems(1) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.logoutAction).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.logoutAction).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = true)) val loadingState2 = awaitItem() - assertThat(loadingState2.showConfirmationDialog).isFalse() - assertThat(loadingState2.logoutAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState2.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) val successState = awaitItem() - assertThat(successState.logoutAction).isInstanceOf(Async.Success::class.java) + assertThat(successState.logoutAction).isInstanceOf(AsyncAction.Success::class.java) } } + private suspend fun ReceiveTurbine.awaitFirstItem(): T { + skipItems(1) + return awaitItem() + } + private fun createDefaultDirectLogoutPresenter( matrixClient: MatrixClient = FakeMatrixClient(), encryptionService: EncryptionService = FakeEncryptionService(), diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt index 9f0a91fa52..7343e56529 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesFlowNode.kt @@ -255,17 +255,21 @@ class MessagesFlowNode @AssistedInject constructor( overlay.show(navTarget) } is TimelineItemStickerContent -> { - val navTarget = NavTarget.MediaViewer( - mediaInfo = MediaInfo( - name = event.content.body, - mimeType = event.content.mimeType, - formattedFileSize = event.content.formattedFileSize, - fileExtension = event.content.fileExtension - ), - mediaSource = event.content.mediaSource, - thumbnailSource = event.content.thumbnailSource, - ) - overlay.show(navTarget) + /* Sticker may have an empty url and no thumbnail + if encrypted on certain bridges */ + if (event.content.preferredMediaSource != null) { + val navTarget = NavTarget.MediaViewer( + mediaInfo = MediaInfo( + name = event.content.body, + mimeType = event.content.mimeType, + formattedFileSize = event.content.formattedFileSize, + fileExtension = event.content.fileExtension + ), + mediaSource = event.content.preferredMediaSource, + thumbnailSource = event.content.thumbnailSource, + ) + overlay.show(navTarget) + } } is TimelineItemVideoContent -> { val navTarget = NavTarget.MediaViewer( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt index f8682cbd49..c02455d6d3 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt @@ -65,7 +65,7 @@ import io.element.android.features.networkmonitor.api.NetworkMonitor import io.element.android.features.networkmonitor.api.NetworkStatus import io.element.android.features.preferences.api.store.PreferencesStore import io.element.android.libraries.androidutils.clipboard.ClipboardHelper -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.core.meta.BuildMeta @@ -141,11 +141,11 @@ class MessagesPresenter @AssistedInject constructor( val userHasPermissionToSendMessage by room.canSendMessageAsState(type = MessageEventType.ROOM_MESSAGE, updateKey = syncUpdateFlow.value) val userHasPermissionToRedact by room.canRedactAsState(updateKey = syncUpdateFlow.value) val userHasPermissionToSendReaction by room.canSendMessageAsState(type = MessageEventType.REACTION_SENT, updateKey = syncUpdateFlow.value) - val roomName: Async by remember { - derivedStateOf { roomInfo?.name?.let { Async.Success(it) } ?: Async.Uninitialized } + val roomName: AsyncData by remember { + derivedStateOf { roomInfo?.name?.let { AsyncData.Success(it) } ?: AsyncData.Uninitialized } } - val roomAvatar: Async by remember { - derivedStateOf { roomInfo?.avatarData()?.let { Async.Success(it) } ?: Async.Uninitialized } + val roomAvatar: AsyncData by remember { + derivedStateOf { roomInfo?.avatarData()?.let { AsyncData.Success(it) } ?: AsyncData.Uninitialized } } var hasDismissedInviteDialog by rememberSaveable { @@ -162,7 +162,7 @@ class MessagesPresenter @AssistedInject constructor( } } - val inviteProgress = remember { mutableStateOf>(Async.Uninitialized) } + val inviteProgress = remember { mutableStateOf>(AsyncData.Uninitialized) } var showReinvitePrompt by remember { mutableStateOf(false) } LaunchedEffect(hasDismissedInviteDialog, composerState.hasFocus, syncUpdateFlow) { withContext(dispatchers.io) { @@ -279,8 +279,8 @@ class MessagesPresenter @AssistedInject constructor( .onFailure { Timber.e(it) } } - private fun CoroutineScope.reinviteOtherUser(inviteProgress: MutableState>) = launch(dispatchers.io) { - inviteProgress.value = Async.Loading() + private fun CoroutineScope.reinviteOtherUser(inviteProgress: MutableState>) = launch(dispatchers.io) { + inviteProgress.value = AsyncData.Loading() runCatching { room.updateMembers() @@ -296,10 +296,10 @@ class MessagesPresenter @AssistedInject constructor( }.getOrThrow() }.fold( onSuccess = { - inviteProgress.value = Async.Success(Unit) + inviteProgress.value = AsyncData.Success(Unit) }, onFailure = { - inviteProgress.value = Async.Failure(it) + inviteProgress.value = AsyncData.Failure(it) } ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt index c7ef5f320f..c196535607 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesState.kt @@ -25,7 +25,7 @@ import io.element.android.features.messages.impl.timeline.components.reactionsum import io.element.android.features.messages.impl.timeline.components.receipt.bottomsheet.ReadReceiptBottomSheetState import io.element.android.features.messages.impl.timeline.components.retrysendmenu.RetrySendMenuState import io.element.android.features.messages.impl.voicemessages.composer.VoiceMessageComposerState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.matrix.api.core.RoomId @@ -33,8 +33,8 @@ import io.element.android.libraries.matrix.api.core.RoomId @Immutable data class MessagesState( val roomId: RoomId, - val roomName: Async, - val roomAvatar: Async, + val roomName: AsyncData, + val roomAvatar: AsyncData, val userHasPermissionToSendMessage: Boolean, val userHasPermissionToRedact: Boolean, val userHasPermissionToSendReaction: Boolean, @@ -48,7 +48,7 @@ data class MessagesState( val readReceiptBottomSheetState: ReadReceiptBottomSheetState, val hasNetworkConnection: Boolean, val snackbarMessage: SnackbarMessage?, - val inviteProgress: Async, + val inviteProgress: AsyncData, val showReinvitePrompt: Boolean, val enableTextFormatting: Boolean, val enableVoiceMessages: Boolean, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt index 2984e4e087..8fc7466f95 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesStateProvider.kt @@ -29,7 +29,7 @@ import io.element.android.features.messages.impl.timeline.components.retrysendme import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemTextContent import io.element.android.features.messages.impl.voicemessages.composer.aVoiceMessageComposerState import io.element.android.features.messages.impl.voicemessages.composer.aVoiceMessagePreviewState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize import io.element.android.libraries.matrix.api.core.RoomId @@ -47,8 +47,8 @@ open class MessagesStateProvider : PreviewParameterProvider { aMessagesState().copy(userHasPermissionToSendMessage = false), aMessagesState().copy(showReinvitePrompt = true), aMessagesState().copy( - roomName = Async.Uninitialized, - roomAvatar = Async.Uninitialized, + roomName = AsyncData.Uninitialized, + roomAvatar = AsyncData.Uninitialized, ), aMessagesState().copy(composerState = aMessageComposerState().copy(showTextFormatting = true)), aMessagesState().copy( @@ -83,8 +83,8 @@ open class MessagesStateProvider : PreviewParameterProvider { fun aMessagesState() = MessagesState( roomId = RoomId("!id:domain"), - roomName = Async.Success("Room name"), - roomAvatar = Async.Success(AvatarData("!id:domain", "Room name", size = AvatarSize.TimelineRoom)), + roomName = AsyncData.Success("Room name"), + roomAvatar = AsyncData.Success(AvatarData("!id:domain", "Room name", size = AvatarSize.TimelineRoom)), userHasPermissionToSendMessage = true, userHasPermissionToRedact = false, userHasPermissionToSendReaction = true, @@ -117,7 +117,7 @@ fun aMessagesState() = MessagesState( ), hasNetworkConnection = true, snackbarMessage = null, - inviteProgress = Async.Uninitialized, + inviteProgress = AsyncData.Uninitialized, showReinvitePrompt = false, enableTextFormatting = true, enableVoiceMessages = true, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt index 9547d57ff7..591bbc166c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenter.kt @@ -152,7 +152,11 @@ class ActionListPresenter @Inject constructor( add(TimelineItemAction.Reply) } } - add(TimelineItemAction.Forward) + // Stickers can't be forwarded (yet) so we don't show the option + // See https://github.com/element-hq/element-x-android/issues/2161 + if (!timelineItem.isSticker) { + add(TimelineItemAction.Forward) + } } if (timelineItem.isMine && timelineItem.isTextMessage) { add(TimelineItemAction.Edit) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenter.kt index f61f0f7b52..604b652047 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/forward/ForwardMessagesPresenter.kt @@ -25,7 +25,7 @@ import androidx.compose.runtime.remember import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.RoomId @@ -48,7 +48,7 @@ class ForwardMessagesPresenter @AssistedInject constructor( fun create(eventId: String): ForwardMessagesPresenter } - private val forwardingActionState: MutableState>> = mutableStateOf(Async.Uninitialized) + private val forwardingActionState: MutableState>> = mutableStateOf(AsyncData.Uninitialized) fun onRoomSelected(roomIds: List) { matrixCoroutineScope.forwardEvent(eventId, roomIds.toPersistentList(), forwardingActionState) @@ -62,13 +62,13 @@ class ForwardMessagesPresenter @AssistedInject constructor( fun handleEvents(event: ForwardMessagesEvents) { when (event) { - ForwardMessagesEvents.ClearError -> forwardingActionState.value = Async.Uninitialized + ForwardMessagesEvents.ClearError -> forwardingActionState.value = AsyncData.Uninitialized } } return ForwardMessagesState( isForwarding = forwardingActionState.value.isLoading(), - error = (forwardingActionState.value as? Async.Failure)?.error, + error = (forwardingActionState.value as? AsyncData.Failure)?.error, forwardingSucceeded = forwardingSucceeded, eventSink = { handleEvents(it) } ) @@ -77,12 +77,12 @@ class ForwardMessagesPresenter @AssistedInject constructor( private fun CoroutineScope.forwardEvent( eventId: EventId, roomIds: ImmutableList, - isForwardMessagesState: MutableState>>, + isForwardMessagesState: MutableState>>, ) = launch { - isForwardMessagesState.value = Async.Loading() + isForwardMessagesState.value = AsyncData.Loading() room.forwardEvent(eventId, roomIds).fold( - { isForwardMessagesState.value = Async.Success(roomIds) }, - { isForwardMessagesState.value = Async.Failure(it) } + { isForwardMessagesState.value = AsyncData.Success(roomIds) }, + { isForwardMessagesState.value = AsyncData.Failure(it) } ) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt index d474e3d25f..a7040d50e4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenter.kt @@ -27,7 +27,7 @@ import androidx.compose.runtime.setValue import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runUpdatingState import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher @@ -60,14 +60,14 @@ class ReportMessagePresenter @AssistedInject constructor( val coroutineScope = rememberCoroutineScope() var reason by rememberSaveable { mutableStateOf("") } var blockUser by rememberSaveable { mutableStateOf(false) } - var result: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + var result: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } fun handleEvents(event: ReportMessageEvents) { when (event) { is ReportMessageEvents.UpdateReason -> reason = event.reason ReportMessageEvents.ToggleBlockUser -> blockUser = !blockUser ReportMessageEvents.Report -> coroutineScope.report(inputs.eventId, inputs.senderId, reason, blockUser, result) - ReportMessageEvents.ClearError -> result.value = Async.Uninitialized + ReportMessageEvents.ClearError -> result.value = AsyncAction.Uninitialized } } @@ -84,7 +84,7 @@ class ReportMessagePresenter @AssistedInject constructor( userId: UserId, reason: String, blockUser: Boolean, - result: MutableState>, + result: MutableState>, ) = launch { result.runUpdatingState { val userIdToBlock = userId.takeIf { blockUser } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageState.kt index 809668c88f..71afa43031 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageState.kt @@ -16,11 +16,11 @@ package io.element.android.features.messages.impl.report -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction data class ReportMessageState( val reason: String, val blockUser: Boolean, - val result: Async, + val result: AsyncAction, val eventSink: (ReportMessageEvents) -> Unit ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageStateProvider.kt index de5e787a3d..52f0948264 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.messages.impl.report import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction open class ReportMessageStateProvider : PreviewParameterProvider { override val values: Sequence @@ -25,9 +25,9 @@ open class ReportMessageStateProvider : PreviewParameterProvider = Async.Uninitialized, + result: AsyncAction = AsyncAction.Uninitialized, ) = ReportMessageState( reason = reason, blockUser = blockUser, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageView.kt index 6642ad4b55..2207c81750 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/report/ReportMessageView.kt @@ -41,8 +41,8 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.features.messages.impl.R -import io.element.android.libraries.architecture.Async -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -62,10 +62,10 @@ fun ReportMessageView( modifier: Modifier = Modifier, ) { val focusManager = LocalFocusManager.current - val isSending = state.result is Async.Loading - AsyncView( + val isSending = state.result is AsyncAction.Loading + AsyncActionView( async = state.result, - showProgressDialog = false, + progressDialog = {}, onSuccess = { onBackClicked() }, errorMessage = { stringResource(CommonStrings.error_unknown) }, onErrorDismiss = { state.eventSink(ReportMessageEvents.ClearError) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt index d80bde4cf4..7720295d1d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/MessagesReactionButton.kt @@ -24,7 +24,9 @@ import androidx.compose.foundation.border import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width @@ -41,6 +43,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import coil.compose.AsyncImage +import io.element.android.compound.theme.ElementTheme import io.element.android.features.messages.impl.R import io.element.android.features.messages.impl.timeline.model.AggregatedReaction import io.element.android.features.messages.impl.timeline.model.AggregatedReactionProvider @@ -52,7 +56,8 @@ 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.designsystem.utils.CommonDrawables -import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.matrix.api.media.MediaSource +import io.element.android.libraries.matrix.ui.media.MediaRequestData @Composable @OptIn(ExperimentalFoundationApi::class) @@ -114,8 +119,9 @@ sealed interface MessagesReactionsButtonContent { val isHighlighted get() = this is Reaction && reaction.isHighlighted } -private val reactionEmojiLineHeight = 20.sp -private val addEmojiSize = 16.dp +internal val REACTION_EMOJI_LINE_HEIGHT = 20.sp +internal const val REACTION_IMAGE_ASPECT_RATIO = 1.0f +private val ADD_EMOJI_SIZE = 16.dp @Composable private fun TextContent( @@ -123,7 +129,7 @@ private fun TextContent( modifier: Modifier = Modifier, ) = Text( modifier = modifier - .height(reactionEmojiLineHeight.toDp()), + .height(REACTION_EMOJI_LINE_HEIGHT.toDp()), text = text, style = ElementTheme.typography.fontBodyMdRegular, color = ElementTheme.materialColors.primary @@ -138,7 +144,7 @@ private fun IconContent( contentDescription = stringResource(id = R.string.screen_room_timeline_add_reaction), tint = ElementTheme.materialColors.secondary, modifier = modifier - .size(addEmojiSize) + .size(ADD_EMOJI_SIZE) ) @@ -150,13 +156,25 @@ private fun ReactionContent( verticalAlignment = Alignment.CenterVertically, modifier = modifier, ) { - Text( - text = reaction.displayKey, - style = ElementTheme.typography.fontBodyMdRegular.copy( - fontSize = 15.sp, - lineHeight = reactionEmojiLineHeight, - ), - ) + // Check if this is a custom reaction (MSC4027) + if (reaction.key.startsWith("mxc://")) { + AsyncImage( + modifier = modifier + .heightIn(min = REACTION_EMOJI_LINE_HEIGHT.toDp(), max = REACTION_EMOJI_LINE_HEIGHT.toDp()) + .aspectRatio(REACTION_IMAGE_ASPECT_RATIO, false), + model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), + contentDescription = null + ) + } + else { + Text( + text = reaction.displayKey, + style = ElementTheme.typography.fontBodyMdRegular.copy( + fontSize = 15.sp, + lineHeight = REACTION_EMOJI_LINE_HEIGHT, + ), + ) + } if (reaction.count > 1) { Spacer(modifier = Modifier.width(4.dp)) Text( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowTimestampPreview.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowTimestampPreview.kt index a1bef47731..e6525584b8 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowTimestampPreview.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowTimestampPreview.kt @@ -24,7 +24,6 @@ import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import org.jsoup.Jsoup @PreviewsDayNight @Composable @@ -38,18 +37,15 @@ internal fun TimelineItemEventRowTimestampPreview( "Text longer, displayed on 1 line", "Text which should be rendered on several lines", ).forEach { str -> - listOf(false, true).forEach { useDocument -> - ATimelineItemEventRow( - event = event.copy( - content = oldContent.copy( - body = str, - htmlDocument = if (useDocument) Jsoup.parse(str) else null, - ), - reactionsState = aTimelineItemReactions(count = 0), - senderDisplayName = if (useDocument) "Document case" else "Text case", + ATimelineItemEventRow( + event = event.copy( + content = oldContent.copy( + body = str, ), - ) - } + reactionsState = aTimelineItemReactions(count = 0), + senderDisplayName = "A sender", + ), + ) } } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt index c09221000f..2ed094c7a4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt @@ -21,6 +21,7 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.layout.Layout +import androidx.compose.ui.layout.SubcomposeLayout import androidx.compose.ui.platform.LocalLayoutDirection import androidx.compose.ui.text.TextLayoutResult import androidx.compose.ui.unit.Constraints @@ -58,23 +59,18 @@ fun ContentAvoidingLayout( ) { val scope = remember { ContentAvoidingLayoutScopeInstance() } - Layout( + SubcomposeLayout( modifier = modifier, - content = { - scope.content() - overlay() - } - ) { measurables, constraints -> - assert(measurables.size == 2) { "ContentAvoidingLayout must have exactly 2 children" } + ) { constraints -> // Measure the `overlay` view first, in case we need to shrink the `content` - val overlayPlaceable = measurables.last().measure(Constraints(minWidth = 0, maxWidth = constraints.maxWidth)) + val overlayPlaceable = subcompose(0, overlay).first().measure(Constraints(minWidth = 0, maxWidth = constraints.maxWidth)) val contentConstraints = if (shrinkContent) { Constraints(minWidth = 0, maxWidth = constraints.maxWidth - overlayPlaceable.width) } else { Constraints(minWidth = 0, maxWidth = constraints.maxWidth) } - val contentPlaceable = measurables.first().measure(contentConstraints) + val contentPlaceable = subcompose(1) { scope.content() }.first().measure(contentConstraints) var layoutWidth = contentPlaceable.width var layoutHeight = contentPlaceable.height diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt index 3e6568d880..24f6a52d0a 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt @@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.heightIn @@ -57,20 +58,27 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import coil.compose.AsyncImage +import io.element.android.compound.theme.ElementTheme +import io.element.android.features.messages.impl.timeline.components.REACTION_IMAGE_ASPECT_RATIO import io.element.android.features.messages.impl.timeline.model.AggregatedReaction import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.text.toDp import io.element.android.libraries.designsystem.theme.components.ModalBottomSheet 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.media.MediaSource import io.element.android.libraries.matrix.api.user.MatrixUser +import io.element.android.libraries.matrix.ui.media.MediaRequestData import io.element.android.libraries.matrix.ui.model.getAvatarData -import io.element.android.compound.theme.ElementTheme import kotlinx.coroutines.launch +internal val REACTION_SUMMARY_LINE_HEIGHT = 25.sp + @OptIn(ExperimentalMaterial3Api::class) @Composable fun ReactionSummaryView( @@ -192,13 +200,25 @@ private fun AggregatedReactionButton( verticalAlignment = Alignment.CenterVertically, modifier = Modifier, ) { - Text( - text = reaction.displayKey, - style = ElementTheme.typography.fontBodyMdRegular.copy( - fontSize = 20.sp, - lineHeight = 25.sp - ), - ) + // Check if this is a custom reaction (MSC4027) + if (reaction.key.startsWith("mxc://")) { + AsyncImage( + modifier = Modifier + .heightIn(min = REACTION_SUMMARY_LINE_HEIGHT.toDp(), max = REACTION_SUMMARY_LINE_HEIGHT.toDp()) + .aspectRatio(REACTION_IMAGE_ASPECT_RATIO, false), + model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), + contentDescription = null + ) + } + else { + Text( + text = reaction.displayKey, + style = ElementTheme.typography.fontBodyMdRegular.copy( + fontSize = 20.sp, + lineHeight = REACTION_SUMMARY_LINE_HEIGHT + ), + ) + } if (reaction.count > 1) { Spacer(modifier = Modifier.width(4.dp)) Text( @@ -206,7 +226,7 @@ private fun AggregatedReactionButton( color = textColor, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 20.sp, - lineHeight = 25.sp + lineHeight = REACTION_SUMMARY_LINE_HEIGHT ) ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt index f02140847e..733b9b8878 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactory.kt @@ -72,7 +72,7 @@ class TimelineItemContentMessageFactory @Inject constructor( suspend fun create(content: MessageContent, senderDisplayName: String, eventId: EventId?): TimelineItemEventContent { return when (val messageType = content.type) { is EmoteMessageType -> { - val emoteBody = "* $senderDisplayName ${messageType.body}" + val emoteBody = "* $senderDisplayName ${messageType.body.trimEnd()}" TimelineItemEmoteContent( body = emoteBody, htmlDocument = messageType.formatted?.toHtmlDocument(prefix = "* $senderDisplayName"), @@ -83,7 +83,7 @@ class TimelineItemContentMessageFactory @Inject constructor( is ImageMessageType -> { val aspectRatio = aspectRatioOf(messageType.info?.width, messageType.info?.height) TimelineItemImageContent( - body = messageType.body, + body = messageType.body.trimEnd(), mediaSource = messageType.source, thumbnailSource = messageType.info?.thumbnailSource, mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, @@ -98,7 +98,7 @@ class TimelineItemContentMessageFactory @Inject constructor( is StickerMessageType -> { val aspectRatio = aspectRatioOf(messageType.info?.width, messageType.info?.height) TimelineItemStickerContent( - body = messageType.body, + body = messageType.body.trimEnd(), mediaSource = messageType.source, thumbnailSource = messageType.info?.thumbnailSource, mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, @@ -113,16 +113,17 @@ class TimelineItemContentMessageFactory @Inject constructor( is LocationMessageType -> { val location = Location.fromGeoUri(messageType.geoUri) if (location == null) { + val body = messageType.body.trimEnd() TimelineItemTextContent( - body = messageType.body, + body = body, htmlDocument = null, - plainText = messageType.body, + plainText = body, formattedBody = null, isEdited = content.isEdited, ) } else { TimelineItemLocationContent( - body = messageType.body, + body = messageType.body.trimEnd(), location = location, description = messageType.description ) @@ -131,7 +132,7 @@ class TimelineItemContentMessageFactory @Inject constructor( is VideoMessageType -> { val aspectRatio = aspectRatioOf(messageType.info?.width, messageType.info?.height) TimelineItemVideoContent( - body = messageType.body, + body = messageType.body.trimEnd(), thumbnailSource = messageType.info?.thumbnailSource, videoSource = messageType.source, mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, @@ -146,7 +147,7 @@ class TimelineItemContentMessageFactory @Inject constructor( } is AudioMessageType -> { TimelineItemAudioContent( - body = messageType.body, + body = messageType.body.trimEnd(), mediaSource = messageType.source, duration = messageType.info?.duration ?: Duration.ZERO, mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, @@ -159,7 +160,7 @@ class TimelineItemContentMessageFactory @Inject constructor( true -> { TimelineItemVoiceContent( eventId = eventId, - body = messageType.body, + body = messageType.body.trimEnd(), mediaSource = messageType.source, duration = messageType.info?.duration ?: Duration.ZERO, mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, @@ -168,7 +169,7 @@ class TimelineItemContentMessageFactory @Inject constructor( } false -> { TimelineItemAudioContent( - body = messageType.body, + body = messageType.body.trimEnd(), mediaSource = messageType.source, duration = messageType.info?.duration ?: Duration.ZERO, mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, @@ -181,7 +182,7 @@ class TimelineItemContentMessageFactory @Inject constructor( is FileMessageType -> { val fileExtension = fileExtensionExtractor.extractFromName(messageType.body) TimelineItemFileContent( - body = messageType.body, + body = messageType.body.trimEnd(), thumbnailSource = messageType.info?.thumbnailSource, fileSource = messageType.source, mimeType = messageType.info?.mimetype ?: MimeTypes.fromFileExtension(fileExtension), @@ -189,26 +190,33 @@ class TimelineItemContentMessageFactory @Inject constructor( fileExtension = fileExtension ) } - is NoticeMessageType -> TimelineItemNoticeContent( - body = messageType.body, - htmlDocument = messageType.formatted?.toHtmlDocument(), - formattedBody = parseHtml(messageType.formatted) ?: messageType.body.withLinks(), - isEdited = content.isEdited, - ) - is TextMessageType -> { - TimelineItemTextContent( - body = messageType.body, + is NoticeMessageType -> { + val body = messageType.body.trimEnd() + TimelineItemNoticeContent( + body = body, htmlDocument = messageType.formatted?.toHtmlDocument(), - formattedBody = parseHtml(messageType.formatted) ?: messageType.body.withLinks(), + formattedBody = parseHtml(messageType.formatted) ?:body.withLinks(), + isEdited = content.isEdited, + ) + } + is TextMessageType -> { + val body = messageType.body.trimEnd() + TimelineItemTextContent( + body = body, + htmlDocument = messageType.formatted?.toHtmlDocument(), + formattedBody = parseHtml(messageType.formatted) ?: body.withLinks(), + isEdited = content.isEdited, + ) + } + is OtherMessageType -> { + val body = messageType.body.trimEnd() + TimelineItemTextContent( + body = body, + htmlDocument = null, + formattedBody = body.withLinks(), isEdited = content.isEdited, ) } - is OtherMessageType -> TimelineItemTextContent( - body = messageType.body, - htmlDocument = null, - formattedBody = messageType.body.withLinks(), - isEdited = content.isEdited, - ) } } @@ -225,7 +233,7 @@ class TimelineItemContentMessageFactory @Inject constructor( private fun parseHtml(formattedBody: FormattedBody?, prefix: String? = null): CharSequence? { if (formattedBody == null || formattedBody.format != MessageFormat.HTML) return null val result = htmlConverterProvider.provide() - .fromHtmlToSpans(formattedBody.body) + .fromHtmlToSpans(formattedBody.body.trimEnd()) .withFixedURLSpans() return if (prefix != null) { buildSpannedString { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt index 916a9b88b4..fda3f03b24 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItem.kt @@ -18,6 +18,7 @@ package io.element.android.features.messages.impl.timeline.model import androidx.compose.runtime.Immutable import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContent import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemVirtualModel import io.element.android.libraries.designsystem.components.avatar.AvatarData @@ -81,6 +82,8 @@ sealed interface TimelineItem { val isTextMessage: Boolean = content is TimelineItemTextBasedContent + val isSticker: Boolean = content is TimelineItemStickerContent + val isRemote = eventId != null } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContent.kt index e608ed824a..9c8070ecc9 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContent.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContent.kt @@ -16,7 +16,6 @@ package io.element.android.features.messages.impl.timeline.model.event -import io.element.android.libraries.core.mimetype.MimeTypes import io.element.android.libraries.matrix.api.media.MediaSource data class TimelineItemStickerContent( @@ -33,9 +32,7 @@ data class TimelineItemStickerContent( ) : TimelineItemEventContent { override val type: String = "TimelineItemStickerContent" - val preferredMediaSource = if (mimeType == MimeTypes.Gif) { - mediaSource - } else { - thumbnailSource ?: mediaSource - } + /* Stickers are supposed to be small images so + we allow using the mediaSource (unless the url is empty) */ + val preferredMediaSource = if (mediaSource.url.isEmpty()) thumbnailSource else mediaSource } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/messagesummary/MessageSummaryFormatterImpl.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/messagesummary/MessageSummaryFormatterImpl.kt index 589ecaede0..77842fa7cd 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/messagesummary/MessageSummaryFormatterImpl.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/utils/messagesummary/MessageSummaryFormatterImpl.kt @@ -42,6 +42,12 @@ import javax.inject.Inject class MessageSummaryFormatterImpl @Inject constructor( @ApplicationContext private val context: Context, ) : MessageSummaryFormatter { + + companion object { + // Max characters to display in the summary message. This works around https://github.com/element-hq/element-x-android/issues/2105 + private const val MAX_SAFE_LENGTH = 500 + } + override fun format(event: TimelineItem.Event): String { return when (event.content) { is TimelineItemTextBasedContent -> event.content.plainText @@ -58,6 +64,6 @@ class MessageSummaryFormatterImpl @Inject constructor( is TimelineItemVideoContent -> context.getString(CommonStrings.common_video) is TimelineItemFileContent -> context.getString(CommonStrings.common_file) is TimelineItemAudioContent -> context.getString(CommonStrings.common_audio) - } + }.take(MAX_SAFE_LENGTH) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/VoiceMessagePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/VoiceMessagePresenter.kt index fa6632308a..dfe8e92a01 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/VoiceMessagePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/VoiceMessagePresenter.kt @@ -33,7 +33,7 @@ import io.element.android.features.messages.impl.timeline.di.TimelineItemEventCo import io.element.android.features.messages.impl.timeline.di.TimelineItemPresenterFactory import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVoiceContent import io.element.android.features.messages.impl.voicemessages.VoiceMessageException -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runUpdatingState import io.element.android.libraries.di.RoomScope @@ -71,7 +71,7 @@ class VoiceMessagePresenter @AssistedInject constructor( body = content.body, ) - private val play = mutableStateOf>(Async.Uninitialized) + private val play = mutableStateOf>(AsyncData.Uninitialized) @Composable override fun present(): VoiceMessageState { @@ -91,8 +91,8 @@ class VoiceMessagePresenter @AssistedInject constructor( when { content.eventId == null -> VoiceMessageState.Button.Disabled playerState.isPlaying -> VoiceMessageState.Button.Pause - play.value is Async.Loading -> VoiceMessageState.Button.Downloading - play.value is Async.Failure -> VoiceMessageState.Button.Retry + play.value is AsyncData.Loading -> VoiceMessageState.Button.Downloading + play.value is AsyncData.Failure -> VoiceMessageState.Button.Retry else -> VoiceMessageState.Button.Play } } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesPresenterTest.kt index 876884b6cf..e173279ce9 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesPresenterTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/MessagesPresenterTest.kt @@ -51,7 +51,7 @@ import io.element.android.features.networkmonitor.test.FakeNetworkMonitor import io.element.android.features.poll.test.actions.FakeEndPollAction import io.element.android.features.poll.test.actions.FakeSendPollResponseAction import io.element.android.libraries.androidutils.clipboard.FakeClipboardHelper -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.core.mimetype.MimeTypes import io.element.android.libraries.designsystem.components.avatar.AvatarData @@ -117,14 +117,14 @@ class MessagesPresenterTest { }.test { val initialState = consumeItemsUntilTimeout().last() assertThat(initialState.roomId).isEqualTo(A_ROOM_ID) - assertThat(initialState.roomName).isEqualTo(Async.Success("")) + assertThat(initialState.roomName).isEqualTo(AsyncData.Success("")) assertThat(initialState.roomAvatar) - .isEqualTo(Async.Success(AvatarData(id = A_ROOM_ID.value, name = "", url = AN_AVATAR_URL, size = AvatarSize.TimelineRoom))) + .isEqualTo(AsyncData.Success(AvatarData(id = A_ROOM_ID.value, name = "", url = AN_AVATAR_URL, size = AvatarSize.TimelineRoom))) assertThat(initialState.userHasPermissionToSendMessage).isTrue() assertThat(initialState.userHasPermissionToRedact).isFalse() assertThat(initialState.hasNetworkConnection).isTrue() assertThat(initialState.snackbarMessage).isNull() - assertThat(initialState.inviteProgress).isEqualTo(Async.Uninitialized) + assertThat(initialState.inviteProgress).isEqualTo(AsyncData.Uninitialized) assertThat(initialState.showReinvitePrompt).isFalse() } } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenterTests.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenterTests.kt index d09feaf49f..3e6b6c9a67 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenterTests.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/report/ReportMessagePresenterTests.kt @@ -20,7 +20,7 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher import io.element.android.libraries.matrix.api.room.MatrixRoom import io.element.android.libraries.matrix.test.AN_EVENT_ID @@ -45,7 +45,7 @@ class ReportMessagePresenterTests { val initialState = awaitItem() assertThat(initialState.reason).isEmpty() assertThat(initialState.blockUser).isFalse() - assertThat(initialState.result).isInstanceOf(Async.Uninitialized::class.java) + assertThat(initialState.result).isInstanceOf(AsyncAction.Uninitialized::class.java) } } @@ -91,8 +91,8 @@ class ReportMessagePresenterTests { initialState.eventSink(ReportMessageEvents.ToggleBlockUser) skipItems(1) initialState.eventSink(ReportMessageEvents.Report) - assertThat(awaitItem().result).isInstanceOf(Async.Loading::class.java) - assertThat(awaitItem().result).isInstanceOf(Async.Success::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Loading::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Success::class.java) assertThat(room.reportedContentCount).isEqualTo(1) } } @@ -106,8 +106,8 @@ class ReportMessagePresenterTests { }.test { val initialState = awaitItem() initialState.eventSink(ReportMessageEvents.Report) - assertThat(awaitItem().result).isInstanceOf(Async.Loading::class.java) - assertThat(awaitItem().result).isInstanceOf(Async.Success::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Loading::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Success::class.java) assertThat(room.reportedContentCount).isEqualTo(1) } } @@ -123,13 +123,13 @@ class ReportMessagePresenterTests { }.test { val initialState = awaitItem() initialState.eventSink(ReportMessageEvents.Report) - assertThat(awaitItem().result).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Loading::class.java) val resultState = awaitItem() - assertThat(resultState.result).isInstanceOf(Async.Failure::class.java) + assertThat(resultState.result).isInstanceOf(AsyncAction.Failure::class.java) assertThat(room.reportedContentCount).isEqualTo(1) resultState.eventSink(ReportMessageEvents.ClearError) - assertThat(awaitItem().result).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Uninitialized::class.java) } } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt index df0ea43ce9..3c8ca8dc3b 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenter.kt @@ -32,7 +32,7 @@ import io.element.android.features.preferences.api.store.PreferencesStore import io.element.android.features.preferences.impl.tasks.ClearCacheUseCase import io.element.android.features.preferences.impl.tasks.ComputeCacheSizeUseCase import io.element.android.features.rageshake.api.preferences.RageshakePreferencesPresenter -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.bool.orFalse @@ -65,10 +65,10 @@ class DeveloperSettingsPresenter @Inject constructor( mutableStateMapOf() } val cacheSize = remember { - mutableStateOf>(Async.Uninitialized) + mutableStateOf>(AsyncData.Uninitialized) } val clearCacheAction = remember { - mutableStateOf>(Async.Uninitialized) + mutableStateOf>(AsyncData.Uninitialized) } val customElementCallBaseUrl by preferencesStore .getCustomElementCallBaseUrlFlow() @@ -154,13 +154,13 @@ class DeveloperSettingsPresenter @Inject constructor( } } - private fun CoroutineScope.computeCacheSize(cacheSize: MutableState>) = launch { + private fun CoroutineScope.computeCacheSize(cacheSize: MutableState>) = launch { suspend { computeCacheSizeUseCase() }.runCatchingUpdatingState(cacheSize) } - private fun CoroutineScope.clearCache(clearCacheAction: MutableState>) = launch { + private fun CoroutineScope.clearCache(clearCacheAction: MutableState>) = launch { suspend { clearCacheUseCase() }.runCatchingUpdatingState(clearCacheAction) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsState.kt index d49e94b309..9a12823686 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsState.kt @@ -17,15 +17,15 @@ package io.element.android.features.preferences.impl.developer import io.element.android.features.rageshake.api.preferences.RageshakePreferencesState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.featureflag.ui.model.FeatureUiModel import kotlinx.collections.immutable.ImmutableList data class DeveloperSettingsState( val features: ImmutableList, - val cacheSize: Async, + val cacheSize: AsyncData, val rageshakeState: RageshakePreferencesState, - val clearCacheAction: Async, + val clearCacheAction: AsyncData, val customElementCallBaseUrlState: CustomElementCallBaseUrlState, val eventSink: (DeveloperSettingsEvents) -> Unit ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsStateProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsStateProvider.kt index 719b736c09..e4643182f4 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsStateProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsStateProvider.kt @@ -18,14 +18,14 @@ package io.element.android.features.preferences.impl.developer import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.rageshake.api.preferences.aRageshakePreferencesState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.featureflag.ui.model.aFeatureUiModelList open class DeveloperSettingsStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aDeveloperSettingsState(), - aDeveloperSettingsState().copy(clearCacheAction = Async.Loading()), + aDeveloperSettingsState().copy(clearCacheAction = AsyncData.Loading()), aDeveloperSettingsState().copy( customElementCallBaseUrlState = CustomElementCallBaseUrlState( baseUrl = "https://call.element.ahoy", @@ -39,8 +39,8 @@ open class DeveloperSettingsStateProvider : PreviewParameterProvider = remember { mutableStateOf(systemNotificationsEnabledProvider.notificationsEnabled()) } - val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() val appNotificationsEnabled = userPushStore @@ -87,7 +87,7 @@ class NotificationSettingsPresenter @Inject constructor( NotificationSettingsEvents.RefreshSystemNotificationsEnabled -> { systemNotificationsEnabled.value = systemNotificationsEnabledProvider.notificationsEnabled() } - NotificationSettingsEvents.ClearNotificationChangeError -> changeNotificationSettingAction.value = Async.Uninitialized + NotificationSettingsEvents.ClearNotificationChangeError -> changeNotificationSettingAction.value = AsyncAction.Uninitialized } } @@ -119,7 +119,7 @@ class NotificationSettingsPresenter @Inject constructor( val oneToOneDefaultMode = notificationSettingsService.getDefaultRoomNotificationMode(isEncrypted = false, isOneToOne = true).getOrThrow() val encryptedOneToOneDefaultMode = notificationSettingsService.getDefaultRoomNotificationMode(isEncrypted = true, isOneToOne = true).getOrThrow() - if(groupDefaultMode != encryptedGroupDefaultMode || oneToOneDefaultMode != encryptedOneToOneDefaultMode) { + if (groupDefaultMode != encryptedGroupDefaultMode || oneToOneDefaultMode != encryptedOneToOneDefaultMode) { target.value = NotificationSettingsState.MatrixSettings.Invalid(fixFailed = false) return@launch } @@ -168,19 +168,19 @@ class NotificationSettingsPresenter @Inject constructor( ) } - private fun CoroutineScope.setAtRoomNotificationsEnabled(enabled: Boolean, action: MutableState>) = launch { + private fun CoroutineScope.setAtRoomNotificationsEnabled(enabled: Boolean, action: MutableState>) = launch { suspend { notificationSettingsService.setRoomMentionEnabled(enabled).getOrThrow() }.runCatchingUpdatingState(action) } - private fun CoroutineScope.setCallNotificationsEnabled(enabled: Boolean, action: MutableState>) = launch { + private fun CoroutineScope.setCallNotificationsEnabled(enabled: Boolean, action: MutableState>) = launch { suspend { notificationSettingsService.setCallEnabled(enabled).getOrThrow() }.runCatchingUpdatingState(action) } - private fun CoroutineScope.setInviteForMeNotificationsEnabled(enabled: Boolean, action: MutableState>) = launch { + private fun CoroutineScope.setInviteForMeNotificationsEnabled(enabled: Boolean, action: MutableState>) = launch { suspend { notificationSettingsService.setInviteForMeEnabled(enabled).getOrThrow() }.runCatchingUpdatingState(action) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsState.kt index 581f0e8475..6999acb103 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsState.kt @@ -17,18 +17,18 @@ package io.element.android.features.preferences.impl.notifications import androidx.compose.runtime.Immutable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.room.RoomNotificationMode @Immutable data class NotificationSettingsState( val matrixSettings: MatrixSettings, val appSettings: AppSettings, - val changeNotificationSettingAction: Async, + val changeNotificationSettingAction: AsyncAction, val eventSink: (NotificationSettingsEvents) -> Unit, ) { sealed interface MatrixSettings { - data object Uninitialized : MatrixSettings + data object Uninitialized : MatrixSettings data class Valid( val atRoomNotificationsEnabled: Boolean, val callNotificationsEnabled: Boolean, @@ -39,7 +39,7 @@ data class NotificationSettingsState( data class Invalid( val fixFailed: Boolean - ) : MatrixSettings + ) : MatrixSettings } data class AppSettings( diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsStateProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsStateProvider.kt index f121a2fe60..2dc0c02145 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsStateProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsStateProvider.kt @@ -17,20 +17,20 @@ package io.element.android.features.preferences.impl.notifications import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.room.RoomNotificationMode open class NotificationSettingsStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aNotificationSettingsState(), - aNotificationSettingsState(changeNotificationSettingAction = Async.Loading(Unit)), - aNotificationSettingsState(changeNotificationSettingAction = Async.Failure(Throwable("error"))), + aNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Loading), + aNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Failure(Throwable("error"))), ) } fun aNotificationSettingsState( - changeNotificationSettingAction: Async = Async.Uninitialized, + changeNotificationSettingAction: AsyncAction = AsyncAction.Uninitialized, ) = NotificationSettingsState( matrixSettings = NotificationSettingsState.MatrixSettings.Valid( atRoomNotificationsEnabled = true, diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsView.kt index f1066b2e9d..da8d79be50 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsView.kt @@ -27,7 +27,7 @@ import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.preferences.impl.R import io.element.android.libraries.androidutils.system.startNotificationSettingsIntent import io.element.android.libraries.designsystem.atomic.molecules.DialogLikeBannerMolecule -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.components.preferences.PreferenceCategory import io.element.android.libraries.designsystem.components.preferences.PreferencePage @@ -80,7 +80,7 @@ fun NotificationSettingsView( onInviteForMeNotificationsChanged = { state.eventSink(NotificationSettingsEvents.SetInviteForMeNotificationsEnabled(it)) }, ) } - AsyncView( + AsyncActionView( async = state.changeNotificationSettingAction, errorMessage = { stringResource(R.string.screen_notification_settings_edit_failed_updating_default_mode) }, onErrorDismiss = { state.eventSink(NotificationSettingsEvents.ClearNotificationChangeError) }, diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt index 7617e68dd6..04accef4ea 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingPresenter.kt @@ -27,7 +27,7 @@ import androidx.compose.runtime.setValue import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.MatrixClient @@ -55,6 +55,7 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( interface Factory { fun create(oneToOne: Boolean): EditDefaultNotificationSettingPresenter } + @Composable override fun present(): EditDefaultNotificationSettingState { var displayMentionsOnlyDisclaimer by remember { mutableStateOf(false) } @@ -63,7 +64,7 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( mutableStateOf(null) } - val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val roomsWithUserDefinedMode: MutableState> = remember { mutableStateOf(listOf()) @@ -82,7 +83,7 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( is EditDefaultNotificationSettingStateEvents.SetNotificationMode -> { localCoroutineScope.setDefaultNotificationMode(event.mode, changeNotificationSettingAction) } - EditDefaultNotificationSettingStateEvents.ClearError -> changeNotificationSettingAction.value = Async.Uninitialized + EditDefaultNotificationSettingStateEvents.ClearError -> changeNotificationSettingAction.value = AsyncAction.Uninitialized } } @@ -132,17 +133,16 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( roomWithUserDefinedRules.contains(it.identifier()) && isOneToOne == room.isOneToOne } // locale sensitive sorting - .sortedWith(compareBy(Collator.getInstance()){ it.details.name }) + .sortedWith(compareBy(Collator.getInstance()) { it.details.name }) roomsWithUserDefinedMode.value = sortedSummaries } - private fun CoroutineScope.setDefaultNotificationMode(mode: RoomNotificationMode, action: MutableState>) = launch { + private fun CoroutineScope.setDefaultNotificationMode(mode: RoomNotificationMode, action: MutableState>) = launch { suspend { // On modern clients, we don't have different settings for encrypted and non-encrypted rooms (Legacy clients did). notificationSettingsService.setDefaultRoomNotificationMode(isEncrypted = true, mode = mode, isOneToOne = isOneToOne).getOrThrow() notificationSettingsService.setDefaultRoomNotificationMode(isEncrypted = false, mode = mode, isOneToOne = isOneToOne).getOrThrow() }.runCatchingUpdatingState(action) } - } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingState.kt index 7086835478..68b29232b0 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingState.kt @@ -16,7 +16,7 @@ package io.element.android.features.preferences.impl.notifications.edit -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.roomlist.RoomSummary import kotlinx.collections.immutable.ImmutableList @@ -25,7 +25,7 @@ data class EditDefaultNotificationSettingState( val isOneToOne: Boolean, val mode: RoomNotificationMode?, val roomsWithUserDefinedMode: ImmutableList, - val changeNotificationSettingAction: Async, + val changeNotificationSettingAction: AsyncAction, val displayMentionsOnlyDisclaimer: Boolean, val eventSink: (EditDefaultNotificationSettingStateEvents) -> Unit, ) 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..0c4ef95c6c 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 @@ -17,27 +17,27 @@ package io.element.android.features.preferences.impl.notifications.edit import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.room.RoomNotificationMode 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(), anEditDefaultNotificationSettingsState(isOneToOne = true), - anEditDefaultNotificationSettingsState(changeNotificationSettingAction = Async.Loading(Unit)), - anEditDefaultNotificationSettingsState(changeNotificationSettingAction = Async.Failure(Throwable("error"))), + anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Loading), + anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Failure(Throwable("error"))), anEditDefaultNotificationSettingsState(displayMentionsOnlyDisclaimer = true), ) } private fun anEditDefaultNotificationSettingsState( isOneToOne: Boolean = false, - changeNotificationSettingAction: Async = Async.Uninitialized, + changeNotificationSettingAction: AsyncAction = AsyncAction.Uninitialized, displayMentionsOnlyDisclaimer: Boolean = false, ) = EditDefaultNotificationSettingState( isOneToOne = isOneToOne, 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..d03b8b2754 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 @@ -23,7 +23,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.features.preferences.impl.R -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarData import io.element.android.libraries.designsystem.components.avatar.AvatarSize @@ -117,7 +117,7 @@ fun EditDefaultNotificationSettingView( } } } - AsyncView( + AsyncActionView( async = state.changeNotificationSettingAction, errorMessage = { stringResource(R.string.screen_notification_settings_edit_failed_updating_default_mode) }, onErrorDismiss = { state.eventSink(EditDefaultNotificationSettingStateEvents.ClearError) }, diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt index db8c5b97b9..b99c197d69 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.preferences.impl.root import io.element.android.features.logout.api.direct.DirectLogoutState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.ui.strings.CommonStrings @@ -39,7 +39,6 @@ fun aPreferencesRootState() = PreferencesRootState( fun aDirectLogoutState() = DirectLogoutState( canDoDirectSignOut = true, - showConfirmationDialog = false, - logoutAction = Async.Uninitialized, + logoutAction = AsyncAction.Uninitialized, eventSink = {}, ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt index be0a5f4cca..2a51aad22b 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt @@ -31,7 +31,7 @@ import androidx.core.net.toUri import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.mimetype.MimeTypes @@ -92,7 +92,7 @@ class EditUserProfilePresenter @AssistedInject constructor( } } - val saveAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val saveAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() fun handleEvents(event: EditUserProfileEvents) { when (event) { @@ -111,7 +111,7 @@ class EditUserProfilePresenter @AssistedInject constructor( } is EditUserProfileEvents.UpdateDisplayName -> userDisplayName = event.name - EditUserProfileEvents.CancelSaveChanges -> saveAction.value = Async.Uninitialized + EditUserProfileEvents.CancelSaveChanges -> saveAction.value = AsyncAction.Uninitialized } } @@ -126,7 +126,7 @@ class EditUserProfilePresenter @AssistedInject constructor( displayName = userDisplayName.orEmpty(), userAvatarUrl = userAvatarUri, avatarActions = avatarActions, - saveButtonEnabled = canSave && saveAction.value !is Async.Loading, + saveButtonEnabled = canSave && saveAction.value !is AsyncAction.Loading, saveAction = saveAction.value, cameraPermissionState = cameraPermissionState, eventSink = { handleEvents(it) }, @@ -140,7 +140,12 @@ class EditUserProfilePresenter @AssistedInject constructor( // Need to call `toUri()?.toString()` to make the test pass (we mockk Uri) avatarUri?.toString()?.trim() != currentUser.avatarUrl?.toUri()?.toString()?.trim() - private fun CoroutineScope.saveChanges(name: String?, avatarUri: Uri?, currentUser: MatrixUser, action: MutableState>) = launch { + private fun CoroutineScope.saveChanges( + name: String?, + avatarUri: Uri?, + currentUser: MatrixUser, + action: MutableState>, + ) = launch { val results = mutableListOf>() suspend { if (!name.isNullOrEmpty() && name.trim() != currentUser.displayName.orEmpty().trim()) { diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileState.kt index 9561c8609b..c37dba8c3a 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileState.kt @@ -17,7 +17,7 @@ package io.element.android.features.preferences.impl.user.editprofile import android.net.Uri -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.ui.media.AvatarAction import io.element.android.libraries.permissions.api.PermissionsState @@ -29,7 +29,7 @@ data class EditUserProfileState( val userAvatarUrl: Uri?, val avatarActions: ImmutableList, val saveButtonEnabled: Boolean, - val saveAction: Async, + val saveAction: AsyncAction, val cameraPermissionState: PermissionsState, val eventSink: (EditUserProfileEvents) -> Unit ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileStateProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileStateProvider.kt index c4a8431f4f..9d0d027433 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileStateProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.preferences.impl.user.editprofile import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.permissions.api.aPermissionsState import kotlinx.collections.immutable.persistentListOf @@ -35,7 +35,7 @@ fun aEditUserProfileState() = EditUserProfileState( displayName = "John Doe", userAvatarUrl = null, avatarActions = persistentListOf(), - saveAction = Async.Uninitialized, + saveAction = AsyncAction.Uninitialized, saveButtonEnabled = true, cameraPermissionState = aPermissionsState(showDialog = false), eventSink = {} diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileView.kt index 66aaeb6c40..ff587b217d 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfileView.kt @@ -43,7 +43,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.features.preferences.impl.R import io.element.android.libraries.designsystem.components.LabelledOutlinedTextField -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.avatar.AvatarSize import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview @@ -57,6 +57,7 @@ import io.element.android.libraries.matrix.ui.components.AvatarActionBottomSheet import io.element.android.libraries.matrix.ui.components.EditableAvatarView import io.element.android.libraries.permissions.api.PermissionsView import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.components.async.AsyncActionViewDefaults import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.coroutines.launch @@ -147,9 +148,13 @@ fun EditUserProfileView( onActionSelected = { state.eventSink(EditUserProfileEvents.HandleAvatarAction(it)) } ) - AsyncView( + AsyncActionView( async = state.saveAction, - progressText = stringResource(R.string.screen_edit_profile_updating_details), + progressDialog = { + AsyncActionViewDefaults.ProgressDialog( + progressText = stringResource(R.string.screen_edit_profile_updating_details), + ) + }, onSuccess = { onProfileEdited() }, errorTitle = { stringResource(R.string.screen_edit_profile_error_title) }, errorMessage = { stringResource(R.string.screen_edit_profile_error) }, diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenterTest.kt index 07705446d9..9872ed0804 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenterTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsPresenterTest.kt @@ -26,7 +26,7 @@ import io.element.android.features.preferences.impl.tasks.FakeComputeCacheSizeUs import io.element.android.features.rageshake.impl.preferences.DefaultRageshakePreferencesPresenter import io.element.android.features.rageshake.test.rageshake.FakeRageShake import io.element.android.features.rageshake.test.rageshake.FakeRageshakeDataStore -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.featureflag.api.FeatureFlags import io.element.android.libraries.featureflag.test.FakeFeatureFlagService import io.element.android.libraries.featureflag.test.InMemoryPreferencesStore @@ -49,8 +49,8 @@ class DeveloperSettingsPresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.features).isEmpty() - assertThat(initialState.clearCacheAction).isEqualTo(Async.Uninitialized) - assertThat(initialState.cacheSize).isEqualTo(Async.Uninitialized) + assertThat(initialState.clearCacheAction).isEqualTo(AsyncData.Uninitialized) + assertThat(initialState.cacheSize).isEqualTo(AsyncData.Uninitialized) assertThat(initialState.customElementCallBaseUrlState).isNotNull() assertThat(initialState.customElementCallBaseUrlState.baseUrl).isNull() val loadedState = awaitItem() @@ -105,9 +105,9 @@ class DeveloperSettingsPresenterTest { assertThat(clearCacheUseCase.executeHasBeenCalled).isFalse() initialState.eventSink(DeveloperSettingsEvents.ClearCache) val stateAfterEvent = awaitItem() - assertThat(stateAfterEvent.clearCacheAction).isInstanceOf(Async.Loading::class.java) + assertThat(stateAfterEvent.clearCacheAction).isInstanceOf(AsyncData.Loading::class.java) skipItems(1) - assertThat(awaitItem().clearCacheAction).isInstanceOf(Async.Success::class.java) + assertThat(awaitItem().clearCacheAction).isInstanceOf(AsyncData.Success::class.java) assertThat(clearCacheUseCase.executeHasBeenCalled).isTrue() cancelAndIgnoreRemainingEvents() } diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt index fc657bfbd7..0a2dd8efe3 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenterTest.kt @@ -23,7 +23,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.logout.api.direct.DirectLogoutPresenter import io.element.android.features.logout.api.direct.DirectLogoutState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.core.meta.BuildType import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher import io.element.android.libraries.featureflag.test.FakeFeatureFlagService @@ -47,8 +47,7 @@ class PreferencesRootPresenterTest { private val aDirectLogoutState = DirectLogoutState( canDoDirectSignOut = true, - showConfirmationDialog = false, - logoutAction = Async.Uninitialized, + logoutAction = AsyncAction.Uninitialized, eventSink = {}, ) diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenterTest.kt index 3e32ed675f..8b3bb0c2f8 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenterTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenterTest.kt @@ -21,7 +21,7 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.MatrixClient import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.test.AN_AVATAR_URL @@ -110,7 +110,7 @@ class EditUserProfilePresenterTest { AvatarAction.Remove ) assertThat(initialState.saveButtonEnabled).isFalse() - assertThat(initialState.saveAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(initialState.saveAction).isInstanceOf(AsyncAction.Uninitialized::class.java) } } @@ -359,7 +359,7 @@ class EditUserProfilePresenterTest { initialState.eventSink(EditUserProfileEvents.Save) skipItems(2) assertThat(matrixClient.uploadAvatarCalled).isFalse() - assertThat(awaitItem().saveAction).isInstanceOf(Async.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) } } @@ -406,9 +406,9 @@ class EditUserProfilePresenterTest { initialState.eventSink(EditUserProfileEvents.UpdateDisplayName("foo")) initialState.eventSink(EditUserProfileEvents.Save) skipItems(2) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) initialState.eventSink(EditUserProfileEvents.CancelSaveChanges) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Uninitialized::class.java) } } @@ -421,8 +421,8 @@ class EditUserProfilePresenterTest { initialState.eventSink(event) initialState.eventSink(EditUserProfileEvents.Save) skipItems(1) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Loading::class.java) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Loading::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) } } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt index e90787ab5c..34506b8e8d 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenter.kt @@ -30,7 +30,7 @@ import io.element.android.features.rageshake.api.reporter.BugReporter import io.element.android.features.rageshake.api.reporter.BugReporterListener import io.element.android.features.rageshake.api.screenshot.ScreenshotHolder import io.element.android.features.rageshake.impl.logs.VectorFileLogger -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -45,27 +45,27 @@ class BugReportPresenter @Inject constructor( private class BugReporterUploadListener( private val sendingProgress: MutableFloatState, - private val sendingAction: MutableState> + private val sendingAction: MutableState> ) : BugReporterListener { override fun onUploadCancelled() { sendingProgress.floatValue = 0f - sendingAction.value = Async.Uninitialized + sendingAction.value = AsyncAction.Uninitialized } override fun onUploadFailed(reason: String?) { sendingProgress.floatValue = 0f - sendingAction.value = Async.Failure(Exception(reason)) + sendingAction.value = AsyncAction.Failure(Exception(reason)) } override fun onProgress(progress: Int) { sendingProgress.floatValue = progress.toFloat() / 100 - sendingAction.value = Async.Loading() + sendingAction.value = AsyncAction.Loading } override fun onUploadSucceed() { sendingProgress.floatValue = 0f - sendingAction.value = Async.Success(Unit) + sendingAction.value = AsyncAction.Success(Unit) } } @@ -83,8 +83,8 @@ class BugReportPresenter @Inject constructor( val sendingProgress = remember { mutableFloatStateOf(0f) } - val sendingAction: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val sendingAction: MutableState> = remember { + mutableStateOf(AsyncAction.Uninitialized) } val formState: MutableState = remember { mutableStateOf(BugReportFormState.Default) @@ -109,7 +109,7 @@ class BugReportPresenter @Inject constructor( } BugReportEvents.ClearError -> { sendingProgress.floatValue = 0f - sendingAction.value = Async.Uninitialized + sendingAction.value = AsyncAction.Uninitialized } } } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt index b8bbe62dc6..c3bfbec888 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportState.kt @@ -17,7 +17,7 @@ package io.element.android.features.rageshake.impl.bugreport import android.os.Parcelable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import kotlinx.parcelize.Parcelize data class BugReportState( @@ -25,11 +25,11 @@ data class BugReportState( val hasCrashLogs: Boolean, val screenshotUri: String?, val sendingProgress: Float, - val sending: Async, + val sending: AsyncAction, val eventSink: (BugReportEvents) -> Unit ) { val submitEnabled = - formState.description.length > 10 && sending !is Async.Loading + formState.description.length > 10 && sending !is AsyncAction.Loading } @Parcelize diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt index 3601c2a259..bb0d273de4 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.rageshake.impl.bugreport import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction open class BugReportStateProvider : PreviewParameterProvider { override val values: Sequence @@ -31,8 +31,8 @@ open class BugReportStateProvider : PreviewParameterProvider { hasCrashLogs = true, screenshotUri = "aUri" ), - aBugReportState().copy(sending = Async.Loading()), - aBugReportState().copy(sending = Async.Success(Unit)), + aBugReportState().copy(sending = AsyncAction.Loading), + aBugReportState().copy(sending = AsyncAction.Success(Unit)), ) } @@ -41,6 +41,6 @@ fun aBugReportState() = BugReportState( hasCrashLogs = false, screenshotUri = null, sendingProgress = 0F, - sending = Async.Uninitialized, + sending = AsyncAction.Uninitialized, eventSink = {} ) diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt index 7833c21764..11843553e8 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportView.kt @@ -37,8 +37,8 @@ import androidx.compose.ui.unit.dp import coil.compose.AsyncImage import coil.request.ImageRequest import io.element.android.features.rageshake.impl.R -import io.element.android.libraries.architecture.Async -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.form.textFieldState import io.element.android.libraries.designsystem.components.preferences.PreferencePage import io.element.android.libraries.designsystem.components.preferences.PreferenceRow @@ -67,7 +67,7 @@ fun BugReportView( title = stringResource(id = CommonStrings.common_report_a_problem), onBackPressed = onBackPressed ) { - val isFormEnabled = state.sending !is Async.Loading + val isFormEnabled = state.sending !is AsyncAction.Loading var descriptionFieldState by textFieldState( stateValue = state.formState.description ) @@ -150,9 +150,9 @@ fun BugReportView( } } - AsyncView( + AsyncActionView( async = state.sending, - showProgressDialog = false, + progressDialog = { }, onSuccess = { eventSink(BugReportEvents.ResetAll) onDone() diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt index 3360ce3dd3..9161862256 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/bugreport/BugReportPresenterTest.kt @@ -24,7 +24,7 @@ import io.element.android.features.rageshake.test.crash.A_CRASH_DATA import io.element.android.features.rageshake.test.crash.FakeCrashDataStore import io.element.android.features.rageshake.test.screenshot.A_SCREENSHOT_URI import io.element.android.features.rageshake.test.screenshot.FakeScreenshotHolder -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.test.A_FAILURE_REASON import io.element.android.tests.testutils.WarmUpRule import kotlinx.coroutines.test.runTest @@ -53,7 +53,7 @@ class BugReportPresenterTest { val initialState = awaitItem() assertThat(initialState.hasCrashLogs).isFalse() assertThat(initialState.formState).isEqualTo(BugReportFormState.Default) - assertThat(initialState.sending).isEqualTo(Async.Uninitialized) + assertThat(initialState.sending).isEqualTo(AsyncAction.Uninitialized) assertThat(initialState.screenshotUri).isNull() assertThat(initialState.sendingProgress).isEqualTo(0f) assertThat(initialState.submitEnabled).isFalse() @@ -174,13 +174,13 @@ class BugReportPresenterTest { initialState.eventSink.invoke(BugReportEvents.SendBugReport) skipItems(1) val progressState = awaitItem() - assertThat(progressState.sending).isEqualTo(Async.Loading(null)) + assertThat(progressState.sending).isEqualTo(AsyncAction.Loading) assertThat(progressState.sendingProgress).isEqualTo(0f) assertThat(progressState.submitEnabled).isFalse() assertThat(awaitItem().sendingProgress).isEqualTo(0.5f) assertThat(awaitItem().sendingProgress).isEqualTo(1f) skipItems(1) - assertThat(awaitItem().sending).isEqualTo(Async.Success(Unit)) + assertThat(awaitItem().sending).isEqualTo(AsyncAction.Success(Unit)) } } @@ -199,17 +199,17 @@ class BugReportPresenterTest { initialState.eventSink.invoke(BugReportEvents.SendBugReport) skipItems(1) val progressState = awaitItem() - assertThat(progressState.sending).isEqualTo(Async.Loading(null)) + assertThat(progressState.sending).isEqualTo(AsyncAction.Loading) assertThat(progressState.sendingProgress).isEqualTo(0f) assertThat(awaitItem().sendingProgress).isEqualTo(0.5f) // Failure assertThat(awaitItem().sendingProgress).isEqualTo(0f) - assertThat((awaitItem().sending as Async.Failure).error.message).isEqualTo(A_FAILURE_REASON) + assertThat((awaitItem().sending as AsyncAction.Failure).error.message).isEqualTo(A_FAILURE_REASON) // Reset failure initialState.eventSink.invoke(BugReportEvents.ClearError) val lastItem = awaitItem() assertThat(lastItem.sendingProgress).isEqualTo(0f) - assertThat(lastItem.sending).isInstanceOf(Async.Uninitialized::class.java) + assertThat(lastItem.sending).isInstanceOf(AsyncAction.Uninitialized::class.java) } } @@ -228,12 +228,12 @@ class BugReportPresenterTest { initialState.eventSink.invoke(BugReportEvents.SendBugReport) skipItems(1) val progressState = awaitItem() - assertThat(progressState.sending).isEqualTo(Async.Loading(null)) + assertThat(progressState.sending).isEqualTo(AsyncAction.Loading) assertThat(progressState.sendingProgress).isEqualTo(0f) assertThat(awaitItem().sendingProgress).isEqualTo(0.5f) // Cancelled assertThat(awaitItem().sendingProgress).isEqualTo(0f) - assertThat(awaitItem().sending).isEqualTo(Async.Uninitialized) + assertThat(awaitItem().sending).isEqualTo(AsyncAction.Uninitialized) } } } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/blockuser/BlockUserSection.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/blockuser/BlockUserSection.kt index b99319812b..4ca3c313de 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/blockuser/BlockUserSection.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/blockuser/BlockUserSection.kt @@ -26,7 +26,7 @@ import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.roomdetails.impl.R import io.element.android.features.roomdetails.impl.members.details.RoomMemberDetailsEvents import io.element.android.features.roomdetails.impl.members.details.RoomMemberDetailsState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.core.bool.orFalse import io.element.android.libraries.designsystem.components.dialogs.RetryDialog import io.element.android.libraries.designsystem.components.list.ListItemContent @@ -42,13 +42,13 @@ import io.element.android.libraries.ui.strings.CommonStrings internal fun BlockUserSection(state: RoomMemberDetailsState, modifier: Modifier = Modifier) { PreferenceCategory(showDivider = false, modifier = modifier) { when (state.isBlocked) { - is Async.Failure -> PreferenceBlockUser(isBlocked = state.isBlocked.prevData, isLoading = false, eventSink = state.eventSink) - is Async.Loading -> PreferenceBlockUser(isBlocked = state.isBlocked.prevData, isLoading = true, eventSink = state.eventSink) - is Async.Success -> PreferenceBlockUser(isBlocked = state.isBlocked.data, isLoading = false, eventSink = state.eventSink) - Async.Uninitialized -> PreferenceBlockUser(isBlocked = null, isLoading = true, eventSink = state.eventSink) + is AsyncData.Failure -> PreferenceBlockUser(isBlocked = state.isBlocked.prevData, isLoading = false, eventSink = state.eventSink) + is AsyncData.Loading -> PreferenceBlockUser(isBlocked = state.isBlocked.prevData, isLoading = true, eventSink = state.eventSink) + is AsyncData.Success -> PreferenceBlockUser(isBlocked = state.isBlocked.data, isLoading = false, eventSink = state.eventSink) + AsyncData.Uninitialized -> PreferenceBlockUser(isBlocked = null, isLoading = true, eventSink = state.eventSink) } } - if (state.isBlocked is Async.Failure) { + if (state.isBlocked is AsyncData.Failure) { RetryDialog( content = stringResource(CommonStrings.error_unknown), onDismiss = { state.eventSink(RoomMemberDetailsEvents.ClearBlockUserError) }, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt index 40df3791d4..6682db392f 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditPresenter.kt @@ -29,7 +29,7 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.core.net.toUri -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.mimetype.MimeTypes @@ -116,7 +116,7 @@ class RoomDetailsEditPresenter @Inject constructor( } } - val saveAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val saveAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() fun handleEvents(event: RoomDetailsEditEvents) { when (event) { @@ -136,7 +136,7 @@ class RoomDetailsEditPresenter @Inject constructor( is RoomDetailsEditEvents.UpdateRoomName -> roomName = event.name is RoomDetailsEditEvents.UpdateRoomTopic -> roomTopic = event.topic.takeUnless { it.isEmpty() } - RoomDetailsEditEvents.CancelSaveChanges -> saveAction.value = Async.Uninitialized + RoomDetailsEditEvents.CancelSaveChanges -> saveAction.value = AsyncAction.Uninitialized } } @@ -156,7 +156,12 @@ class RoomDetailsEditPresenter @Inject constructor( ) } - private fun CoroutineScope.saveChanges(name: String, topic: String?, avatarUri: Uri?, action: MutableState>) = launch { + private fun CoroutineScope.saveChanges( + name: String, + topic: String?, + avatarUri: Uri?, + action: MutableState>, + ) = launch { val results = mutableListOf>() suspend { if (topic.orEmpty().trim() != room.topic.orEmpty().trim()) { diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditState.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditState.kt index 9258d882fc..d85450b59f 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditState.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditState.kt @@ -17,7 +17,7 @@ package io.element.android.features.roomdetails.impl.edit import android.net.Uri -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.ui.media.AvatarAction import io.element.android.libraries.permissions.api.PermissionsState import kotlinx.collections.immutable.ImmutableList @@ -32,7 +32,7 @@ data class RoomDetailsEditState( val canChangeAvatar: Boolean, val avatarActions: ImmutableList, val saveButtonEnabled: Boolean, - val saveAction: Async, + val saveAction: AsyncAction, val cameraPermissionState: PermissionsState, val eventSink: (RoomDetailsEditEvents) -> Unit ) diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditStateProvider.kt index 730acaa1c5..d70c83b9a0 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditStateProvider.kt @@ -18,7 +18,7 @@ package io.element.android.features.roomdetails.impl.edit import android.net.Uri import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.permissions.api.aPermissionsState import kotlinx.collections.immutable.persistentListOf @@ -30,8 +30,8 @@ open class RoomDetailsEditStateProvider : PreviewParameterProvider>>(Async.Loading()) } + val roomMembers = remember { mutableStateOf>>(AsyncData.Loading()) } val selectedUsers = remember { mutableStateOf>(persistentListOf()) } val searchResults = remember { mutableStateOf>>(SearchBarResultState.Empty()) } var searchQuery by rememberSaveable { mutableStateOf("") } @@ -124,7 +124,7 @@ class RoomInviteMembersPresenter @Inject constructor( private suspend fun performSearch( searchResults: MutableState>>, - roomMembers: MutableState>>, + roomMembers: MutableState>>, selectedUsers: MutableState>, isFetchingSearchResults: MutableState, searchQuery: String, @@ -154,7 +154,7 @@ class RoomInviteMembersPresenter @Inject constructor( }.launchIn(this) } - private suspend fun fetchMembers(roomMembers: MutableState>>) { + private suspend fun fetchMembers(roomMembers: MutableState>>) { suspend { withContext(coroutineDispatchers.io) { roomMemberListDataSource.search("").toImmutableList() diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt index e779af5f61..92a029c8f3 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListPresenter.kt @@ -25,7 +25,7 @@ import androidx.compose.runtime.produceState import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.designsystem.theme.components.SearchBarResultState @@ -44,7 +44,7 @@ class RoomMemberListPresenter @Inject constructor( @Composable override fun present(): RoomMemberListState { - var roomMembers by remember { mutableStateOf>(Async.Loading()) } + var roomMembers by remember { mutableStateOf>(AsyncData.Loading()) } var searchQuery by rememberSaveable { mutableStateOf("") } var searchResults by remember { mutableStateOf>(SearchBarResultState.Empty()) @@ -59,7 +59,7 @@ class RoomMemberListPresenter @Inject constructor( LaunchedEffect(Unit) { withContext(coroutineDispatchers.io) { val members = roomMemberListDataSource.search("").groupBy { it.membership } - roomMembers = Async.Success( + roomMembers = AsyncData.Success( RoomMembers( invited = members.getOrDefault(RoomMembershipState.INVITE, emptyList()).toImmutableList(), joined = members.getOrDefault(RoomMembershipState.JOIN, emptyList()).toImmutableList(), diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListState.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListState.kt index f718db703b..aa2d94cc65 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListState.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListState.kt @@ -16,13 +16,13 @@ package io.element.android.features.roomdetails.impl.members -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.room.RoomMember import kotlinx.collections.immutable.ImmutableList data class RoomMemberListState( - val roomMembers: Async, + val roomMembers: AsyncData, val searchQuery: String, val searchResults: SearchBarResultState, val isSearchActive: Boolean, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListStateProvider.kt index f6eefa4385..01e29832eb 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.roomdetails.impl.members import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.room.RoomMember @@ -28,14 +28,14 @@ internal class RoomMemberListStateProvider : PreviewParameterProvider get() = sequenceOf( aRoomMemberListState( - roomMembers = Async.Success( + roomMembers = AsyncData.Success( RoomMembers( invited = persistentListOf(aVictor(), aWalter()), joined = persistentListOf(anAlice(), aBob()), ) ) ), - aRoomMemberListState(roomMembers = Async.Loading()), + aRoomMemberListState(roomMembers = AsyncData.Loading()), aRoomMemberListState().copy(canInvite = true), aRoomMemberListState().copy(isSearchActive = false), aRoomMemberListState().copy(isSearchActive = true), @@ -59,7 +59,7 @@ internal class RoomMemberListStateProvider : PreviewParameterProvider = Async.Uninitialized, + roomMembers: AsyncData = AsyncData.Uninitialized, searchResults: SearchBarResultState = SearchBarResultState.Empty(), ) = RoomMemberListState( roomMembers = roomMembers, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListView.kt index 49de90a854..abd7d4130a 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListView.kt @@ -39,7 +39,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.features.roomdetails.impl.R -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.avatar.AvatarSize import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview @@ -103,7 +103,7 @@ fun RoomMemberListView( ) if (!state.isSearchActive) { - if (state.roomMembers is Async.Success) { + if (state.roomMembers is AsyncData.Success) { RoomMemberList( roomMembers = state.roomMembers.data, showMembersCount = true, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt index 3037136f63..d2de1c1bcf 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsNode.kt @@ -30,7 +30,7 @@ import im.vector.app.features.analytics.plan.MobileScreen import io.element.android.anvilannotations.ContributesNode import io.element.android.features.roomdetails.impl.R import io.element.android.libraries.androidutils.system.startSharePlainTextIntent -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.inputs import io.element.android.libraries.di.RoomScope @@ -95,7 +95,7 @@ class RoomMemberDetailsNode @AssistedInject constructor( val state = presenter.present() LaunchedEffect(state.startDmActionState) { - if (state.startDmActionState is Async.Success) { + if (state.startDmActionState is AsyncAction.Success) { onStartDM(state.startDmActionState.data) } } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsPresenter.kt index e82b5f0cb5..c583980d08 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsPresenter.kt @@ -29,7 +29,8 @@ import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.features.createroom.api.StartDMAction import io.element.android.features.roomdetails.impl.members.details.RoomMemberDetailsState.ConfirmationDialog -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.bool.orFalse import io.element.android.libraries.matrix.api.MatrixClient @@ -56,14 +57,14 @@ class RoomMemberDetailsPresenter @AssistedInject constructor( val coroutineScope = rememberCoroutineScope() var confirmationDialog by remember { mutableStateOf(null) } val roomMember by room.getRoomMemberAsState(roomMemberId) - val startDmActionState: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val startDmActionState: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } // the room member is not really live... - val isBlocked: MutableState> = remember(roomMember) { + val isBlocked: MutableState> = remember(roomMember) { val isIgnored = roomMember?.isIgnored if (isIgnored == null) { - mutableStateOf(Async.Uninitialized) + mutableStateOf(AsyncData.Uninitialized) } else { - mutableStateOf(Async.Success(isIgnored)) + mutableStateOf(AsyncData.Success(isIgnored)) } } LaunchedEffect(Unit) { @@ -90,7 +91,7 @@ class RoomMemberDetailsPresenter @AssistedInject constructor( } RoomMemberDetailsEvents.ClearConfirmationDialog -> confirmationDialog = null RoomMemberDetailsEvents.ClearBlockUserError -> { - isBlocked.value = Async.Success(isBlocked.value.dataOrNull().orFalse()) + isBlocked.value = AsyncData.Success(isBlocked.value.dataOrNull().orFalse()) } RoomMemberDetailsEvents.StartDM -> { coroutineScope.launch { @@ -98,7 +99,7 @@ class RoomMemberDetailsPresenter @AssistedInject constructor( } } RoomMemberDetailsEvents.ClearStartDMState -> { - startDmActionState.value = Async.Uninitialized + startDmActionState.value = AsyncAction.Uninitialized } } } @@ -127,30 +128,30 @@ class RoomMemberDetailsPresenter @AssistedInject constructor( ) } - private fun CoroutineScope.blockUser(userId: UserId, isBlockedState: MutableState>) = launch { - isBlockedState.value = Async.Loading(false) + private fun CoroutineScope.blockUser(userId: UserId, isBlockedState: MutableState>) = launch { + isBlockedState.value = AsyncData.Loading(false) client.ignoreUser(userId) .fold( onSuccess = { - isBlockedState.value = Async.Success(true) + isBlockedState.value = AsyncData.Success(true) room.updateMembers() }, onFailure = { - isBlockedState.value = Async.Failure(it, false) + isBlockedState.value = AsyncData.Failure(it, false) } ) } - private fun CoroutineScope.unblockUser(userId: UserId, isBlockedState: MutableState>) = launch { - isBlockedState.value = Async.Loading(true) + private fun CoroutineScope.unblockUser(userId: UserId, isBlockedState: MutableState>) = launch { + isBlockedState.value = AsyncData.Loading(true) client.unignoreUser(userId) .fold( onSuccess = { - isBlockedState.value = Async.Success(false) + isBlockedState.value = AsyncData.Success(false) room.updateMembers() }, onFailure = { - isBlockedState.value = Async.Failure(it, true) + isBlockedState.value = AsyncData.Failure(it, true) } ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsState.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsState.kt index ee9cfe388f..817e5da46b 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsState.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsState.kt @@ -16,15 +16,16 @@ package io.element.android.features.roomdetails.impl.members.details -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.RoomId data class RoomMemberDetailsState( val userId: String, val userName: String?, val avatarUrl: String?, - val isBlocked: Async, - val startDmActionState: Async, + val isBlocked: AsyncData, + val startDmActionState: AsyncAction, val displayConfirmationDialog: ConfirmationDialog?, val isCurrentUser: Boolean, val eventSink: (RoomMemberDetailsEvents) -> Unit diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsStateProvider.kt index c5710986a6..ff4b9ee1b3 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsStateProvider.kt @@ -17,18 +17,19 @@ package io.element.android.features.roomdetails.impl.members.details import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData open class RoomMemberDetailsStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aRoomMemberDetailsState(), aRoomMemberDetailsState().copy(userName = null), - aRoomMemberDetailsState().copy(isBlocked = Async.Success(true)), + aRoomMemberDetailsState().copy(isBlocked = AsyncData.Success(true)), aRoomMemberDetailsState().copy(displayConfirmationDialog = RoomMemberDetailsState.ConfirmationDialog.Block), aRoomMemberDetailsState().copy(displayConfirmationDialog = RoomMemberDetailsState.ConfirmationDialog.Unblock), - aRoomMemberDetailsState().copy(isBlocked = Async.Loading(true)), - aRoomMemberDetailsState().copy(startDmActionState = Async.Loading()), + aRoomMemberDetailsState().copy(isBlocked = AsyncData.Loading(true)), + aRoomMemberDetailsState().copy(startDmActionState = AsyncAction.Loading), // Add other states here ) } @@ -37,8 +38,8 @@ fun aRoomMemberDetailsState() = RoomMemberDetailsState( userId = "@daniel:domain.com", userName = "Daniel", avatarUrl = null, - isBlocked = Async.Success(false), - startDmActionState = Async.Uninitialized, + isBlocked = AsyncData.Success(false), + startDmActionState = AsyncAction.Uninitialized, displayConfirmationDialog = null, isCurrentUser = false, eventSink = {}, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsView.kt index adf7bc52ed..8463c98ee0 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/details/RoomMemberDetailsView.kt @@ -33,7 +33,8 @@ import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.roomdetails.impl.R import io.element.android.features.roomdetails.impl.blockuser.BlockUserDialogs import io.element.android.features.roomdetails.impl.blockuser.BlockUserSection -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView +import io.element.android.libraries.designsystem.components.async.AsyncActionViewDefaults import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.components.list.ListItemContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark @@ -88,9 +89,13 @@ fun RoomMemberDetailsView( BlockUserSection(state) BlockUserDialogs(state) } - AsyncView( + AsyncActionView( async = state.startDmActionState, - progressText = stringResource(CommonStrings.common_starting_chat), + progressDialog = { + AsyncActionViewDefaults.ProgressDialog( + progressText = stringResource(CommonStrings.common_starting_chat), + ) + }, onSuccess = onDMStarted, errorMessage = { stringResource(R.string.screen_start_chat_error_starting_chat) }, onRetry = { state.eventSink(RoomMemberDetailsEvents.StartDM) }, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt index c3994e160c..06649d2550 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsPresenter.kt @@ -28,7 +28,8 @@ import androidx.compose.runtime.setValue import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.notificationsettings.NotificationSettingsService @@ -61,11 +62,11 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( mutableStateOf(null) } val localCoroutineScope = rememberCoroutineScope() - val setNotificationSettingAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } - val restoreDefaultAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val setNotificationSettingAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } + val restoreDefaultAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } - val roomNotificationSettings: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val roomNotificationSettings: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } // We store state of which mode the user has set via the notification service before the new push settings have been updated. @@ -103,7 +104,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( localCoroutineScope.restoreDefaultRoomNotificationMode(restoreDefaultAction, pendingSetDefault) } else { defaultRoomNotificationMode.value?.let { - localCoroutineScope.setRoomNotificationMode(it, pendingRoomNotificationMode, pendingSetDefault, setNotificationSettingAction) + localCoroutineScope.setRoomNotificationMode(it, pendingRoomNotificationMode, pendingSetDefault, setNotificationSettingAction) } } } @@ -111,10 +112,10 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( localCoroutineScope.restoreDefaultRoomNotificationMode(restoreDefaultAction, pendingSetDefault) } RoomNotificationSettingsEvents.ClearSetNotificationError -> { - setNotificationSettingAction.value = Async.Uninitialized + setNotificationSettingAction.value = AsyncAction.Uninitialized } RoomNotificationSettingsEvents.ClearRestoreDefaultError -> { - restoreDefaultAction.value = Async.Uninitialized + restoreDefaultAction.value = AsyncAction.Uninitialized } } } @@ -136,7 +137,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( @OptIn(FlowPreview::class) private fun CoroutineScope.observeNotificationSettings( pendingModeState: MutableState, - roomNotificationSettings: MutableState> + roomNotificationSettings: MutableState> ) { notificationSettingsService.notificationSettingsChangeFlow .debounce(0.5.seconds) @@ -148,7 +149,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( private fun CoroutineScope.fetchNotificationSettings( pendingModeState: MutableState, - roomNotificationSettings: MutableState> + roomNotificationSettings: MutableState> ) = launch { suspend { pendingModeState.value = null @@ -169,7 +170,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( mode: RoomNotificationMode, pendingModeState: MutableState, pendingDefaultState: MutableState, - action: MutableState> + action: MutableState> ) = launch { suspend { pendingModeState.value = mode @@ -184,7 +185,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( } private fun CoroutineScope.restoreDefaultRoomNotificationMode( - action: MutableState>, + action: MutableState>, pendingDefaultState: MutableState ) = launch { suspend { diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsState.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsState.kt index 4c23c0e2ae..6f0ec6ea77 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsState.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsState.kt @@ -16,19 +16,20 @@ package io.element.android.features.roomdetails.impl.notificationsettings -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.RoomNotificationSettings data class RoomNotificationSettingsState( val showUserDefinedSettingStyle: Boolean, val roomName: String, - val roomNotificationSettings: Async, + val roomNotificationSettings: AsyncData, val pendingRoomNotificationMode: RoomNotificationMode?, val pendingSetDefault: Boolean?, val defaultRoomNotificationMode: RoomNotificationMode?, - val setNotificationSettingAction: Async, - val restoreDefaultAction: Async, + val setNotificationSettingAction: AsyncAction, + val restoreDefaultAction: AsyncAction, val displayMentionsOnlyDisclaimer: Boolean, val eventSink: (RoomNotificationSettingsEvents) -> Unit ) diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsStateProvider.kt index aee68383f7..04f0c0859b 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsStateProvider.kt @@ -17,7 +17,8 @@ package io.element.android.features.roomdetails.impl.notificationsettings import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.RoomNotificationSettings @@ -26,23 +27,23 @@ internal class RoomNotificationSettingsStateProvider : PreviewParameterProvider< get() = sequenceOf( aRoomNotificationSettingsState(), aRoomNotificationSettingsState(isDefault = false), - aRoomNotificationSettingsState(setNotificationSettingAction = Async.Loading(Unit)), - aRoomNotificationSettingsState(setNotificationSettingAction = Async.Failure(Throwable("error"))), - aRoomNotificationSettingsState(restoreDefaultAction = Async.Loading(Unit)), - aRoomNotificationSettingsState(restoreDefaultAction = Async.Failure(Throwable("error"))), + aRoomNotificationSettingsState(setNotificationSettingAction = AsyncAction.Loading), + aRoomNotificationSettingsState(setNotificationSettingAction = AsyncAction.Failure(Throwable("error"))), + aRoomNotificationSettingsState(restoreDefaultAction = AsyncAction.Loading), + aRoomNotificationSettingsState(restoreDefaultAction = AsyncAction.Failure(Throwable("error"))), aRoomNotificationSettingsState(displayMentionsOnlyDisclaimer = true) ) private fun aRoomNotificationSettingsState( isDefault: Boolean = true, - setNotificationSettingAction: Async = Async.Uninitialized, - restoreDefaultAction: Async = Async.Uninitialized, + setNotificationSettingAction: AsyncAction = AsyncAction.Uninitialized, + restoreDefaultAction: AsyncAction = AsyncAction.Uninitialized, displayMentionsOnlyDisclaimer: Boolean = false, ): RoomNotificationSettingsState { return RoomNotificationSettingsState( showUserDefinedSettingStyle = false, roomName = "Room 1", - Async.Success(RoomNotificationSettings( + AsyncData.Success(RoomNotificationSettings( mode = RoomNotificationMode.MUTE, isDefault = isDefault)), pendingRoomNotificationMode = null, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsView.kt index 6bba2436b3..b70c21798c 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsView.kt @@ -33,7 +33,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.features.roomdetails.impl.R import io.element.android.libraries.core.bool.orTrue -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.components.preferences.PreferenceCategory import io.element.android.libraries.designsystem.components.preferences.PreferenceSwitch @@ -157,14 +157,14 @@ private fun RoomSpecificNotificationSettingsView( } } - AsyncView( + AsyncActionView( async = state.setNotificationSettingAction, onSuccess = {}, errorMessage = { stringResource(R.string.screen_notification_settings_edit_failed_updating_default_mode) }, onErrorDismiss = { state.eventSink(RoomNotificationSettingsEvents.ClearSetNotificationError) }, ) - AsyncView( + AsyncActionView( async = state.restoreDefaultAction, onSuccess = {}, errorMessage = { stringResource(R.string.screen_notification_settings_edit_failed_updating_default_mode) }, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsStateProvider.kt index a3ff7f23d7..8e0bea68a6 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsStateProvider.kt @@ -17,7 +17,8 @@ package io.element.android.features.roomdetails.impl.notificationsettings import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.RoomNotificationSettings @@ -27,7 +28,7 @@ internal class UserDefinedRoomNotificationSettingsStateProvider : PreviewParamet RoomNotificationSettingsState( showUserDefinedSettingStyle = false, roomName = "Room 1", - Async.Success( + AsyncData.Success( RoomNotificationSettings( mode = RoomNotificationMode.MUTE, isDefault = false) @@ -35,8 +36,8 @@ internal class UserDefinedRoomNotificationSettingsStateProvider : PreviewParamet pendingRoomNotificationMode = null, pendingSetDefault = null, defaultRoomNotificationMode = RoomNotificationMode.ALL_MESSAGES, - setNotificationSettingAction = Async.Uninitialized, - restoreDefaultAction = Async.Uninitialized, + setNotificationSettingAction = AsyncAction.Uninitialized, + restoreDefaultAction = AsyncAction.Uninitialized, displayMentionsOnlyDisclaimer = false, eventSink = { }, ), diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsView.kt index 9b982542fd..df1a41ea87 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsView.kt @@ -29,7 +29,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.features.roomdetails.impl.R import io.element.android.libraries.core.bool.orTrue -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -81,14 +81,14 @@ fun UserDefinedRoomNotificationSettingsView( } ) - AsyncView( + AsyncActionView( async = state.setNotificationSettingAction, onSuccess = {}, errorMessage = { stringResource(R.string.screen_notification_settings_edit_failed_updating_default_mode) }, onErrorDismiss = { state.eventSink(RoomNotificationSettingsEvents.ClearSetNotificationError) }, ) - AsyncView( + AsyncActionView( async = state.restoreDefaultAction, onSuccess = { onBackPressed() }, errorMessage = { stringResource(R.string.screen_notification_settings_edit_failed_updating_default_mode) }, diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/edit/RoomDetailsEditPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/edit/RoomDetailsEditPresenterTest.kt index 2c1b399da8..a9a2d81b20 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/edit/RoomDetailsEditPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/edit/RoomDetailsEditPresenterTest.kt @@ -24,7 +24,7 @@ import com.google.common.truth.Truth.assertThat import io.element.android.features.roomdetails.aMatrixRoom import io.element.android.features.roomdetails.impl.edit.RoomDetailsEditEvents import io.element.android.features.roomdetails.impl.edit.RoomDetailsEditPresenter -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.room.MatrixRoom import io.element.android.libraries.matrix.api.room.StateEventType import io.element.android.libraries.matrix.test.AN_AVATAR_URL @@ -108,7 +108,7 @@ class RoomDetailsEditPresenterTest { AvatarAction.Remove ) assertThat(initialState.saveButtonEnabled).isFalse() - assertThat(initialState.saveAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(initialState.saveAction).isInstanceOf(AsyncAction.Uninitialized::class.java) } } @@ -533,7 +533,7 @@ class RoomDetailsEditPresenterTest { assertThat(room.newAvatarData).isNull() assertThat(room.removedAvatar).isFalse() - assertThat(awaitItem().saveAction).isInstanceOf(Async.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) } } @@ -594,10 +594,10 @@ class RoomDetailsEditPresenterTest { initialState.eventSink(RoomDetailsEditEvents.Save) skipItems(2) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) initialState.eventSink(RoomDetailsEditEvents.CancelSaveChanges) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Uninitialized::class.java) } } @@ -613,8 +613,8 @@ class RoomDetailsEditPresenterTest { initialState.eventSink(RoomDetailsEditEvents.Save) skipItems(1) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Loading::class.java) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Loading::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) } } diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/RoomMemberListPresenterTests.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/RoomMemberListPresenterTests.kt index 3a2620cad0..982c9f83f0 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/RoomMemberListPresenterTests.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/RoomMemberListPresenterTests.kt @@ -26,7 +26,7 @@ import io.element.android.features.roomdetails.impl.members.RoomMemberListPresen import io.element.android.features.roomdetails.impl.members.aRoomMemberList import io.element.android.features.roomdetails.impl.members.aVictor import io.element.android.features.roomdetails.impl.members.aWalter -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.core.coroutine.CoroutineDispatchers import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.room.MatrixRoom @@ -53,14 +53,14 @@ class RoomMemberListPresenterTests { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.roomMembers).isInstanceOf(Async.Loading::class.java) + assertThat(initialState.roomMembers).isInstanceOf(AsyncData.Loading::class.java) assertThat(initialState.searchQuery).isEmpty() assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(initialState.isSearchActive).isFalse() val loadedState = awaitItem() - assertThat(loadedState.roomMembers).isInstanceOf(Async.Success::class.java) - assertThat((loadedState.roomMembers as Async.Success).data.invited).isEqualTo(listOf(aVictor(), aWalter())) - assertThat((loadedState.roomMembers as Async.Success).data.joined).isNotEmpty() + assertThat(loadedState.roomMembers).isInstanceOf(AsyncData.Success::class.java) + assertThat((loadedState.roomMembers as AsyncData.Success).data.invited).isEqualTo(listOf(aVictor(), aWalter())) + assertThat((loadedState.roomMembers as AsyncData.Success).data.joined).isNotEmpty() } } diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/details/RoomMemberDetailsPresenterTests.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/details/RoomMemberDetailsPresenterTests.kt index ac429e262d..f1553f8d06 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/details/RoomMemberDetailsPresenterTests.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/details/RoomMemberDetailsPresenterTests.kt @@ -27,9 +27,9 @@ import io.element.android.features.roomdetails.impl.members.aRoomMember import io.element.android.features.roomdetails.impl.members.details.RoomMemberDetailsEvents import io.element.android.features.roomdetails.impl.members.details.RoomMemberDetailsPresenter import io.element.android.features.roomdetails.impl.members.details.RoomMemberDetailsState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.MatrixClient -import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.room.MatrixRoom import io.element.android.libraries.matrix.api.room.MatrixRoomMembersState import io.element.android.libraries.matrix.api.room.RoomMember @@ -68,7 +68,7 @@ class RoomMemberDetailsPresenterTests { assertThat(initialState.userId).isEqualTo(roomMember.userId.value) assertThat(initialState.userName).isEqualTo(roomMember.displayName) assertThat(initialState.avatarUrl).isEqualTo(roomMember.avatarUrl) - assertThat(initialState.isBlocked).isEqualTo(Async.Success(roomMember.isIgnored)) + assertThat(initialState.isBlocked).isEqualTo(AsyncData.Success(roomMember.isIgnored)) skipItems(1) val loadedState = awaitItem() assertThat(loadedState.userName).isEqualTo("A custom name") @@ -173,7 +173,7 @@ class RoomMemberDetailsPresenterTests { assertThat(errorState.isBlocked.errorOrNull()).isEqualTo(A_THROWABLE) // Clear error initialState.eventSink(RoomMemberDetailsEvents.ClearBlockUserError) - assertThat(awaitItem().isBlocked).isEqualTo(Async.Success(false)) + assertThat(awaitItem().isBlocked).isEqualTo(AsyncData.Success(false)) } } @@ -204,14 +204,14 @@ class RoomMemberDetailsPresenterTests { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.startDmActionState).isInstanceOf(Async.Uninitialized::class.java) - val startDMSuccessResult = Async.Success(A_ROOM_ID) - val startDMFailureResult = Async.Failure(A_THROWABLE) + assertThat(initialState.startDmActionState).isInstanceOf(AsyncAction.Uninitialized::class.java) + val startDMSuccessResult = AsyncAction.Success(A_ROOM_ID) + val startDMFailureResult = AsyncAction.Failure(A_THROWABLE) // Failure startDMAction.givenExecuteResult(startDMFailureResult) initialState.eventSink(RoomMemberDetailsEvents.StartDM) - assertThat(awaitItem().startDmActionState).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmActionState).isInstanceOf(AsyncAction.Loading::class.java) awaitItem().also { state -> assertThat(state.startDmActionState).isEqualTo(startDMFailureResult) state.eventSink(RoomMemberDetailsEvents.ClearStartDMState) @@ -220,10 +220,10 @@ class RoomMemberDetailsPresenterTests { // Success startDMAction.givenExecuteResult(startDMSuccessResult) awaitItem().also { state -> - assertThat(state.startDmActionState).isEqualTo(Async.Uninitialized) + assertThat(state.startDmActionState).isEqualTo(AsyncAction.Uninitialized) state.eventSink(RoomMemberDetailsEvents.StartDM) } - assertThat(awaitItem().startDmActionState).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmActionState).isInstanceOf(AsyncAction.Loading::class.java) awaitItem().also { state -> assertThat(state.startDmActionState).isEqualTo(startDMSuccessResult) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableEvents.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableEvents.kt index 4cda13f7af..2406265af6 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableEvents.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableEvents.kt @@ -17,6 +17,6 @@ package io.element.android.features.securebackup.impl.disable sealed interface SecureBackupDisableEvents { - data class DisableBackup(val force: Boolean) : SecureBackupDisableEvents + data object DisableBackup : SecureBackupDisableEvents data object DismissDialogs : SecureBackupDisableEvents } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt index 60b4691661..4b98599b93 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt @@ -23,9 +23,8 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.setValue import io.element.android.features.securebackup.impl.loggerTagDisable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.meta.BuildMeta @@ -44,20 +43,17 @@ class SecureBackupDisablePresenter @Inject constructor( override fun present(): SecureBackupDisableState { val backupState by encryptionService.backupStateStateFlow.collectAsState() Timber.tag(loggerTagDisable.value).d("backupState: $backupState") - val disableAction = remember { mutableStateOf>(Async.Uninitialized) } + val disableAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val coroutineScope = rememberCoroutineScope() - var showDialog by remember { mutableStateOf(false) } fun handleEvents(event: SecureBackupDisableEvents) { when (event) { - is SecureBackupDisableEvents.DisableBackup -> if (event.force) { - showDialog = false + is SecureBackupDisableEvents.DisableBackup -> if (disableAction.value.isConfirming()) { coroutineScope.disableBackup(disableAction) } else { - showDialog = true + disableAction.value = AsyncAction.Confirming } SecureBackupDisableEvents.DismissDialogs -> { - showDialog = false - disableAction.value = Async.Uninitialized + disableAction.value = AsyncAction.Uninitialized } } } @@ -65,13 +61,12 @@ class SecureBackupDisablePresenter @Inject constructor( return SecureBackupDisableState( backupState = backupState, disableAction = disableAction.value, - showConfirmationDialog = showDialog, appName = buildMeta.applicationName, eventSink = ::handleEvents ) } - private fun CoroutineScope.disableBackup(disableAction: MutableState>) = launch { + private fun CoroutineScope.disableBackup(disableAction: MutableState>) = launch { suspend { Timber.tag(loggerTagDisable.value).d("Calling encryptionService.disableRecovery()") encryptionService.disableRecovery().getOrThrow() diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableState.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableState.kt index 41e39c398e..4875ef8807 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableState.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableState.kt @@ -16,13 +16,12 @@ package io.element.android.features.securebackup.impl.disable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState data class SecureBackupDisableState( val backupState: BackupState, - val disableAction: Async, - val showConfirmationDialog: Boolean, + val disableAction: AsyncAction, val appName: String, val eventSink: (SecureBackupDisableEvents) -> Unit ) diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableStateProvider.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableStateProvider.kt index 8c22e36968..036ed12102 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableStateProvider.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableStateProvider.kt @@ -17,28 +17,26 @@ package io.element.android.features.securebackup.impl.disable import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState open class SecureBackupDisableStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aSecureBackupDisableState(), - aSecureBackupDisableState(showConfirmationDialog = true), - aSecureBackupDisableState(disableAction = Async.Loading()), - aSecureBackupDisableState(disableAction = Async.Failure(Exception("Failed to disable"))), + aSecureBackupDisableState(disableAction = AsyncAction.Confirming), + aSecureBackupDisableState(disableAction = AsyncAction.Loading), + aSecureBackupDisableState(disableAction = AsyncAction.Failure(Exception("Failed to disable"))), // Add other states here ) } fun aSecureBackupDisableState( backupState: BackupState = BackupState.UNKNOWN, - disableAction: Async = Async.Uninitialized, - showConfirmationDialog: Boolean = false, + disableAction: AsyncAction = AsyncAction.Uninitialized, ) = SecureBackupDisableState( backupState = backupState, disableAction = disableAction, - showConfirmationDialog = showConfirmationDialog, appName = "Element", eventSink = {} ) diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableView.kt index 4f515fd841..21da455794 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisableView.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.stringResource @@ -34,10 +33,9 @@ import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.securebackup.impl.R -import io.element.android.libraries.architecture.Async import io.element.android.libraries.designsystem.atomic.pages.FlowStepPage +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog -import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Button @@ -52,11 +50,6 @@ fun SecureBackupDisableView( onBackClicked: () -> Unit, modifier: Modifier = Modifier, ) { - LaunchedEffect(state.disableAction) { - if (state.disableAction is Async.Success) { - onDone() - } - } FlowStepPage( modifier = modifier, onBackClicked = onBackClicked, @@ -67,17 +60,19 @@ fun SecureBackupDisableView( buttons = { Buttons(state = state) }, ) - if (state.showConfirmationDialog) { - SecureBackupDisableConfirmationDialog( - onConfirm = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup(force = true)) }, - onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, - ) - } else if (state.disableAction is Async.Failure) { - ErrorDialog( - content = state.disableAction.error.let { it.message ?: it.toString() }, - onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, - ) - } + AsyncActionView( + async = state.disableAction, + confirmationDialog = { + SecureBackupDisableConfirmationDialog( + onConfirm = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup) }, + onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, + ) + }, + progressDialog = {}, + errorMessage = { it.message ?: it.toString() }, + onErrorDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, + onSuccess = { onDone() }, + ) } @Composable @@ -101,7 +96,7 @@ private fun ColumnScope.Buttons( showProgress = state.disableAction.isLoading(), destructive = true, modifier = Modifier.fillMaxWidth(), - onClick = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup(force = false)) } + onClick = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup) } ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenter.kt index dfceb16dea..3ce99ff353 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenter.kt @@ -22,7 +22,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import io.element.android.features.securebackup.impl.loggerTagDisable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.encryption.EncryptionService @@ -37,14 +37,14 @@ class SecureBackupEnablePresenter @Inject constructor( @Composable override fun present(): SecureBackupEnableState { - val enableAction = remember { mutableStateOf>(Async.Uninitialized) } + val enableAction = remember { mutableStateOf>(AsyncData.Uninitialized) } val coroutineScope = rememberCoroutineScope() fun handleEvents(event: SecureBackupEnableEvents) { when (event) { is SecureBackupEnableEvents.EnableBackup -> coroutineScope.enableBackup(enableAction) SecureBackupEnableEvents.DismissDialog -> { - enableAction.value = Async.Uninitialized + enableAction.value = AsyncData.Uninitialized } } } @@ -55,7 +55,7 @@ class SecureBackupEnablePresenter @Inject constructor( ) } - private fun CoroutineScope.enableBackup(action: MutableState>) = launch { + private fun CoroutineScope.enableBackup(action: MutableState>) = launch { suspend { Timber.tag(loggerTagDisable.value).d("Calling encryptionService.enableBackups()") encryptionService.enableBackups().getOrThrow() diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableState.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableState.kt index 7c3aaf839b..bd81004f9c 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableState.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableState.kt @@ -16,9 +16,9 @@ package io.element.android.features.securebackup.impl.enable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData data class SecureBackupEnableState( - val enableAction: Async, + val enableAction: AsyncData, val eventSink: (SecureBackupEnableEvents) -> Unit ) diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableStateProvider.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableStateProvider.kt index 494c45b5b4..1029278c05 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableStateProvider.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableStateProvider.kt @@ -17,20 +17,20 @@ package io.element.android.features.securebackup.impl.enable import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData open class SecureBackupEnableStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aSecureBackupEnableState(), - aSecureBackupEnableState(enableAction = Async.Loading()), - aSecureBackupEnableState(enableAction = Async.Failure(Exception("Failed to enable"))), + aSecureBackupEnableState(enableAction = AsyncData.Loading()), + aSecureBackupEnableState(enableAction = AsyncData.Failure(Exception("Failed to enable"))), // Add other states here ) } fun aSecureBackupEnableState( - enableAction: Async = Async.Uninitialized, + enableAction: AsyncData = AsyncData.Uninitialized, ) = SecureBackupEnableState( enableAction = enableAction, eventSink = {} diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableView.kt index d97fc735d8..37a46a1408 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnableView.kt @@ -26,7 +26,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.vectorResource import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.features.securebackup.impl.R -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.pages.FlowStepPage import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.preview.ElementPreview @@ -42,7 +42,7 @@ fun SecureBackupEnableView( modifier: Modifier = Modifier, ) { LaunchedEffect(state.enableAction) { - if (state.enableAction is Async.Success) { + if (state.enableAction is AsyncData.Success) { onDone() } } @@ -53,7 +53,7 @@ fun SecureBackupEnableView( iconVector = ImageVector.vectorResource(CommonDrawables.ic_key), buttons = { Buttons(state = state) } ) - if (state.enableAction is Async.Failure) { + if (state.enableAction is AsyncData.Failure) { ErrorDialog( content = state.enableAction.error.let { it.message ?: it.toString() }, onDismiss = { state.eventSink.invoke(SecureBackupEnableEvents.DismissDialog) }, diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt index 9207dbef79..2940ef576e 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenter.kt @@ -27,7 +27,7 @@ import androidx.compose.runtime.setValue import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyUserStory import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyViewState import io.element.android.features.securebackup.impl.tools.RecoveryKeyTools -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.encryption.EncryptionService @@ -46,14 +46,14 @@ class SecureBackupEnterRecoveryKeyPresenter @Inject constructor( var recoveryKey by rememberSaveable { mutableStateOf("") } - val submitAction = remember { - mutableStateOf>(Async.Uninitialized) + val submitAction: MutableState> = remember { + mutableStateOf(AsyncAction.Uninitialized) } fun handleEvents(event: SecureBackupEnterRecoveryKeyEvents) { when (event) { SecureBackupEnterRecoveryKeyEvents.ClearDialog -> { - submitAction.value = Async.Uninitialized + submitAction.value = AsyncAction.Uninitialized } is SecureBackupEnterRecoveryKeyEvents.OnRecoveryKeyChange -> { val previousRecoveryKey = recoveryKey @@ -86,7 +86,7 @@ class SecureBackupEnterRecoveryKeyPresenter @Inject constructor( private fun CoroutineScope.submitRecoveryKey( recoveryKey: String, - action: MutableState> + action: MutableState> ) = launch { suspend { encryptionService.recover(recoveryKey).getOrThrow() diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyState.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyState.kt index c9a631c11c..c064a3fc13 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyState.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyState.kt @@ -17,12 +17,12 @@ package io.element.android.features.securebackup.impl.enter import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyViewState -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction // Do not use default value, so no member get forgotten in the presenters. data class SecureBackupEnterRecoveryKeyState( val recoveryKeyViewState: RecoveryKeyViewState, val isSubmitEnabled: Boolean, - val submitAction: Async, + val submitAction: AsyncAction, val eventSink: (SecureBackupEnterRecoveryKeyEvents) -> Unit ) diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyStateProvider.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyStateProvider.kt index 375eafef73..2869b9a281 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyStateProvider.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyStateProvider.kt @@ -20,22 +20,22 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyUserStory import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyViewState import io.element.android.features.securebackup.impl.setup.views.aFormattedRecoveryKey -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction open class SecureBackupEnterRecoveryKeyStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aSecureBackupEnterRecoveryKeyState(recoveryKey = ""), aSecureBackupEnterRecoveryKeyState(), - aSecureBackupEnterRecoveryKeyState(submitAction = Async.Loading()), - aSecureBackupEnterRecoveryKeyState(submitAction = Async.Failure(Exception("A Failure"))), + aSecureBackupEnterRecoveryKeyState(submitAction = AsyncAction.Loading), + aSecureBackupEnterRecoveryKeyState(submitAction = AsyncAction.Failure(Exception("A Failure"))), ) } fun aSecureBackupEnterRecoveryKeyState( recoveryKey: String = aFormattedRecoveryKey(), isSubmitEnabled: Boolean = recoveryKey.isNotEmpty(), - submitAction: Async = Async.Uninitialized, + submitAction: AsyncAction = AsyncAction.Uninitialized, ) = SecureBackupEnterRecoveryKeyState( recoveryKeyViewState = RecoveryKeyViewState( recoveryKeyUserStory = RecoveryKeyUserStory.Enter, diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyView.kt index d5eda2c15a..b590219a64 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyView.kt @@ -29,7 +29,7 @@ import androidx.compose.ui.unit.dp import io.element.android.features.securebackup.impl.R import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyView import io.element.android.libraries.designsystem.atomic.pages.FlowStepPage -import io.element.android.libraries.designsystem.components.async.AsyncView +import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Button @@ -43,10 +43,10 @@ fun SecureBackupEnterRecoveryKeyView( onBackClicked: () -> Unit, modifier: Modifier = Modifier, ) { - AsyncView( + AsyncActionView( async = state.submitAction, onSuccess = { onDone() }, - showProgressDialog = false, + progressDialog = { }, errorTitle = { stringResource(id = R.string.screen_recovery_key_confirm_error_title) }, errorMessage = { stringResource(id = R.string.screen_recovery_key_confirm_error_content) }, onErrorDismiss = { state.eventSink(SecureBackupEnterRecoveryKeyEvents.ClearDialog) }, diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt index 9036200ac9..ca60f7d32f 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenter.kt @@ -25,7 +25,7 @@ import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import io.element.android.features.securebackup.impl.loggerTagRoot -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.meta.BuildMeta @@ -55,7 +55,7 @@ class SecureBackupRootPresenter @Inject constructor( Timber.tag(loggerTagRoot.value).d("backupState: $backupState") Timber.tag(loggerTagRoot.value).d("recoveryState: $recoveryState") - val doesBackupExistOnServerAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val doesBackupExistOnServerAction: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } LaunchedEffect(backupState) { if (backupState == BackupState.UNKNOWN) { @@ -79,7 +79,7 @@ class SecureBackupRootPresenter @Inject constructor( ) } - private fun CoroutineScope.getKeyBackupStatus(action: MutableState>) = launch { + private fun CoroutineScope.getKeyBackupStatus(action: MutableState>) = launch { suspend { encryptionService.doesBackupExistOnServer().getOrThrow() }.runCatchingUpdatingState(action) diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootState.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootState.kt index e2c6c1154c..0d57ebbf46 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootState.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootState.kt @@ -16,14 +16,14 @@ package io.element.android.features.securebackup.impl.root -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.RecoveryState data class SecureBackupRootState( val backupState: BackupState, - val doesBackupExistOnServer: Async, + val doesBackupExistOnServer: AsyncData, val recoveryState: RecoveryState, val appName: String, val snackbarMessage: SnackbarMessage?, diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootStateProvider.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootStateProvider.kt index ae8b2aa63b..beb54101ff 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootStateProvider.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.securebackup.impl.root import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.RecoveryState @@ -25,10 +25,10 @@ import io.element.android.libraries.matrix.api.encryption.RecoveryState open class SecureBackupRootStateProvider : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( - aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = Async.Uninitialized), - aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = Async.Success(true)), - aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = Async.Success(false)), - aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = Async.Failure(Exception("An error"))), + aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = AsyncData.Uninitialized), + aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = AsyncData.Success(true)), + aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = AsyncData.Success(false)), + aSecureBackupRootState(backupState = BackupState.UNKNOWN, doesBackupExistOnServer = AsyncData.Failure(Exception("An error"))), aSecureBackupRootState(backupState = BackupState.ENABLED), aSecureBackupRootState(recoveryState = RecoveryState.UNKNOWN), aSecureBackupRootState(recoveryState = RecoveryState.ENABLED), @@ -40,7 +40,7 @@ open class SecureBackupRootStateProvider : PreviewParameterProvider = Async.Uninitialized, + doesBackupExistOnServer: AsyncData = AsyncData.Uninitialized, recoveryState: RecoveryState = RecoveryState.UNKNOWN, snackbarMessage: SnackbarMessage? = null, ) = SecureBackupRootState( diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootView.kt index d4033f1297..54c37761ed 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootView.kt @@ -24,7 +24,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.features.securebackup.impl.R -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.async.AsyncLoading import io.element.android.libraries.designsystem.components.list.ListItemContent import io.element.android.libraries.designsystem.components.preferences.PreferenceDivider @@ -82,7 +82,7 @@ fun SecureBackupRootView( BackupState.WAITING_FOR_SYNC -> Unit BackupState.UNKNOWN -> { when (state.doesBackupExistOnServer) { - is Async.Success -> when (state.doesBackupExistOnServer.data) { + is AsyncData.Success -> when (state.doesBackupExistOnServer.data) { true -> { PreferenceText( title = stringResource(id = R.string.screen_chat_backup_key_backup_action_disable), @@ -97,8 +97,8 @@ fun SecureBackupRootView( ) } } - is Async.Loading, - Async.Uninitialized -> { + is AsyncData.Loading, + AsyncData.Uninitialized -> { ListItem(headlineContent = { Row( modifier = Modifier.fillMaxWidth(), @@ -108,7 +108,7 @@ fun SecureBackupRootView( } }) } - is Async.Failure -> { + is AsyncData.Failure -> { ListItem( headlineContent = { Text( diff --git a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenterTest.kt b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenterTest.kt index 8e42ee7efe..18fd9b800a 100644 --- a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenterTest.kt +++ b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenterTest.kt @@ -20,7 +20,7 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.EncryptionService import io.element.android.libraries.matrix.test.core.aBuildMeta @@ -42,8 +42,7 @@ class SecureBackupDisablePresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.backupState).isEqualTo(BackupState.UNKNOWN) - assertThat(initialState.disableAction).isEqualTo(Async.Uninitialized) - assertThat(initialState.showConfirmationDialog).isFalse() + assertThat(initialState.disableAction).isEqualTo(AsyncAction.Uninitialized) assertThat(initialState.appName).isEqualTo("Element") } } @@ -55,13 +54,12 @@ class SecureBackupDisablePresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.showConfirmationDialog).isFalse() - initialState.eventSink(SecureBackupDisableEvents.DisableBackup(force = false)) + initialState.eventSink(SecureBackupDisableEvents.DisableBackup) val state = awaitItem() - assertThat(state.showConfirmationDialog).isTrue() + assertThat(state.disableAction).isEqualTo(AsyncAction.Confirming) initialState.eventSink(SecureBackupDisableEvents.DismissDialogs) val finalState = awaitItem() - assertThat(finalState.showConfirmationDialog).isFalse() + assertThat(finalState.disableAction).isEqualTo(AsyncAction.Uninitialized) } } @@ -72,17 +70,15 @@ class SecureBackupDisablePresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.showConfirmationDialog).isFalse() - initialState.eventSink(SecureBackupDisableEvents.DisableBackup(force = false)) + assertThat(initialState.disableAction).isEqualTo(AsyncAction.Uninitialized) + initialState.eventSink(SecureBackupDisableEvents.DisableBackup) val state = awaitItem() - assertThat(state.showConfirmationDialog).isTrue() - initialState.eventSink(SecureBackupDisableEvents.DisableBackup(force = true)) - skipItems(1) + assertThat(state.disableAction).isEqualTo(AsyncAction.Confirming) + initialState.eventSink(SecureBackupDisableEvents.DisableBackup) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.disableAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.disableAction).isInstanceOf(AsyncAction.Loading::class.java) val finalState = awaitItem() - assertThat(finalState.disableAction).isEqualTo(Async.Success(Unit)) + assertThat(finalState.disableAction).isEqualTo(AsyncAction.Success(Unit)) } } @@ -98,20 +94,18 @@ class SecureBackupDisablePresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.showConfirmationDialog).isFalse() - initialState.eventSink(SecureBackupDisableEvents.DisableBackup(force = false)) + assertThat(initialState.disableAction).isEqualTo(AsyncAction.Uninitialized) + initialState.eventSink(SecureBackupDisableEvents.DisableBackup) val state = awaitItem() - assertThat(state.showConfirmationDialog).isTrue() - initialState.eventSink(SecureBackupDisableEvents.DisableBackup(force = true)) - skipItems(1) + assertThat(state.disableAction).isEqualTo(AsyncAction.Confirming) + initialState.eventSink(SecureBackupDisableEvents.DisableBackup) val loadingState = awaitItem() - assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.disableAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.disableAction).isInstanceOf(AsyncAction.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.disableAction).isInstanceOf(Async.Failure::class.java) + assertThat(errorState.disableAction).isInstanceOf(AsyncAction.Failure::class.java) errorState.eventSink(SecureBackupDisableEvents.DismissDialogs) val finalState = awaitItem() - assertThat(finalState.disableAction).isEqualTo(Async.Uninitialized) + assertThat(finalState.disableAction).isEqualTo(AsyncAction.Uninitialized) } } diff --git a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenterTest.kt b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenterTest.kt index 7bc051662b..39d8ebf81f 100644 --- a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenterTest.kt +++ b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enable/SecureBackupEnablePresenterTest.kt @@ -20,7 +20,7 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.encryption.EncryptionService import io.element.android.libraries.matrix.test.AN_EXCEPTION import io.element.android.libraries.matrix.test.encryption.FakeEncryptionService @@ -40,7 +40,7 @@ class SecureBackupEnablePresenterTest { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.enableAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.enableAction).isEqualTo(AsyncData.Uninitialized) } } @@ -53,9 +53,9 @@ class SecureBackupEnablePresenterTest { val initialState = awaitItem() initialState.eventSink(SecureBackupEnableEvents.EnableBackup) val loadingState = awaitItem() - assertThat(loadingState.enableAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.enableAction).isInstanceOf(AsyncData.Loading::class.java) val finalState = awaitItem() - assertThat(finalState.enableAction).isEqualTo(Async.Success(Unit)) + assertThat(finalState.enableAction).isEqualTo(AsyncData.Success(Unit)) } } @@ -70,12 +70,12 @@ class SecureBackupEnablePresenterTest { val initialState = awaitItem() initialState.eventSink(SecureBackupEnableEvents.EnableBackup) val loadingState = awaitItem() - assertThat(loadingState.enableAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.enableAction).isInstanceOf(AsyncData.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.enableAction).isEqualTo(Async.Failure(AN_EXCEPTION)) + assertThat(errorState.enableAction).isEqualTo(AsyncData.Failure(AN_EXCEPTION)) errorState.eventSink(SecureBackupEnableEvents.DismissDialog) val finalState = awaitItem() - assertThat(finalState.enableAction).isEqualTo(Async.Uninitialized) + assertThat(finalState.enableAction).isEqualTo(AsyncData.Uninitialized) } } diff --git a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenterTest.kt b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenterTest.kt index 862cbbde72..3991fe306c 100644 --- a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenterTest.kt +++ b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/enter/SecureBackupEnterRecoveryKeyPresenterTest.kt @@ -23,7 +23,7 @@ import com.google.common.truth.Truth.assertThat import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyUserStory import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyViewState import io.element.android.features.securebackup.impl.tools.RecoveryKeyTools -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.EncryptionService import io.element.android.libraries.matrix.test.AN_EXCEPTION import io.element.android.libraries.matrix.test.encryption.FakeEncryptionService @@ -44,7 +44,7 @@ class SecureBackupEnterRecoveryKeyPresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.isSubmitEnabled).isFalse() - assertThat(initialState.submitAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.submitAction).isEqualTo(AsyncAction.Uninitialized) assertThat(initialState.recoveryKeyViewState).isEqualTo( RecoveryKeyViewState( recoveryKeyUserStory = RecoveryKeyUserStory.Enter, @@ -76,22 +76,22 @@ class SecureBackupEnterRecoveryKeyPresenterTest { encryptionService.givenRecoverFailure(AN_EXCEPTION) withRecoveryKeyState.eventSink(SecureBackupEnterRecoveryKeyEvents.Submit) val loadingState = awaitItem() - assertThat(loadingState.submitAction).isEqualTo(Async.Loading()) + assertThat(loadingState.submitAction).isEqualTo(AsyncAction.Loading) assertThat(loadingState.isSubmitEnabled).isFalse() val errorState = awaitItem() - assertThat(errorState.submitAction).isEqualTo(Async.Failure(AN_EXCEPTION)) + assertThat(errorState.submitAction).isEqualTo(AsyncAction.Failure(AN_EXCEPTION)) assertThat(errorState.isSubmitEnabled).isFalse() errorState.eventSink(SecureBackupEnterRecoveryKeyEvents.ClearDialog) val clearedState = awaitItem() - assertThat(clearedState.submitAction).isEqualTo(Async.Uninitialized) + assertThat(clearedState.submitAction).isEqualTo(AsyncAction.Uninitialized) assertThat(clearedState.isSubmitEnabled).isTrue() encryptionService.givenRecoverFailure(null) clearedState.eventSink(SecureBackupEnterRecoveryKeyEvents.Submit) val loadingState2 = awaitItem() - assertThat(loadingState2.submitAction).isEqualTo(Async.Loading()) + assertThat(loadingState2.submitAction).isEqualTo(AsyncAction.Loading) assertThat(loadingState2.isSubmitEnabled).isFalse() val finalState = awaitItem() - assertThat(finalState.submitAction).isEqualTo(Async.Success(Unit)) + assertThat(finalState.submitAction).isEqualTo(AsyncAction.Success(Unit)) assertThat(finalState.isSubmitEnabled).isFalse() } } diff --git a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenterTest.kt b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenterTest.kt index 6b88e20748..3baecd4381 100644 --- a/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenterTest.kt +++ b/features/securebackup/impl/src/test/kotlin/io/element/android/features/securebackup/impl/root/SecureBackupRootPresenterTest.kt @@ -20,7 +20,7 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.EncryptionService @@ -65,15 +65,15 @@ class SecureBackupRootPresenterTest { val initialState = awaitItem() encryptionService.givenDoesBackupExistOnServerResult(Result.failure(AN_EXCEPTION)) assertThat(initialState.backupState).isEqualTo(BackupState.UNKNOWN) - assertThat(initialState.doesBackupExistOnServer).isEqualTo(Async.Uninitialized) + assertThat(initialState.doesBackupExistOnServer).isEqualTo(AsyncData.Uninitialized) val loadingState1 = awaitItem() - assertThat(loadingState1.doesBackupExistOnServer).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState1.doesBackupExistOnServer).isInstanceOf(AsyncData.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.doesBackupExistOnServer).isEqualTo(Async.Failure(AN_EXCEPTION)) + assertThat(errorState.doesBackupExistOnServer).isEqualTo(AsyncData.Failure(AN_EXCEPTION)) encryptionService.givenDoesBackupExistOnServerResult(Result.success(false)) errorState.eventSink.invoke(SecureBackupRootEvents.RetryKeyBackupState) val loadingState2 = awaitItem() - assertThat(loadingState2.doesBackupExistOnServer).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState2.doesBackupExistOnServer).isInstanceOf(AsyncData.Loading::class.java) val finalState = awaitItem() assertThat(finalState.doesBackupExistOnServer.dataOrNull()).isFalse() } diff --git a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenter.kt b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenter.kt index 89751ca604..0d04ac544d 100644 --- a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenter.kt +++ b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenter.kt @@ -24,7 +24,7 @@ import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue import androidx.compose.runtime.remember import com.freeletics.flowredux.compose.rememberStateAndDispatch -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.matrix.api.verification.SessionVerificationService import io.element.android.libraries.matrix.api.verification.VerificationFlowState @@ -94,8 +94,8 @@ class VerifySelfSessionPresenter @Inject constructor( is StateMachineState.Verifying -> { val async = when (machineState) { - is StateMachineState.Verifying.Replying -> Async.Loading() - else -> Async.Uninitialized + is StateMachineState.Verifying.Replying -> AsyncData.Loading() + else -> AsyncData.Uninitialized } VerifySelfSessionState.VerificationStep.Verifying(machineState.data, async) } diff --git a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionState.kt b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionState.kt index f3afd3b7b9..3076b1fdc7 100644 --- a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionState.kt +++ b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionState.kt @@ -18,7 +18,7 @@ package io.element.android.features.verifysession.impl import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.verification.SessionVerificationData @Immutable @@ -33,7 +33,7 @@ data class VerifySelfSessionState( data object Canceled : VerificationStep data object AwaitingOtherDeviceResponse : VerificationStep data object Ready : VerificationStep - data class Verifying(val data: SessionVerificationData, val state: Async) : VerificationStep + data class Verifying(val data: SessionVerificationData, val state: AsyncData) : VerificationStep data object Completed : VerificationStep } } diff --git a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionStateProvider.kt b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionStateProvider.kt index 9115b8b444..81f25866bd 100644 --- a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionStateProvider.kt +++ b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionStateProvider.kt @@ -17,7 +17,7 @@ package io.element.android.features.verifysession.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.verification.SessionVerificationData import io.element.android.libraries.matrix.api.verification.VerificationEmoji @@ -29,10 +29,10 @@ open class VerifySelfSessionStateProvider : PreviewParameterProvider Unit) val verificationViewState = screenState.verificationFlowStep val eventSink = screenState.eventSink - val isVerifying = (verificationViewState as? FlowStep.Verifying)?.state is Async.Loading + val isVerifying = (verificationViewState as? FlowStep.Verifying)?.state is AsyncData.Loading val positiveButtonTitle = when (verificationViewState) { FlowStep.Initial -> R.string.screen_session_verification_positive_button_initial FlowStep.Canceled -> R.string.screen_session_verification_positive_button_canceled diff --git a/features/verifysession/impl/src/test/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenterTests.kt b/features/verifysession/impl/src/test/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenterTests.kt index c96866cb5a..2943b0aa0f 100644 --- a/features/verifysession/impl/src/test/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenterTests.kt +++ b/features/verifysession/impl/src/test/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionPresenterTests.kt @@ -22,7 +22,7 @@ import app.cash.turbine.ReceiveTurbine import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.features.verifysession.impl.VerifySelfSessionState.VerificationStep -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.verification.SessionVerificationData import io.element.android.libraries.matrix.api.verification.VerificationEmoji import io.element.android.libraries.matrix.api.verification.VerificationFlowState @@ -173,7 +173,7 @@ class VerifySelfSessionPresenterTests { assertThat(awaitItem().verificationFlowStep).isEqualTo( VerificationStep.Verifying( SessionVerificationData.Emojis(emojis), - Async.Loading(), + AsyncData.Loading(), ) ) assertThat(awaitItem().verificationFlowStep).isEqualTo(VerificationStep.Completed) @@ -192,7 +192,7 @@ class VerifySelfSessionPresenterTests { assertThat(awaitItem().verificationFlowStep).isEqualTo( VerificationStep.Verifying( SessionVerificationData.Emojis(emptyList()), - Async.Loading(), + AsyncData.Loading(), ) ) assertThat(awaitItem().verificationFlowStep).isEqualTo(VerificationStep.Canceled) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d7867cf95f..a145e4dd96 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,9 +3,7 @@ [versions] # Project -# Warning: version 8.2.0 is leading https://github.com/element-hq/element-x-android/issues/1971 -# which will only occurs in release mode, and so will not be detected by Maestro -android_gradle_plugin = "8.1.4" +android_gradle_plugin = "8.2.1" kotlin = "1.9.21" ksp = "1.9.21-1.0.16" firebaseAppDistribution = "4.0.1" @@ -150,7 +148,7 @@ showkase = { module = "com.airbnb.android:showkase", version.ref = "showkase" } showkase_processor = { module = "com.airbnb.android:showkase-processor", version.ref = "showkase" } jsoup = "org.jsoup:jsoup:1.17.2" appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" } -molecule-runtime = "app.cash.molecule:molecule-runtime:1.3.1" +molecule-runtime = "app.cash.molecule:molecule-runtime:1.3.2" timber = "com.jakewharton.timber:timber:5.0.1" matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.1.83" matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" } @@ -172,7 +170,7 @@ opusencoder = "io.element.android:opusencoder:1.1.0" kotlinpoet = "com.squareup:kotlinpoet:1.15.3" # Analytics -posthog = "com.posthog:posthog-android:3.0.0" +posthog = "com.posthog:posthog-android:3.0.1" sentry = "io.sentry:sentry-android:7.1.0" matrix_analytics_events = "com.github.matrix-org:matrix-analytics-events:aa14cbcdf81af2746d20a71779ec751f971e1d7f" diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncAction.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncAction.kt new file mode 100644 index 0000000000..ef64c973df --- /dev/null +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncAction.kt @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2023 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.element.android.libraries.architecture + +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.Stable +import kotlin.contracts.ExperimentalContracts +import kotlin.contracts.InvocationKind +import kotlin.contracts.contract + +/** + * Sealed type that allows to model an asynchronous operation triggered by the user. + */ +@Stable +sealed interface AsyncAction { + + /** + * Represents an uninitialized operation (i.e. yet to be run by the user). + */ + data object Uninitialized : AsyncAction + + /** + * Represents an operation that is currently waiting for user confirmation. + */ + data object Confirming : AsyncAction + + /** + * Represents an operation that is currently ongoing. + */ + data object Loading : AsyncAction + + /** + * Represents a failed operation. + * + * @property error the error that caused the operation to fail. + */ + data class Failure( + val error: Throwable, + ) : AsyncAction + + /** + * Represents a successful operation. + * + * @param T the type of data returned by the operation. + * @property data the data returned by the operation. + */ + data class Success( + val data: T, + ) : AsyncAction + + /** + * Returns the data returned by the operation, or null otherwise. + */ + fun dataOrNull(): T? = when (this) { + is Success -> data + else -> null + } + + /** + * Returns the error that caused the operation to fail, or null otherwise. + */ + fun errorOrNull(): Throwable? = when (this) { + is Failure -> error + else -> null + } + + fun isUninitialized(): Boolean = this == Uninitialized + + fun isConfirming(): Boolean = this is Confirming + + fun isLoading(): Boolean = this is Loading + + fun isFailure(): Boolean = this is Failure + + fun isSuccess(): Boolean = this is Success +} + +suspend inline fun MutableState>.runCatchingUpdatingState( + errorTransform: (Throwable) -> Throwable = { it }, + block: () -> T, +): Result = runUpdatingState( + state = this, + errorTransform = errorTransform, + resultBlock = { + runCatching { + block() + } + }, +) + +suspend inline fun (suspend () -> T).runCatchingUpdatingState( + state: MutableState>, + errorTransform: (Throwable) -> Throwable = { it }, +): Result = runUpdatingState( + state = state, + errorTransform = errorTransform, + resultBlock = { + runCatching { + this() + } + }, +) + +suspend inline fun MutableState>.runUpdatingState( + errorTransform: (Throwable) -> Throwable = { it }, + resultBlock: () -> Result, +): Result = runUpdatingState( + state = this, + errorTransform = errorTransform, + resultBlock = resultBlock, +) + +/** + * Calls the specified [Result]-returning function [resultBlock] + * encapsulating its progress and return value into an [AsyncAction] while + * posting its updates to the MutableState [state]. + * + * @param T the type of data returned by the operation. + * @param state the [MutableState] to post updates to. + * @param errorTransform a function to transform the error before posting it. + * @param resultBlock a suspending function that returns a [Result]. + * @return the [Result] returned by [resultBlock]. + */ +@OptIn(ExperimentalContracts::class) +@Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE") +suspend inline fun runUpdatingState( + state: MutableState>, + errorTransform: (Throwable) -> Throwable = { it }, + resultBlock: suspend () -> Result, +): Result { + contract { + callsInPlace(resultBlock, InvocationKind.EXACTLY_ONCE) + } + state.value = AsyncAction.Loading + return resultBlock().fold( + onSuccess = { + state.value = AsyncAction.Success(it) + Result.success(it) + }, + onFailure = { + val error = errorTransform(it) + state.value = AsyncAction.Failure( + error = error, + ) + Result.failure(error) + } + ) +} diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/Async.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncData.kt similarity index 88% rename from libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/Async.kt rename to libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncData.kt index fb7bc2836b..de547d87e6 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/Async.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncData.kt @@ -26,7 +26,7 @@ import kotlin.contracts.contract * Sealed type that allows to model an asynchronous operation. */ @Stable -sealed interface Async { +sealed interface AsyncData { /** * Represents a failed operation. @@ -38,7 +38,7 @@ sealed interface Async { data class Failure( val error: Throwable, val prevData: T? = null, - ) : Async + ) : AsyncData /** * Represents an operation that is currently ongoing. @@ -48,7 +48,7 @@ sealed interface Async { */ data class Loading( val prevData: T? = null, - ) : Async + ) : AsyncData /** * Represents a successful operation. @@ -58,12 +58,12 @@ sealed interface Async { */ data class Success( val data: T, - ) : Async + ) : AsyncData /** * Represents an uninitialized operation (i.e. yet to be run). */ - data object Uninitialized : Async + data object Uninitialized : AsyncData /** * Returns the data returned by the operation, or null otherwise. @@ -94,7 +94,7 @@ sealed interface Async { fun isUninitialized(): Boolean = this == Uninitialized } -suspend inline fun MutableState>.runCatchingUpdatingState( +suspend inline fun MutableState>.runCatchingUpdatingState( errorTransform: (Throwable) -> Throwable = { it }, block: () -> T, ): Result = runUpdatingState( @@ -108,7 +108,7 @@ suspend inline fun MutableState>.runCatchingUpdatingState( ) suspend inline fun (suspend () -> T).runCatchingUpdatingState( - state: MutableState>, + state: MutableState>, errorTransform: (Throwable) -> Throwable = { it }, ): Result = runUpdatingState( state = state, @@ -120,7 +120,7 @@ suspend inline fun (suspend () -> T).runCatchingUpdatingState( }, ) -suspend inline fun MutableState>.runUpdatingState( +suspend inline fun MutableState>.runUpdatingState( errorTransform: (Throwable) -> Throwable = { it }, resultBlock: () -> Result, ): Result = runUpdatingState( @@ -131,7 +131,7 @@ suspend inline fun MutableState>.runUpdatingState( /** * Calls the specified [Result]-returning function [resultBlock] - * encapsulating its progress and return value into an [Async] while + * encapsulating its progress and return value into an [AsyncData] while * posting its updates to the MutableState [state]. * * @param T the type of data returned by the operation. @@ -143,7 +143,7 @@ suspend inline fun MutableState>.runUpdatingState( @OptIn(ExperimentalContracts::class) @Suppress("REDUNDANT_INLINE_SUSPEND_FUNCTION_TYPE") suspend inline fun runUpdatingState( - state: MutableState>, + state: MutableState>, errorTransform: (Throwable) -> Throwable = { it }, resultBlock: suspend () -> Result, ): Result { @@ -151,15 +151,15 @@ suspend inline fun runUpdatingState( callsInPlace(resultBlock, InvocationKind.EXACTLY_ONCE) } val prevData = state.value.dataOrNull() - state.value = Async.Loading(prevData = prevData) + state.value = AsyncData.Loading(prevData = prevData) return resultBlock().fold( onSuccess = { - state.value = Async.Success(it) + state.value = AsyncData.Success(it) Result.success(it) }, onFailure = { val error = errorTransform(it) - state.value = Async.Failure( + state.value = AsyncData.Failure( error = error, prevData = prevData, ) diff --git a/libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/AsyncKtTest.kt b/libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/AsyncDataKtTest.kt similarity index 74% rename from libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/AsyncKtTest.kt rename to libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/AsyncDataKtTest.kt index 4b6c75a108..5069950b7a 100644 --- a/libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/AsyncKtTest.kt +++ b/libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/AsyncDataKtTest.kt @@ -22,10 +22,10 @@ import kotlinx.coroutines.delay import kotlinx.coroutines.test.runTest import org.junit.Test -class AsyncKtTest { +class AsyncDataKtTest { @Test fun `updates state when block returns success`() = runTest { - val state = TestableMutableState>(Async.Uninitialized) + val state = TestableMutableState>(AsyncData.Uninitialized) val result = runUpdatingState(state) { delay(1) @@ -35,15 +35,15 @@ class AsyncKtTest { assertThat(result.isSuccess).isTrue() assertThat(result.getOrNull()).isEqualTo(1) - assertThat(state.popFirst()).isEqualTo(Async.Uninitialized) - assertThat(state.popFirst()).isEqualTo(Async.Loading(null)) - assertThat(state.popFirst()).isEqualTo(Async.Success(1)) + assertThat(state.popFirst()).isEqualTo(AsyncData.Uninitialized) + assertThat(state.popFirst()).isEqualTo(AsyncData.Loading(null)) + assertThat(state.popFirst()).isEqualTo(AsyncData.Success(1)) state.assertNoMoreValues() } @Test fun `updates state when block returns failure`() = runTest { - val state = TestableMutableState>(Async.Uninitialized) + val state = TestableMutableState>(AsyncData.Uninitialized) val result = runUpdatingState(state) { delay(1) @@ -53,15 +53,15 @@ class AsyncKtTest { assertThat(result.isFailure).isTrue() assertThat(result.exceptionOrNull()).isEqualTo(MyThrowable("hello")) - assertThat(state.popFirst()).isEqualTo(Async.Uninitialized) - assertThat(state.popFirst()).isEqualTo(Async.Loading(null)) - assertThat(state.popFirst()).isEqualTo(Async.Failure(MyThrowable("hello"))) + assertThat(state.popFirst()).isEqualTo(AsyncData.Uninitialized) + assertThat(state.popFirst()).isEqualTo(AsyncData.Loading(null)) + assertThat(state.popFirst()).isEqualTo(AsyncData.Failure(MyThrowable("hello"))) state.assertNoMoreValues() } @Test fun `updates state when block returns failure transforming the error`() = runTest { - val state = TestableMutableState>(Async.Uninitialized) + val state = TestableMutableState>(AsyncData.Uninitialized) val result = runUpdatingState(state, { MyThrowable(it.message + " world") }) { delay(1) @@ -71,9 +71,9 @@ class AsyncKtTest { assertThat(result.isFailure).isTrue() assertThat(result.exceptionOrNull()).isEqualTo(MyThrowable("hello world")) - assertThat(state.popFirst()).isEqualTo(Async.Uninitialized) - assertThat(state.popFirst()).isEqualTo(Async.Loading(null)) - assertThat(state.popFirst()).isEqualTo(Async.Failure(MyThrowable("hello world"))) + assertThat(state.popFirst()).isEqualTo(AsyncData.Uninitialized) + assertThat(state.popFirst()).isEqualTo(AsyncData.Loading(null)) + assertThat(state.popFirst()).isEqualTo(AsyncData.Failure(MyThrowable("hello world"))) state.assertNoMoreValues() } } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncProvider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionProvider.kt similarity index 65% rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncProvider.kt rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionProvider.kt index 028de2d57b..d74f0de5ca 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncProvider.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionProvider.kt @@ -17,14 +17,15 @@ package io.element.android.libraries.designsystem.components.async import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction -open class AsyncProvider : PreviewParameterProvider> { - override val values: Sequence> +open class AsyncActionProvider : PreviewParameterProvider> { + override val values: Sequence> get() = sequenceOf( - Async.Uninitialized, - Async.Loading(), - Async.Failure(Exception("An error occurred")), - Async.Success(Unit), + AsyncAction.Uninitialized, + AsyncAction.Confirming, + AsyncAction.Loading, + AsyncAction.Failure(Exception("An error occurred")), + AsyncAction.Success(Unit), ) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncView.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt similarity index 67% rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncView.kt rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt index d19dc08c6a..732a3473a3 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncView.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt @@ -19,8 +19,9 @@ package io.element.android.libraries.designsystem.components.async import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.tooling.preview.PreviewParameter -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.designsystem.components.ProgressDialog +import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.components.dialogs.ErrorDialogDefaults import io.element.android.libraries.designsystem.components.dialogs.RetryDialog @@ -28,52 +29,28 @@ import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight /** - * Render an Async object. + * Render an AsyncAction object. * - If Success, invoke the callback [onSuccess], only once. * - If Failure, display a dialog with the error, which can be transformed, using [errorMessage]. When * closed, [onErrorDismiss] will be invoked. If [onRetry] is not null, a retry button will be displayed. - * - When loading, display a loading dialog, if [showProgressDialog] is true, with on optional [progressText]. + * - When loading, display a loading dialog using [progressDialog]. Pass empty lambda to disable. */ @Composable -fun AsyncView( - async: Async, +fun AsyncActionView( + async: AsyncAction, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, - showProgressDialog: Boolean = true, - progressText: String? = null, - errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, - errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, - onRetry: (() -> Unit)? = null, -) { - AsyncView( - async = async, - onSuccess = onSuccess, - onErrorDismiss = onErrorDismiss, - progressDialog = { - if (showProgressDialog) { - AsyncViewDefaults.ProgressDialog(progressText) - } - }, - errorTitle = errorTitle, - errorMessage = errorMessage, - onRetry = onRetry, - ) -} - -@Composable -fun AsyncView( - async: Async, - onSuccess: (T) -> Unit, - onErrorDismiss: () -> Unit, - progressDialog: @Composable () -> Unit = { AsyncViewDefaults.ProgressDialog() }, + confirmationDialog: @Composable () -> Unit = { }, + progressDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ProgressDialog() }, errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, onRetry: (() -> Unit)? = null, ) { when (async) { - Async.Uninitialized -> Unit - is Async.Loading -> progressDialog() - is Async.Failure -> { + AsyncAction.Uninitialized -> Unit + AsyncAction.Confirming -> confirmationDialog() + is AsyncAction.Loading -> progressDialog() + is AsyncAction.Failure -> { if (onRetry == null) { ErrorDialog( title = errorTitle(async.error), @@ -89,7 +66,7 @@ fun AsyncView( ) } } - is Async.Success -> { + is AsyncAction.Success -> { LaunchedEffect(async) { onSuccess(async.data) } @@ -97,7 +74,7 @@ fun AsyncView( } } -object AsyncViewDefaults { +object AsyncActionViewDefaults { @Composable fun ProgressDialog(progressText: String? = null) { ProgressDialog( @@ -108,12 +85,20 @@ object AsyncViewDefaults { @PreviewsDayNight @Composable -internal fun AsyncViewPreview( - @PreviewParameter(AsyncProvider::class) async: Async, +internal fun AsyncActionViewPreview( + @PreviewParameter(AsyncActionProvider::class) async: AsyncAction, ) = ElementPreview { - AsyncView( + AsyncActionView( async = async, onSuccess = {}, onErrorDismiss = {}, + confirmationDialog = { + ConfirmationDialog( + title = "Confirmation", + content = "Are you sure?", + onSubmitClicked = {}, + onDismiss = {}, + ) + }, ) } diff --git a/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatter.kt b/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatter.kt index e79b0ed199..6119fa00d9 100644 --- a/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatter.kt +++ b/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatter.kt @@ -63,47 +63,52 @@ class DefaultRoomLastMessageFormatter @Inject constructor( private val stateContentFormatter: StateContentFormatter, ) : RoomLastMessageFormatter { + companion object { + // Max characters to display in the last message. This works around https://github.com/element-hq/element-x-android/issues/2105 + private const val MAX_SAFE_LENGTH = 500 + } + override fun format(event: EventTimelineItem, isDmRoom: Boolean): CharSequence? { val isOutgoing = event.isOwn val senderDisplayName = (event.senderProfile as? ProfileTimelineDetails.Ready)?.displayName ?: event.sender.value return when (val content = event.content) { - is MessageContent -> processMessageContents(content, senderDisplayName, isDmRoom) - RedactedContent -> { - val message = sp.getString(CommonStrings.common_message_removed) - if (!isDmRoom) { - prefix(message, senderDisplayName) - } else { - message + is MessageContent -> processMessageContents(content, senderDisplayName, isDmRoom) + RedactedContent -> { + val message = sp.getString(CommonStrings.common_message_removed) + if (!isDmRoom) { + prefix(message, senderDisplayName) + } else { + message + } } - } - is StickerContent -> { - content.body - } - is UnableToDecryptContent -> { - val message = sp.getString(CommonStrings.common_waiting_for_decryption_key) - if (!isDmRoom) { - prefix(message, senderDisplayName) - } else { - message + is StickerContent -> { + content.body } - } - is RoomMembershipContent -> { - roomMembershipContentFormatter.format(content, senderDisplayName, isOutgoing) - } - is ProfileChangeContent -> { - profileChangeContentFormatter.format(content, senderDisplayName, isOutgoing) - } - is StateContent -> { - stateContentFormatter.format(content, senderDisplayName, isOutgoing, RenderingMode.RoomList) - } - is PollContent -> { - val message = sp.getString(CommonStrings.common_poll_summary, content.question) - prefixIfNeeded(message, senderDisplayName, isDmRoom) - } - is FailedToParseMessageLikeContent, is FailedToParseStateContent, is UnknownContent -> { - prefixIfNeeded(sp.getString(CommonStrings.common_unsupported_event), senderDisplayName, isDmRoom) - } - } + is UnableToDecryptContent -> { + val message = sp.getString(CommonStrings.common_waiting_for_decryption_key) + if (!isDmRoom) { + prefix(message, senderDisplayName) + } else { + message + } + } + is RoomMembershipContent -> { + roomMembershipContentFormatter.format(content, senderDisplayName, isOutgoing) + } + is ProfileChangeContent -> { + profileChangeContentFormatter.format(content, senderDisplayName, isOutgoing) + } + is StateContent -> { + stateContentFormatter.format(content, senderDisplayName, isOutgoing, RenderingMode.RoomList) + } + is PollContent -> { + val message = sp.getString(CommonStrings.common_poll_summary, content.question) + prefixIfNeeded(message, senderDisplayName, isDmRoom) + } + is FailedToParseMessageLikeContent, is FailedToParseStateContent, is UnknownContent -> { + prefixIfNeeded(sp.getString(CommonStrings.common_unsupported_event), senderDisplayName, isDmRoom) + } + }?.take(MAX_SAFE_LENGTH) } private fun processMessageContents(messageContent: MessageContent, senderDisplayName: String, isDmRoom: Boolean): CharSequence? { diff --git a/libraries/eventformatter/impl/src/main/res/values-cs/translations.xml b/libraries/eventformatter/impl/src/main/res/values-cs/translations.xml index 69179b1276..ecbe8031b9 100644 --- a/libraries/eventformatter/impl/src/main/res/values-cs/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-cs/translations.xml @@ -39,6 +39,8 @@ "Změnili jste název místnosti na: %1$s" "%1$s odstranil(a) název místnosti" "Odstranili jste název místnosti" + "%1$s neprovedl(a) žádné změny" + "Neprovedli jste žádné změny" "%1$s pozvánku odmítl(a)" "Odmítli jste pozvání" "%1$s odebral(a) %2$s" diff --git a/libraries/eventformatter/impl/src/main/res/values-fr/translations.xml b/libraries/eventformatter/impl/src/main/res/values-fr/translations.xml index f7c12a2028..be8f466aa3 100644 --- a/libraries/eventformatter/impl/src/main/res/values-fr/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-fr/translations.xml @@ -39,6 +39,8 @@ "Vous avez changé le nom du salon en : %1$s" "%1$s a supprimé le nom du salon" "Vous avez supprimé le nom du salon" + "%1$s n‘a fait aucun changement visible" + "Vous n‘avez fait aucun changement visible" "%1$s a rejeté l’invitation" "Vous avez refusé l’invitation" "%1$s a supprimé %2$s" diff --git a/libraries/eventformatter/impl/src/main/res/values-ru/translations.xml b/libraries/eventformatter/impl/src/main/res/values-ru/translations.xml index 4c1defbb68..7930c496dc 100644 --- a/libraries/eventformatter/impl/src/main/res/values-ru/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-ru/translations.xml @@ -39,6 +39,8 @@ "Вы изменили название комнаты на: %1$s" "%1$s удалил название комнаты" "Вы удалили название комнаты" + "%1$s ничего не изменилось" + "Вы не внесли никаких изменений" "%1$s отклонил приглашение" "Вы отклонили приглашение" "%1$s удалил %2$s" diff --git a/libraries/eventformatter/impl/src/main/res/values-sk/translations.xml b/libraries/eventformatter/impl/src/main/res/values-sk/translations.xml index 13722a3318..1987a2d333 100644 --- a/libraries/eventformatter/impl/src/main/res/values-sk/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-sk/translations.xml @@ -39,6 +39,8 @@ "Zmenili ste názov miestnosti na: %1$s" "%1$s odstránil/a názov miestnosti" "Odstránili ste názov miestnosti" + "%1$s nevykonal/a žiadne zmeny" + "Nevykonali ste žiadne zmeny" "%1$s odmietol/a pozvánku" "Odmietli ste pozvánku" "%1$s odstránil/a %2$s" diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToHtmlDocument.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToHtmlDocument.kt index 8db1e6b5db..056aa5e8be 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToHtmlDocument.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToHtmlDocument.kt @@ -32,7 +32,11 @@ import org.jsoup.nodes.Document * @param prefix if not null, the prefix will be inserted at the beginning of the message. */ fun FormattedBody.toHtmlDocument(prefix: String? = null): Document? { - return takeIf { it.format == MessageFormat.HTML }?.body?.let { formattedBody -> + return takeIf { it.format == MessageFormat.HTML }?.body + // Trim whitespace at the end to avoid having wrong rendering of the message. + // We don't trim the start in case it's used as indentation. + ?.trimEnd() + ?.let { formattedBody -> val dom = if (prefix != null) { Jsoup.parse("$prefix $formattedBody") } else { diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerPresenter.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerPresenter.kt index 90d81a4d0c..574c6344f1 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerPresenter.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerPresenter.kt @@ -29,7 +29,7 @@ import androidx.compose.runtime.setValue import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage @@ -64,8 +64,8 @@ class MediaViewerPresenter @AssistedInject constructor( val mediaFile: MutableState = remember { mutableStateOf(null) } - val localMedia: MutableState> = remember { - mutableStateOf(Async.Uninitialized) + val localMedia: MutableState> = remember { + mutableStateOf(AsyncData.Uninitialized) } val snackbarMessage by snackbarDispatcher.collectSnackbarMessageAsState() localMediaActions.Configure() @@ -79,7 +79,7 @@ class MediaViewerPresenter @AssistedInject constructor( fun handleEvents(mediaViewerEvents: MediaViewerEvents) { when (mediaViewerEvents) { MediaViewerEvents.RetryLoading -> loadMediaTrigger++ - MediaViewerEvents.ClearLoadingError -> localMedia.value = Async.Uninitialized + MediaViewerEvents.ClearLoadingError -> localMedia.value = AsyncData.Uninitialized MediaViewerEvents.SaveOnDisk -> coroutineScope.saveOnDisk(localMedia.value) MediaViewerEvents.Share -> coroutineScope.share(localMedia.value) MediaViewerEvents.OpenWith -> coroutineScope.open(localMedia.value) @@ -97,8 +97,8 @@ class MediaViewerPresenter @AssistedInject constructor( ) } - private fun CoroutineScope.downloadMedia(mediaFile: MutableState, localMedia: MutableState>) = launch { - localMedia.value = Async.Loading() + private fun CoroutineScope.downloadMedia(mediaFile: MutableState, localMedia: MutableState>) = launch { + localMedia.value = AsyncData.Loading() mediaLoader.downloadMediaFile( source = inputs.mediaSource, mimeType = inputs.mediaInfo.mimeType, @@ -114,15 +114,15 @@ class MediaViewerPresenter @AssistedInject constructor( ) } .onSuccess { - localMedia.value = Async.Success(it) + localMedia.value = AsyncData.Success(it) } .onFailure { - localMedia.value = Async.Failure(it) + localMedia.value = AsyncData.Failure(it) } } - private fun CoroutineScope.saveOnDisk(localMedia: Async) = launch { - if (localMedia is Async.Success) { + private fun CoroutineScope.saveOnDisk(localMedia: AsyncData) = launch { + if (localMedia is AsyncData.Success) { localMediaActions.saveOnDisk(localMedia.data) .onSuccess { val snackbarMessage = SnackbarMessage(CommonStrings.common_file_saved_on_disk_android) @@ -135,8 +135,8 @@ class MediaViewerPresenter @AssistedInject constructor( } else Unit } - private fun CoroutineScope.share(localMedia: Async) = launch { - if (localMedia is Async.Success) { + private fun CoroutineScope.share(localMedia: AsyncData) = launch { + if (localMedia is AsyncData.Success) { localMediaActions.share(localMedia.data) .onFailure { val snackbarMessage = SnackbarMessage(mediaActionsError(it)) @@ -145,8 +145,8 @@ class MediaViewerPresenter @AssistedInject constructor( } else Unit } - private fun CoroutineScope.open(localMedia: Async) = launch { - if (localMedia is Async.Success) { + private fun CoroutineScope.open(localMedia: AsyncData) = launch { + if (localMedia is AsyncData.Success) { localMediaActions.open(localMedia.data) .onFailure { val snackbarMessage = SnackbarMessage(mediaActionsError(it)) diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerState.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerState.kt index 4b68f4afcc..6d88cc7c06 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerState.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerState.kt @@ -16,7 +16,7 @@ package io.element.android.libraries.mediaviewer.api.viewer -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.matrix.api.media.MediaSource import io.element.android.libraries.mediaviewer.api.local.LocalMedia @@ -25,7 +25,7 @@ import io.element.android.libraries.mediaviewer.api.local.MediaInfo data class MediaViewerState( val mediaInfo: MediaInfo, val thumbnailSource: MediaSource?, - val downloadedMedia: Async, + val downloadedMedia: AsyncData, val snackbarMessage: SnackbarMessage?, val canDownload: Boolean, val canShare: Boolean, diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerStateProvider.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerStateProvider.kt index 14f792c2c6..a9d6e4fc98 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerStateProvider.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerStateProvider.kt @@ -18,7 +18,7 @@ package io.element.android.libraries.mediaviewer.api.viewer import android.net.Uri import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.mediaviewer.api.local.LocalMedia import io.element.android.libraries.mediaviewer.api.local.MediaInfo import io.element.android.libraries.mediaviewer.api.local.aFileInfo @@ -31,48 +31,48 @@ open class MediaViewerStateProvider : PreviewParameterProvider override val values: Sequence get() = sequenceOf( aMediaViewerState(), - aMediaViewerState(Async.Loading()), - aMediaViewerState(Async.Failure(IllegalStateException("error"))), + aMediaViewerState(AsyncData.Loading()), + aMediaViewerState(AsyncData.Failure(IllegalStateException("error"))), aMediaViewerState( - Async.Success( + AsyncData.Success( LocalMedia(Uri.EMPTY, anImageInfo()) ), anImageInfo(), ), aMediaViewerState( - Async.Success( + AsyncData.Success( LocalMedia(Uri.EMPTY, aVideoInfo()) ), aVideoInfo(), ), aMediaViewerState( - Async.Success( + AsyncData.Success( LocalMedia(Uri.EMPTY, aPdfInfo()) ), aPdfInfo(), ), aMediaViewerState( - Async.Loading(), + AsyncData.Loading(), aFileInfo(), ), aMediaViewerState( - Async.Success( + AsyncData.Success( LocalMedia(Uri.EMPTY, aFileInfo()) ), aFileInfo(), ), aMediaViewerState( - Async.Loading(), + AsyncData.Loading(), anAudioInfo(), ), aMediaViewerState( - Async.Success( + AsyncData.Success( LocalMedia(Uri.EMPTY, anAudioInfo()) ), anAudioInfo(), ), aMediaViewerState( - Async.Success( + AsyncData.Success( LocalMedia(Uri.EMPTY, anImageInfo()) ), anImageInfo(), @@ -83,7 +83,7 @@ open class MediaViewerStateProvider : PreviewParameterProvider } fun aMediaViewerState( - downloadedMedia: Async = Async.Uninitialized, + downloadedMedia: AsyncData = AsyncData.Uninitialized, mediaInfo: MediaInfo = anImageInfo(), canDownload: Boolean = true, canShare: Boolean = true, diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerView.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerView.kt index d7f743f7ad..1fb557c126 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerView.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerView.kt @@ -47,7 +47,7 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import coil.compose.AsyncImage -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.core.mimetype.MimeTypes import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.components.dialogs.RetryDialog @@ -93,7 +93,7 @@ fun MediaViewerView( modifier, topBar = { MediaViewerTopBar( - actionsEnabled = state.downloadedMedia is Async.Success, + actionsEnabled = state.downloadedMedia is AsyncData.Success, mimeType = state.mediaInfo.mimeType, onBackPressed = onBackPressed, canDownload = state.canDownload, @@ -121,7 +121,7 @@ fun MediaViewerView( modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center ) { - if (state.downloadedMedia is Async.Failure) { + if (state.downloadedMedia is AsyncData.Failure) { ErrorView( errorMessage = stringResource(id = CommonStrings.error_unknown), onRetry = ::onRetry, @@ -144,7 +144,7 @@ fun MediaViewerView( } @Composable -private fun rememberShowProgress(downloadedMedia: Async): Boolean { +private fun rememberShowProgress(downloadedMedia: AsyncData): Boolean { var showProgress by remember { mutableStateOf(false) } diff --git a/libraries/mediaviewer/api/src/test/kotlin/io/element/android/libraries/mediaviewer/MediaViewerPresenterTest.kt b/libraries/mediaviewer/api/src/test/kotlin/io/element/android/libraries/mediaviewer/MediaViewerPresenterTest.kt index ce2b4651a5..c8589e2adb 100644 --- a/libraries/mediaviewer/api/src/test/kotlin/io/element/android/libraries/mediaviewer/MediaViewerPresenterTest.kt +++ b/libraries/mediaviewer/api/src/test/kotlin/io/element/android/libraries/mediaviewer/MediaViewerPresenterTest.kt @@ -23,7 +23,7 @@ import app.cash.molecule.RecompositionMode import app.cash.molecule.moleculeFlow import app.cash.turbine.test import com.google.common.truth.Truth.assertThat -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher import io.element.android.libraries.matrix.test.media.FakeMediaLoader import io.element.android.libraries.matrix.test.media.aMediaSource @@ -60,13 +60,13 @@ class MediaViewerPresenterTest { presenter.present() }.test { var state = awaitItem() - assertThat(state.downloadedMedia).isEqualTo(Async.Uninitialized) + assertThat(state.downloadedMedia).isEqualTo(AsyncData.Uninitialized) assertThat(state.mediaInfo).isEqualTo(TESTED_MEDIA_INFO) state = awaitItem() - assertThat(state.downloadedMedia).isInstanceOf(Async.Loading::class.java) + assertThat(state.downloadedMedia).isInstanceOf(AsyncData.Loading::class.java) state = awaitItem() val successData = state.downloadedMedia.dataOrNull() - assertThat(state.downloadedMedia).isInstanceOf(Async.Success::class.java) + assertThat(state.downloadedMedia).isInstanceOf(AsyncData.Success::class.java) assertThat(successData).isNotNull() } } @@ -81,15 +81,15 @@ class MediaViewerPresenterTest { presenter.present() }.test { var state = awaitItem() - assertThat(state.downloadedMedia).isEqualTo(Async.Uninitialized) + assertThat(state.downloadedMedia).isEqualTo(AsyncData.Uninitialized) state = awaitItem() - assertThat(state.downloadedMedia).isInstanceOf(Async.Loading::class.java) + assertThat(state.downloadedMedia).isInstanceOf(AsyncData.Loading::class.java) // no state changes while media is loading state.eventSink(MediaViewerEvents.OpenWith) state.eventSink(MediaViewerEvents.Share) state.eventSink(MediaViewerEvents.SaveOnDisk) state = awaitItem() - assertThat(state.downloadedMedia).isInstanceOf(Async.Success::class.java) + assertThat(state.downloadedMedia).isInstanceOf(AsyncData.Success::class.java) // Should succeed without change of state state.eventSink(MediaViewerEvents.OpenWith) // Should succeed without change of state @@ -128,21 +128,21 @@ class MediaViewerPresenterTest { }.test { mediaLoader.shouldFail = true val initialState = awaitItem() - assertThat(initialState.downloadedMedia).isEqualTo(Async.Uninitialized) + assertThat(initialState.downloadedMedia).isEqualTo(AsyncData.Uninitialized) assertThat(initialState.mediaInfo).isEqualTo(TESTED_MEDIA_INFO) val loadingState = awaitItem() - assertThat(loadingState.downloadedMedia).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.downloadedMedia).isInstanceOf(AsyncData.Loading::class.java) val failureState = awaitItem() - assertThat(failureState.downloadedMedia).isInstanceOf(Async.Failure::class.java) + assertThat(failureState.downloadedMedia).isInstanceOf(AsyncData.Failure::class.java) mediaLoader.shouldFail = false failureState.eventSink(MediaViewerEvents.RetryLoading) //There is one recomposition because of the retry mechanism skipItems(1) val retryLoadingState = awaitItem() - assertThat(retryLoadingState.downloadedMedia).isInstanceOf(Async.Loading::class.java) + assertThat(retryLoadingState.downloadedMedia).isInstanceOf(AsyncData.Loading::class.java) val successState = awaitItem() val successData = successState.downloadedMedia.dataOrNull() - assertThat(successState.downloadedMedia).isInstanceOf(Async.Success::class.java) + assertThat(successState.downloadedMedia).isInstanceOf(AsyncData.Success::class.java) assertThat(successData).isNotNull() } } diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Day-1_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Day-1_2_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Day-1_1_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Day-1_2_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Night-1_2_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Night-1_3_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Night-1_2_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Night-1_3_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_2_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_3_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_4_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_4_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_4_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_4_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_4_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_5_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_4_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_5_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_4_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_5_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_4_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_5_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_4_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_4_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_4_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_4_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_4_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_4_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_5_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_5_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_5_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_5_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_5_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_5_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Day-0_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Day-0_1_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Day-0_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Day-0_1_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Night-0_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Night-0_2_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Night-0_1_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Night-0_2_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Day-1_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Day-1_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Day-1_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Day-1_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Night-1_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Night-1_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Night-1_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Night-1_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Day-2_2_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Day-2_3_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Day-2_2_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Day-2_3_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Night-2_3_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Night-2_4_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Night-2_3_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Night-2_4_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_1_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_1_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_2_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_0,NEXUS_5,1.0,en].png index 39dfb13f1f..06706d5db0 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79b9fa345741c9ac7d0692d8a703366a956e65ec8de90ed56565de74792e0463 -size 62366 +oid sha256:f99a45bad10518fc7cdd0c6b62c3b7c12b953d5c12b76374adc57beeaeed05dc +size 31900 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_1,NEXUS_5,1.0,en].png index d02ad0ab57..c7a534829e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c86dd7eab9b07bd226b5f05c0f50fde475118504be789659f1536cdccb3ec06 -size 65149 +oid sha256:250dec5e2a7978d76af79ba97786036b0091e8fe3dc08374fd031b6563a12789 +size 33697 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_2,NEXUS_5,1.0,en].png index 77cb0a1278..4070a0fe7b 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e266c57ad969e67ab24546573cf7e67b58734b3dc24f18ee872b043c6279f4f -size 69476 +oid sha256:6410f925c934ad5319089e7842fa7f32fba671987db9aef7eebe4a72268baeb2 +size 35858 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_3,NEXUS_5,1.0,en].png index eaffe6f4c8..dc5357d8f8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Day-18_18_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db4dd5c7b1d012a52f0b20f8e94d1ec01d8615b4a4db40c831ea986c31cbd4ba -size 72370 +oid sha256:8325e9f481c773afbd7ee74a62dcd02138683e0eb80492d70a7c66d069beaba4 +size 37641 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_0,NEXUS_5,1.0,en].png index 126d13b502..26694f2bf4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7197e5e329c23f8647f9345d43ea4d90396fc7b98f55409f26ba286e202de2a1 -size 62958 +oid sha256:a5255922d4e387028b67cd9c6132321ace8c6b7878b91e4b394b2ea5586338e9 +size 32315 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_1,NEXUS_5,1.0,en].png index 01c8284453..6adbcec2fe 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e91d3af4ac0adb02c9354388d6492807211cad7ed133593d71acc21608a260f -size 65309 +oid sha256:6f487bf2ad343a2eaf8e2540a06cf8e7b3d852e62b9865a9be37f28b1d0e7216 +size 33510 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_2,NEXUS_5,1.0,en].png index 2e79de5da2..fc928ab30d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:928a380efa661ceb95cbb839339a142aa6c1fae747c1136f35e7545434d6876c -size 69676 +oid sha256:3c211c5f61757048cd1468a98f100ce5d295767e17deb6d2c7f587b0c5277138 +size 35840 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_3,NEXUS_5,1.0,en].png index a5c1b5811e..1fe566d255 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowTimestamp_null_TimelineItemEventRowTimestamp-Night-18_19_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:971000889f1e354115f785865a609e822b2ef89f98020142be6a68ae06ce3feb -size 71775 +oid sha256:c9fe1f17279595cb7e10f174d871501379318563abfe1cd3878626451f609260 +size 36947 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_0_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_1_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Day-0_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Day-0_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Day-0_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Night-0_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Night-0_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Night-0_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Day-2_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Day-2_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Day-2_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Day-2_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Night-2_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Night-2_4_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Night-2_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Night-2_4_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Day-4_4_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Day-4_5_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Day-4_4_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Day-4_5_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Night-4_5_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Night-4_6_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Night-4_5_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Night-4_6_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_3_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_3_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_4_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_4_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_4_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_4_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_4_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_4_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Day-7_7_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Day-7_8_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Day-7_7_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Day-7_8_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Night-7_8_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Night-7_9_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Night-7_8_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Night-7_9_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_8_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_9_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Day-6_6_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Day-6_7_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Day-6_6_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Day-6_7_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Night-6_7_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Night-6_8_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Night-6_7_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Night-6_8_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_5_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_5_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_5_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_5_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_5_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_5_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_6_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_6_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_6_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_6_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_6_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_6_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Day-10_10_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Day-10_11_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Day-10_10_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Day-10_11_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Night-10_11_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Night-10_12_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Night-10_11_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Night-10_12_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_9_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_9_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_9_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_9_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_9_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_9_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_10_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_10_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_10_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_10_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_10_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_10_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_0_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_1_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_1_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_2_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_5_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_4_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_2_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_3_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_4_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_5_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Day-3_3_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Day-3_4_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Day-3_3_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Day-3_4_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Night-3_4_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Night-3_5_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Night-3_4_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Night-3_5_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Day-5_5_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Day-5_6_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Day-5_5_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Day-5_6_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Night-5_6_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Night-5_7_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Night-5_6_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Night-5_7_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_3_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_2_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-3_3_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-3_4_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-3_3_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-3_4_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_4_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_5_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_4_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_5_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-6_6_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-6_7_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-6_6_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-6_7_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_7_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_8_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_7_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_8_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-5_5_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-5_6_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-5_5_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-5_6_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_6_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_7_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_6_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_7_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Day-4_4_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Day-4_5_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Day-4_4_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Day-4_5_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_5_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_6_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_5_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_6_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-7_7_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-7_8_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-7_7_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-7_8_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-7_8_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-7_9_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-7_8_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-7_9_null,NEXUS_5,1.0,en].png 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_9_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_1,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_9_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_8_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_1,NEXUS_5,1.0,en].png 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_9_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_2,NEXUS_5,1.0,en].png 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_9_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_3,NEXUS_5,1.0,en].png 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_9_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_4,NEXUS_5,1.0,en].png 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_9_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_5,NEXUS_5,1.0,en].png 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_9_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_6,NEXUS_5,1.0,en].png 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_9_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_7,NEXUS_5,1.0,en].png 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_9_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_8,NEXUS_5,1.0,en].png 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_10_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_1,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_10_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_9_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_1,NEXUS_5,1.0,en].png 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_10_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_2,NEXUS_5,1.0,en].png 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_10_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_3,NEXUS_5,1.0,en].png 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_10_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_4,NEXUS_5,1.0,en].png 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_10_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_5,NEXUS_5,1.0,en].png 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_10_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_6,NEXUS_5,1.0,en].png 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_10_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_7,NEXUS_5,1.0,en].png 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_10_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from 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 rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Day-9_9_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Day-9_10_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Day-9_9_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Day-9_10_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Night-9_10_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Night-9_11_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Night-9_10_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Night-9_11_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_1_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_1_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_2_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_2_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_2_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_2_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Day-1_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Day-1_2_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Day-1_1_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Day-1_2_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Night-1_2_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Night-1_3_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Night-1_2_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Night-1_3_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_2_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_7,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_3_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_1,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..b5e040deae --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_1,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:babf7dba9e6ae0344bd1817db450195630dc63fb8c84fec1c2c747444184ee45 +size 17475 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Day_0_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_1,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..c963ae3a8c --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_1,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:628a1c2531719e617cf10f44c4f61d898429067bc72dd8e4aa4d211bd4968feb +size 14263 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncView_null_AsyncView-Night_1_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_4,NEXUS_5,1.0,en].png