From 860a6d1584b8e4d46337d7660bca302b51d59350 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 19 Dec 2023 21:56:45 +0000 Subject: [PATCH 001/161] Update dagger to v2.50 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b9333d6f40..6c327a1370 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,7 +42,7 @@ sqldelight = "2.0.1" wysiwyg = "2.22.0" # DI -dagger = "2.49" +dagger = "2.50" anvil = "2.4.8-1-8" # Auto service From 2106255c35af1fd4d3359c9de0c9ace1494a8a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 22 Dec 2023 13:24:16 +0100 Subject: [PATCH 002/161] version++ --- plugins/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index 63988c218c..a67390c54b 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -56,7 +56,7 @@ private const val versionMinor = 4 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -private const val versionPatch = 0 +private const val versionPatch = 2 object Versions { val versionCode = 4_000_000 + versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch From bd8dba5e40353160b6e25e63022b89c3f443e5ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Tue, 26 Dec 2023 08:21:02 +0100 Subject: [PATCH 003/161] Fix release script --- tools/github/download_github_artifacts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/github/download_github_artifacts.py b/tools/github/download_github_artifacts.py index 4424c0e009..55553dc05a 100755 --- a/tools/github/download_github_artifacts.py +++ b/tools/github/download_github_artifacts.py @@ -74,13 +74,13 @@ if "/artifacts/" not in artifactUrl: print("❌ Invalid parameter --artifactUrl %s. Must contain '/artifacts/'" % artifactUrl) exit(1) artifactItems = artifactUrl.split("/") -if len(artifactItems) != 9: +if len(artifactItems) != 10: print("❌ Invalid parameter --artifactUrl %s. Please check the format." % (artifactUrl)) exit(1) gitHubRepoOwner = artifactItems[3] gitHubRepo = artifactItems[4] -artifactId = artifactItems[8] +artifactId = artifactItems[9] if args.verbose: print("gitHubRepoOwner: %s, gitHubRepo: %s, artifactId: %s" % (gitHubRepoOwner, gitHubRepo, artifactId)) From e589b97fa54be1f693882accae6e56726002e09e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 20 Dec 2023 09:15:50 +0100 Subject: [PATCH 004/161] Attempt to fix test on CI. The test is failing on CI with this error: expected instance of: io.element.android.libraries.architecture.Async$Success but was instance of : io.element.android.libraries.architecture.Async$Loading with value : Loading(prevData=null) --- .../element/android/features/logout/impl/LogoutPresenterTest.kt | 2 +- .../libraries/matrix/test/encryption/FakeEncryptionService.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 75401c290a..c486e76312 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 @@ -71,7 +71,7 @@ class LogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - skipItems(1) + skipItems(3) val initialState = awaitItem() assertThat(initialState.isLastSession).isTrue() assertThat(initialState.backupUploadState).isEqualTo(BackupUploadState.Unknown) diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt index 44b9d734a5..aafb2e8074 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt @@ -72,7 +72,7 @@ class FakeEncryptionService : EncryptionService { this.isLastDevice = isLastDevice } - override suspend fun isLastDevice(): Result { + override suspend fun isLastDevice(): Result = simulateLongTask { return Result.success(isLastDevice) } From 24e98aa3b8e5339ae6479bb0cba35418a45ca23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Fri, 22 Dec 2023 11:12:41 +0100 Subject: [PATCH 005/161] Revert `com.autonomousapps.dependency-analysis` to a compatible version --- gradle/libs.versions.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1650196db7..3aca91810e 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -213,6 +213,7 @@ detekt = "io.gitlab.arturbosch.detekt:1.23.4" ktlint = "org.jlleitschuh.gradle.ktlint:12.0.3" dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12" dependencycheck = "org.owasp.dependencycheck:9.0.7" +# DO NOT UPGRADE FOR NOW! This causes the build to fail with local AAR versions of the Rust SDK dependencyanalysis = "com.autonomousapps.dependency-analysis:1.27.0" paparazzi = "app.cash.paparazzi:1.3.1" kover = "org.jetbrains.kotlinx.kover:0.6.1" From 2ae18f82466e4af4cb386b22c8f6cba695c414fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Tue, 26 Dec 2023 08:50:01 +0100 Subject: [PATCH 006/161] Use regex instead, add example valid URL --- tools/github/download_github_artifacts.py | 27 ++++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tools/github/download_github_artifacts.py b/tools/github/download_github_artifacts.py index 55553dc05a..d5db1c9f47 100755 --- a/tools/github/download_github_artifacts.py +++ b/tools/github/download_github_artifacts.py @@ -21,6 +21,8 @@ import json import os # Run `pip3 install requests` if not installed yet import requests +# Run `pip3 install re` if not installed yet +import re # This script downloads artifacts from GitHub. # Ref: https://docs.github.com/en/rest/actions/artifacts#get-an-artifact @@ -64,23 +66,22 @@ if args.verbose: print("Argument:") print(args) + # Split the artifact URL to get information -# Ex: https://github.com/element-hq/element-android/suites/9293388174/artifacts/435942121 +# Ex: https://github.com/element-hq/element-x-android/actions/runs/7299827320/artifacts/1131077517 artifactUrl = args.artifactUrl -if not artifactUrl.startswith('https://github.com/'): - print("❌ Invalid parameter --artifactUrl %s. Must start with 'https://github.com/'" % artifactUrl) - exit(1) -if "/artifacts/" not in artifactUrl: - print("❌ Invalid parameter --artifactUrl %s. Must contain '/artifacts/'" % artifactUrl) - exit(1) -artifactItems = artifactUrl.split("/") -if len(artifactItems) != 10: - print("❌ Invalid parameter --artifactUrl %s. Please check the format." % (artifactUrl)) + +url_regex = r"https://github.com/(.+?)/(.+?)/actions/runs/.+?/artifacts/(.+)" +result = re.search(url_regex, artifactUrl) + +if result is None: + print( + "❌ Invalid parameter --artifactUrl '%s'. Please check the format.\nIt should be something like: %s" % + (artifactUrl, 'https://github.com/element-hq/element-x-android/actions/runs/7299827320/artifacts/1131077517') + ) exit(1) -gitHubRepoOwner = artifactItems[3] -gitHubRepo = artifactItems[4] -artifactId = artifactItems[9] +(gitHubRepoOwner, gitHubRepo, artifactId) = result.groups() if args.verbose: print("gitHubRepoOwner: %s, gitHubRepo: %s, artifactId: %s" % (gitHubRepoOwner, gitHubRepo, artifactId)) From ada357b3447d5b23d075a99c9e90a0666b3ebdb6 Mon Sep 17 00:00:00 2001 From: bmarty Date: Mon, 25 Dec 2023 00:09:58 +0000 Subject: [PATCH 007/161] Sync Strings from Localazy --- .../src/main/res/values-es/translations.xml | 7 + .../main/res/values-zh-rTW/translations.xml | 4 +- .../src/main/res/values-es/translations.xml | 10 ++ .../main/res/values-zh-rTW/translations.xml | 2 +- .../src/main/res/values-es/translations.xml | 6 + .../src/main/res/values-de/translations.xml | 2 +- .../src/main/res/values-es/translations.xml | 11 +- .../src/main/res/values-in/translations.xml | 2 +- .../src/main/res/values-sk/translations.xml | 2 +- .../impl/src/main/res/values/localazy.xml | 2 +- .../src/main/res/values-es/translations.xml | 13 ++ .../src/main/res/values-de/translations.xml | 4 +- .../src/main/res/values-es/translations.xml | 9 ++ .../main/res/values-zh-rTW/translations.xml | 1 + .../src/main/res/values-es/translations.xml | 33 +++++ .../main/res/values-zh-rTW/translations.xml | 3 + .../src/main/res/values-es/translations.xml | 28 ++++ .../main/res/values-zh-rTW/translations.xml | 2 + .../src/main/res/values-es/translations.xml | 13 ++ .../main/res/values-zh-rTW/translations.xml | 3 + .../src/main/res/values-es/translations.xml | 39 +++++ .../main/res/values-zh-rTW/translations.xml | 2 + .../src/main/res/values-es/translations.xml | 6 +- .../src/main/res/values-es/translations.xml | 19 +++ .../src/main/res/values-in/translations.xml | 5 + .../main/res/values-zh-rTW/translations.xml | 3 + .../src/main/res/values-de/translations.xml | 5 +- .../src/main/res/values-es/translations.xml | 43 ++++++ .../main/res/values-zh-rTW/translations.xml | 1 + .../src/main/res/values-es/translations.xml | 11 +- .../src/main/res/values-es/translations.xml | 37 ++++- .../src/main/res/values-in/translations.xml | 1 + .../src/main/res/values-es/translations.xml | 6 +- .../src/main/res/values-de/translations.xml | 1 + .../src/main/res/values-es/translations.xml | 44 ++++++ .../main/res/values-zh-rTW/translations.xml | 9 ++ .../src/main/res/values-es/translations.xml | 8 + .../src/main/res/values-es/translations.xml | 3 + .../src/main/res/values-in/translations.xml | 2 + .../main/res/values-zh-rTW/translations.xml | 1 + .../main/res/values-zh-rTW/translations.xml | 1 + .../src/main/res/values-es/translations.xml | 7 + .../src/main/res/values-de/translations.xml | 2 +- .../src/main/res/values-es/translations.xml | 48 ++++++ .../main/res/values-zh-rTW/translations.xml | 2 + .../src/main/res/values-es/translations.xml | 8 + .../src/main/res/values-de/translations.xml | 14 +- .../src/main/res/values-es/translations.xml | 138 +++++++++++++++++- .../src/main/res/values-in/translations.xml | 4 +- .../src/main/res/values-sk/translations.xml | 4 +- .../main/res/values-zh-rTW/translations.xml | 46 +++++- .../src/main/res/values/localazy.xml | 4 +- 52 files changed, 643 insertions(+), 38 deletions(-) create mode 100644 features/analytics/api/src/main/res/values-es/translations.xml create mode 100644 features/analytics/impl/src/main/res/values-es/translations.xml create mode 100644 features/call/src/main/res/values-es/translations.xml create mode 100644 features/ftue/impl/src/main/res/values-es/translations.xml create mode 100644 features/invitelist/impl/src/main/res/values-es/translations.xml create mode 100644 features/poll/impl/src/main/res/values-es/translations.xml create mode 100644 features/preferences/impl/src/main/res/values-es/translations.xml create mode 100644 features/securebackup/impl/src/main/res/values-es/translations.xml create mode 100644 features/securebackup/impl/src/main/res/values-zh-rTW/translations.xml create mode 100644 features/signedout/impl/src/main/res/values-es/translations.xml create mode 100644 libraries/permissions/api/src/main/res/values-es/translations.xml diff --git a/features/analytics/api/src/main/res/values-es/translations.xml b/features/analytics/api/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..f7739f0f2d --- /dev/null +++ b/features/analytics/api/src/main/res/values-es/translations.xml @@ -0,0 +1,7 @@ + + + "Compartir datos analíticos" + "Compartir datos de uso anónimos para ayudarnos a identificar problemas." + "Puedes leer todos nuestros términos %1$s." + "aquí" + diff --git a/features/analytics/api/src/main/res/values-zh-rTW/translations.xml b/features/analytics/api/src/main/res/values-zh-rTW/translations.xml index db8f91ceea..d4f1072c47 100644 --- a/features/analytics/api/src/main/res/values-zh-rTW/translations.xml +++ b/features/analytics/api/src/main/res/values-zh-rTW/translations.xml @@ -1,7 +1,7 @@ - "分享分析數據" - "分享匿名的使用數據以協助我們釐清問題。" + "提供分析數據" + "提供匿名的使用數據以協助我們釐清問題。" "您可以到%1$s閱讀我們的條款。" "這裡" diff --git a/features/analytics/impl/src/main/res/values-es/translations.xml b/features/analytics/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..93cf2e1029 --- /dev/null +++ b/features/analytics/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,10 @@ + + + "No registraremos o perfilaremos ningún dato personal" + "Compartir datos de uso anónimos para ayudarnos a identificar problemas." + "Puedes leer todos nuestros términos %1$s." + "aquí" + "Puedes desactivarlo en cualquier momento" + "No compartiremos tus datos con terceros" + "Ayuda a mejorar %1$s" + diff --git a/features/analytics/impl/src/main/res/values-zh-rTW/translations.xml b/features/analytics/impl/src/main/res/values-zh-rTW/translations.xml index 433c5b051e..ef7a3c7cbe 100644 --- a/features/analytics/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/analytics/impl/src/main/res/values-zh-rTW/translations.xml @@ -1,7 +1,7 @@ "我們不會紀錄或剖繪您的個人資料" - "分享匿名的使用數據以協助我們釐清問題。" + "提供匿名的使用數據以協助我們釐清問題。" "您可以到%1$s閱讀我們的條款。" "這裡" "您可以在任何時候關閉它" diff --git a/features/call/src/main/res/values-es/translations.xml b/features/call/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..2e93185926 --- /dev/null +++ b/features/call/src/main/res/values-es/translations.xml @@ -0,0 +1,6 @@ + + + "Llamada en curso" + "Pulsa para regresar a la llamada" + "☎️ Llamada en curso" + diff --git a/features/createroom/impl/src/main/res/values-de/translations.xml b/features/createroom/impl/src/main/res/values-de/translations.xml index 1a027c9d2d..59ebe82ff1 100644 --- a/features/createroom/impl/src/main/res/values-de/translations.xml +++ b/features/createroom/impl/src/main/res/values-de/translations.xml @@ -1,7 +1,7 @@ "Neuer Raum" - "Freunde zu Element einladen" + "Zu Element einladen" "Personen einladen" "Beim Erstellen des Raums ist ein Fehler aufgetreten" "Die Nachrichten in diesem Raum sind verschlüsselt. Die Verschlüsselung kann nicht nachträglich deaktiviert werden." diff --git a/features/createroom/impl/src/main/res/values-es/translations.xml b/features/createroom/impl/src/main/res/values-es/translations.xml index 9a5d672fd4..1c4c687d31 100644 --- a/features/createroom/impl/src/main/res/values-es/translations.xml +++ b/features/createroom/impl/src/main/res/values-es/translations.xml @@ -1,8 +1,15 @@ "Nueva sala" - "Invitar gente" - "Añadir personas" + "Invita a alguien a Element" + "Invitar personas" + "Se ha producido un error al crear la sala" + "Los mensajes de esta sala están cifrados. La encriptación no se puede desactivar después." + "Sala privada (sólo con invitación)" + "Los mensajes no están cifrados y cualquiera puede leerlos. Puedes activar la encriptación más adelante." + "Sala pública (cualquiera)" + "Nombre de la sala" + "Tema (opcional)" "Se ha producido un error al intentar iniciar un chat" "Crear una sala" diff --git a/features/createroom/impl/src/main/res/values-in/translations.xml b/features/createroom/impl/src/main/res/values-in/translations.xml index aff7eab8b7..775eef7fda 100644 --- a/features/createroom/impl/src/main/res/values-in/translations.xml +++ b/features/createroom/impl/src/main/res/values-in/translations.xml @@ -1,7 +1,7 @@ "Ruangan baru" - "Undang teman ke Element" + "Undang orang-orang ke Element" "Undang seseorang" "Terjadi kesalahan saat membuat ruangan" "Pesan di ruangan ini dienkripsi. Enkripsi tidak dapat dinonaktifkan setelahnya." diff --git a/features/createroom/impl/src/main/res/values-sk/translations.xml b/features/createroom/impl/src/main/res/values-sk/translations.xml index 831ac67369..15fa779609 100644 --- a/features/createroom/impl/src/main/res/values-sk/translations.xml +++ b/features/createroom/impl/src/main/res/values-sk/translations.xml @@ -1,7 +1,7 @@ "Nová miestnosť" - "Pozvať priateľov na Element" + "Pozvať ľudí na Element" "Pozvať ľudí" "Pri vytváraní miestnosti došlo k chybe" "Správy v tejto miestnosti sú šifrované. Šifrovanie už potom nie je možné vypnúť." diff --git a/features/createroom/impl/src/main/res/values/localazy.xml b/features/createroom/impl/src/main/res/values/localazy.xml index 68f318d385..eadcf49f34 100644 --- a/features/createroom/impl/src/main/res/values/localazy.xml +++ b/features/createroom/impl/src/main/res/values/localazy.xml @@ -1,7 +1,7 @@ "New room" - "Invite friends to Element" + "Invite people to Element" "Invite people" "An error occurred when creating the room" "Messages in this room are encrypted. Encryption can’t be disabled afterwards." diff --git a/features/ftue/impl/src/main/res/values-es/translations.xml b/features/ftue/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..b5bac7f6a1 --- /dev/null +++ b/features/ftue/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,13 @@ + + + "Este proceso solo se hace una vez, gracias por esperar." + "Configura tu cuenta" + "Puedes cambiar la configuración más tarde." + "Activa las notificaciones y nunca te pierdas un mensaje" + "Las llamadas, las encuestas, la búsqueda y más se agregarán más adelante este año." + "El historial de mensajes de las salas cifradas aún no está disponible." + "Nos encantaría saber de ti, haznos saber lo que piensas a través de la página de configuración." + "¡Vamos!" + "Esto es lo que necesitas saber:" + "¡Bienvenido a %1$s!" + diff --git a/features/invitelist/impl/src/main/res/values-de/translations.xml b/features/invitelist/impl/src/main/res/values-de/translations.xml index 97f4aa91f7..bb38811a7a 100644 --- a/features/invitelist/impl/src/main/res/values-de/translations.xml +++ b/features/invitelist/impl/src/main/res/values-de/translations.xml @@ -2,8 +2,8 @@ "Möchtest du die Einladung zum Betreten von %1$s wirklich ablehnen?" "Einladung ablehnen" - "Bist du sicher, dass du diesen privaten Chat mit %1$s ablehnen möchtest?" - "Chat ablehnen" + "Bist du sicher, dass du diese Direktnachricht von %1$s ablehnen möchtest?" + "Einladung ablehnen" "Keine Einladungen" "%1$s (%2$s) hat dich eingeladen" diff --git a/features/invitelist/impl/src/main/res/values-es/translations.xml b/features/invitelist/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..890df29447 --- /dev/null +++ b/features/invitelist/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,9 @@ + + + "¿Estás seguro de que quieres rechazar la invitación a unirte a %1$s?" + "Rechazar la invitación" + "¿Estás seguro de que quieres rechazar este chat privado con%1$s?" + "Rechazar el chat" + "Sin invitaciones" + "%1$s (%2$s) te invitó" + diff --git a/features/invitelist/impl/src/main/res/values-zh-rTW/translations.xml b/features/invitelist/impl/src/main/res/values-zh-rTW/translations.xml index eb6d87524c..79557c1e8c 100644 --- a/features/invitelist/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/invitelist/impl/src/main/res/values-zh-rTW/translations.xml @@ -1,4 +1,5 @@ + "沒有邀請" "%1$s(%2$s)邀請您" diff --git a/features/lockscreen/impl/src/main/res/values-es/translations.xml b/features/lockscreen/impl/src/main/res/values-es/translations.xml index 5f7393df00..8e2a9ab7a2 100644 --- a/features/lockscreen/impl/src/main/res/values-es/translations.xml +++ b/features/lockscreen/impl/src/main/res/values-es/translations.xml @@ -1,4 +1,37 @@ + + "Tienes %1$d intento de desbloqueo" + "Tienes %1$d intentos de desbloqueo" + + + "PIN incorrecto. Tienes %1$d oportunidad más" + "PIN incorrecto. Tienes %1$d oportunidades más" + + "autenticación biométrica" + "desbloqueo biométrico" + "Desbloquear con biométrico" + "¿Olvidaste el PIN?" + "Cambiar código PIN" + "Permitir desbloqueo biométrico" + "Eliminar PIN" + "¿Estás seguro de que quieres eliminar el PIN?" + "¿Eliminar el PIN?" + "Permitir %1$s" + "Prefiero usar el PIN" + "Ahorra algo de tiempo y usa %1$s para desbloquear la aplicación cada vez" + "Elegir PIN" + "Confirmar PIN" + "No puedes usar este código PIN por motivos de seguridad" + "Elige un PIN diferente" + "Añade un bloqueo a %1$s para añadir seguridad adicional a tus chats. + +Elige algo que puedas recordar. Si olvidas este PIN, se cerrará la sesión de la aplicación." + "Por favor ingresa el mismo PIN dos veces" + "Los PINs no coinciden" + "Tendrás que volver a iniciar sesión y crear un nuevo PIN para continuar" + "Se está cerrando tu sesión" + "Usar desbloqueo biométrico" + "Usar PIN" "Cerrando sesión…" diff --git a/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml b/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml index d01b56268e..5e079f1ae8 100644 --- a/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/lockscreen/impl/src/main/res/values-zh-rTW/translations.xml @@ -5,6 +5,7 @@ "生物辨識認證" "生物辨識解鎖" + "使用生物辨識解鎖" "忘記 PIN 碼?" "變更 PIN 碼" "允許生物辨識解鎖" @@ -19,5 +20,7 @@ "請輸入相同的 PIN 碼兩次" "PIN 碼不一樣" "您即將登出" + "使用生物辨識" + "使用 PIN 碼" "正在登出…" diff --git a/features/login/impl/src/main/res/values-es/translations.xml b/features/login/impl/src/main/res/values-es/translations.xml index 6f023f6373..a9020cbd22 100644 --- a/features/login/impl/src/main/res/values-es/translations.xml +++ b/features/login/impl/src/main/res/values-es/translations.xml @@ -1,14 +1,42 @@ + "Cambiar el proveedor de la cuenta" + "Dirección del servidor principal" + "Introduzca un término de búsqueda o una dirección de dominio." + "Busca una empresa, comunidad o servidor privado." + "Encontrar un proveedor de cuenta" + "Aquí es donde se alojarán tus conversaciones — justo como si utilizaras un proveedor de correo electrónico para guardar tus correos electrónicos." + "Estás a punto de iniciar sesión en %s" + "Aquí es donde se alojarán tus conversaciones — justo como si utilizaras un proveedor de correo electrónico para guardar tus correos electrónicos." + "Estás a punto de crear una cuenta en %s" + "Matrix.org es un servidor grande y gratuito en la red pública Matrix para una comunicación segura y descentralizada, administrado por la Fundación Matrix.org." + "Otro" + "Usa un proveedor de cuenta diferente, como tu propio servidor privado o una cuenta de trabajo." + "Cambiar el proveedor de la cuenta" "No hemos podido acceder a este servidor. Comprueba que has introducido correctamente la dirección del servidor. Si la dirección es correcta, ponte en contacto con el administrador del servidor para obtener más ayuda." "Este servidor no soporta sliding sync." "Dirección del homeserver" "Solo puedes conectarte a un servidor que soporte sliding sync. El administrador de tu servidor tendrá que configurarlo. %1$s" "¿Cuál es la dirección de tu servidor?" + "Selecciona tu servidor" "Esta cuenta ha sido desactivada." "Usuario y/o contraseña incorrectos" "Este no es un id de usuario válido. Formato esperado: \'@user:homeserver.org\'" "El servidor seleccionado no admite contraseñas ni inicio de sesión OIDC. Póngase en contacto con su administrador o elija otro homeserver." "Introduce tus datos" "¡Hola de nuevo!" + "Iniciar sesión en %1$s" + "Cambiar el proveedor de la cuenta" + "Un servidor privado para los empleados de Element." + "Matrix es una red abierta para una comunicación segura y descentralizada." + "Aquí es donde se alojarán tus conversaciones — justo como utilizarías un proveedor de correo electrónico para guardar tus correos electrónicos." + "Estás a punto de iniciar sesión en %1$s" + "Estás a punto de crear una cuenta en %1$s" + "Hay una gran demanda para %1$s en %2$s en este momento. Vuelve a la aplicación en unos días e inténtalo de nuevo. + +¡Gracias por tu paciencia!" + "Ya casi has terminado." + "Estás dentro." + "Matrix es una red abierta para una comunicación segura y descentralizada." + "¡Bienvenido a %1$s!" diff --git a/features/login/impl/src/main/res/values-zh-rTW/translations.xml b/features/login/impl/src/main/res/values-zh-rTW/translations.xml index 1c3e524b2b..7fd944aac2 100644 --- a/features/login/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/login/impl/src/main/res/values-zh-rTW/translations.xml @@ -15,6 +15,8 @@ "更改帳號提供者" "此伺服器目前不支援滑動同步(sliding sync)。" "家伺服器 URL" + "您的伺服器地址?" + "選擇您的伺服器" "這個帳號已被停用。" "不正確的使用者名稱或密碼" "輸入您的詳細資料" diff --git a/features/logout/impl/src/main/res/values-es/translations.xml b/features/logout/impl/src/main/res/values-es/translations.xml index 84f08fac3c..52e1fbddb7 100644 --- a/features/logout/impl/src/main/res/values-es/translations.xml +++ b/features/logout/impl/src/main/res/values-es/translations.xml @@ -2,4 +2,17 @@ "¿Estás seguro de que quieres cerrar sesión?" "Cerrando sesión…" + "Estás a punto de cerrar tu última sesión. Si cierras sesión ahora, perderás el acceso a tus mensajes cifrados." + "Has desactivado la copia de seguridad" + "Se estaba haciendo una copia de seguridad de tus claves cuando te desconectaste. Vuelve a conectarte para que se haga una copia de seguridad de tus claves antes de desconectarte." + "Se está guardando una copia de seguridad de tus claves" + "Espera a que se complete antes de cerrar sesión." + "Se sigue guardando una copia de seguridad de tus claves" + "Estás a punto de cerrar tu última sesión. Si cierras sesión ahora, perderás el acceso a tus mensajes cifrados." + "La recuperación no está configurada" + "Estás a punto de cerrar tu última sesión. Si cierras la sesión ahora, podrías perder el acceso a tus mensajes cifrados." + "¿Has guardado tu clave de recuperación?" + "Cerrar sesión" + "Cerrar sesión" + "Cerrar sesión" diff --git a/features/logout/impl/src/main/res/values-zh-rTW/translations.xml b/features/logout/impl/src/main/res/values-zh-rTW/translations.xml index a4ca1b030d..646bf1e1ba 100644 --- a/features/logout/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/logout/impl/src/main/res/values-zh-rTW/translations.xml @@ -2,4 +2,7 @@ "您確定要登出嗎?" "正在登出…" + "登出" + "登出" + "登出" diff --git a/features/messages/impl/src/main/res/values-es/translations.xml b/features/messages/impl/src/main/res/values-es/translations.xml index 493fdb7ad7..02710138f4 100644 --- a/features/messages/impl/src/main/res/values-es/translations.xml +++ b/features/messages/impl/src/main/res/values-es/translations.xml @@ -17,6 +17,45 @@ "Este es el principio de %1$s." "Este es el principio de esta conversación." "Nuevos" + "Notificar a toda la sala" "Marque si quieres ocultar todos los mensajes actuales y futuros de este usuario" + "Cámara" + "Hacer foto" + "Grabar video" + "Archivo adjunto" + "Biblioteca de fotos y vídeos" + "Ubicación" + "Encuesta" + "Formato de Texto" + "El historial de mensajes no está disponible en este momento." + "El historial de mensajes no está disponible en esta sala. Verifica este dispositivo para ver tu historial de mensajes." + "No se pudieron recuperar los detalles del usuario" + "¿Quieres volver a invitarlos?" + "Estás solo en este chat" + "Mensaje copiado" + "No tienes permiso para publicar en esta sala" + "Permitir configuración personalizada" + "Si activas esta opción, anularás tu configuración por defecto" + "Notificarme en este chat para" + "Puedes cambiarlo en tus %1$s." + "ajustes globales" + "Ajustes predeterminados" + "Eliminar configuración personalizada" + "Se ha producido un error al cargar la configuración de las notificaciones." + "No se pudo restaurar el modo predeterminado, por favor vuelve a intentarlo de nuevo." + "No se pudo cambiar el modo, por favor inténtalo de nuevo." + "Tu servidor principal no admite esta opción en salas cifradas, no recibirás notificaciones en esta sala." + "Todos los mensajes" + "En esta sala, notificarme por" + "Mostrar menos" + "Mostrar más" + "Enviar de nuevo" + "No se pudo enviar tu mensaje" + "Añadir emoji" + "Mostrar menos" + "Mantén pulsado para grabar" + "Todos" "Bloquear usuario" + "Error al procesar el contenido multimedia, por favor inténtalo de nuevo." + "Únicamente Menciones y Palabras clave" diff --git a/features/messages/impl/src/main/res/values-zh-rTW/translations.xml b/features/messages/impl/src/main/res/values-zh-rTW/translations.xml index 4f22c5bb7a..4f75bf4b0d 100644 --- a/features/messages/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/messages/impl/src/main/res/values-zh-rTW/translations.xml @@ -21,6 +21,7 @@ "位置" "投票" "格式化文字" + "您想要邀請他們回來嗎?" "此聊天室只有您一個人" "訊息已複製" "您沒有權限在此聊天室傳送訊息" @@ -35,6 +36,7 @@ "無法傳送您的訊息" "新增表情符號" "較少" + "所有人" "封鎖使用者" "僅限提及與關鍵字" diff --git a/features/onboarding/impl/src/main/res/values-es/translations.xml b/features/onboarding/impl/src/main/res/values-es/translations.xml index 2489344438..fb348b123d 100644 --- a/features/onboarding/impl/src/main/res/values-es/translations.xml +++ b/features/onboarding/impl/src/main/res/values-es/translations.xml @@ -1,5 +1,9 @@ + "Iniciar sesión manualmente" + "Iniciar sesión con un código QR" + "Crear cuenta" + "Bienvenido al Element más rápido de todos los tiempos. Diseñado para la velocidad y la simplicidad." "Bienvenido a %1$s. Vitaminado, para mayor rapidez y sencillez." - "Siéntente en tu Elemento" + "Siéntete en tu Elemento" diff --git a/features/poll/impl/src/main/res/values-es/translations.xml b/features/poll/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..2789740859 --- /dev/null +++ b/features/poll/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,19 @@ + + + "Añadir opción" + "Mostrar los resultados solo después de que finalice la encuesta" + "Ocultar votos" + "Opción %1$d" + "Los cambios no se han guardado. ¿Estás seguro de que quieres volver?" + "Pregunta o tema" + "¿De qué trata la encuesta?" + "Crear una Encuesta" + "¿Seguro que quieres eliminar esta encuesta?" + "Eliminar encuesta" + "Editar encuesta" + "No se pudo encontrar ninguna encuesta en curso." + "No se pudo encontrar ninguna encuesta anterior." + "En curso" + "Anteriores" + "Encuestas" + diff --git a/features/poll/impl/src/main/res/values-in/translations.xml b/features/poll/impl/src/main/res/values-in/translations.xml index b8982d9c13..f55dccd75d 100644 --- a/features/poll/impl/src/main/res/values-in/translations.xml +++ b/features/poll/impl/src/main/res/values-in/translations.xml @@ -11,4 +11,9 @@ "Apakah Anda yakin ingin menghapus pemungutan suara ini?" "Hapus pemungutan suara" "Sunting pemungutan suara" + "Tidak dapat menemukan pemungutan suara yang sedang berlangsung." + "Tidak dapat menemukan pemungutan suara sebelumnya." + "Sedang berlangsung" + "Masa lalu" + "Pemungutan suara" diff --git a/features/poll/impl/src/main/res/values-zh-rTW/translations.xml b/features/poll/impl/src/main/res/values-zh-rTW/translations.xml index 03bd96aa28..bb9f02353c 100644 --- a/features/poll/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/poll/impl/src/main/res/values-zh-rTW/translations.xml @@ -7,4 +7,7 @@ "問題或主題" "投什麼?" "建立投票" + "您確定要刪除投票嗎?" + "刪除投票" + "編輯投票" diff --git a/features/preferences/impl/src/main/res/values-de/translations.xml b/features/preferences/impl/src/main/res/values-de/translations.xml index cacc15a633..fd5d203471 100644 --- a/features/preferences/impl/src/main/res/values-de/translations.xml +++ b/features/preferences/impl/src/main/res/values-de/translations.xml @@ -17,16 +17,17 @@ "Audio- und Videoanrufe" "Konfiguration stimmt nicht überein" "Wir haben die Einstellungen für Benachrichtigungen vereinfacht, damit die Optionen leichter zu finden sind. Einige benutzerdefinierte Einstellungen, die du in der Vergangenheit gewählt hast, werden hier nicht angezeigt, sind aber immer noch aktiv. Wenn du fortfährst, können sich einige deiner Einstellungen ändern." - "Direkte Chats" + "Direktnachrichten" "Benutzerdefinierte Einstellung pro Chat" "Beim Aktualisieren der Benachrichtigungseinstellungen ist ein Fehler aufgetreten." "Alle Nachrichten" "Nur Erwähnungen und Schlüsselwörter" - "Bei direkten Chats, benachrichtige mich bei" + "Benachrichtige mich bei Direktnachrichten über " "Bei Gruppenchats benachrichtige mich bei" "Benachrichtigungen auf diesem Gerät aktivieren" "Die Konfiguration wurde nicht korrigiert, bitte versuche es erneut." "Gruppenchats" + "Einladungen" "Dein Homeserver unterstützt diese Option in verschlüsselten Räumen nicht. In einigen Räumen wirst du möglicherweise nicht benachrichtigt." "Erwähnungen" "Alle" diff --git a/features/preferences/impl/src/main/res/values-es/translations.xml b/features/preferences/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..0c67143999 --- /dev/null +++ b/features/preferences/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,43 @@ + + + "URL base personalizada de Element Call" + "Define una URL base personalizada para Element Call." + "URL no válida, asegúrate de incluir el protocolo (http/https) y la dirección correcta." + "Modo desarrollador" + "Habilita para tener acceso a características y funcionalidades para desarrolladores." + "Desactiva el editor de texto enriquecido para escribir Markdown manualmente." + "Habilita la opción para ver el contenido en bruto del mensaje en la cronología." + "Nombre público" + "Tu nombre visible" + "Se encontró un error desconocido y no se pudo cambiar la información." + "No se puede actualizar el perfil" + "Editar perfil" + "Actualizando perfil…" + "Ajustes adicionales" + "Llamadas de audio y vídeo" + "La configuración no coincide" + "Hemos simplificado la Configuración de Notificaciones para hacer las opciones más fáciles de encontrar. Algunas configuraciones personalizadas que has elegido en el pasado no se muestran aquí, pero siguen activas. + +Si continúas, es posible que algunos de tus ajustes cambien." + "Chats directos" + "Configuración personalizada por chat" + "Se ha producido un error al actualizar la configuración de notificaciones." + "Todos los mensajes" + "Únicamente Menciones y Palabras clave" + "En los chats directos, notifícame por" + "En los chats grupales, notifícame por" + "Habilitar las notificaciones en este dispositivo" + "La configuración no se ha corregido, por favor inténtalo de nuevo." + "Chats grupales" + "Invitaciones" + "Tu servidor principal no admite esta opción en salas cifradas, puede que no recibas notificaciones en algunas salas." + "Menciones" + "Todos" + "Menciones" + "Notificarme para" + "Notificarme con @room" + "Para recibir notificaciones, cambia tus %1$s." + "ajustes del sistema" + "Notificaciones del sistema desactivadas" + "Notificaciones" + diff --git a/features/preferences/impl/src/main/res/values-zh-rTW/translations.xml b/features/preferences/impl/src/main/res/values-zh-rTW/translations.xml index 1282f45e4a..1110887cce 100644 --- a/features/preferences/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/preferences/impl/src/main/res/values-zh-rTW/translations.xml @@ -13,6 +13,7 @@ "僅限提及與關鍵字" "在這個裝置上開啟通知" "群組聊天" + "邀請" "提及" "提及" "系統設定" diff --git a/features/rageshake/impl/src/main/res/values-es/translations.xml b/features/rageshake/impl/src/main/res/values-es/translations.xml index 4191f67596..3c0d78b659 100644 --- a/features/rageshake/impl/src/main/res/values-es/translations.xml +++ b/features/rageshake/impl/src/main/res/values-es/translations.xml @@ -1,14 +1,15 @@ "Adjuntar captura de pantalla" - "Podéis poneros en contacto conmigo para resolver dudas relacionadas" + "Pueden ponerse en contacto conmigo si tienen alguna pregunta relacionada." + "Contáctame" "Editar captura de pantalla" - "Describe el problema. ¿Qué hiciste? ¿Qué esperabas que ocurriera? ¿Qué ocurrió en realidad? Por favor, detállalo todo lo que puedas." - "Describe el error…" + "Describe el problema. ¿Qué has hecho? ¿Qué esperabas que ocurriera? ¿Qué ocurrió realmente? Por favor, detállalo todo lo que puedas." + "Describe el problema…" "Si es posible, escriba la descripción en inglés." "Enviar registros de fallos" - "Enviar registros para ayudar" + "Permitir registros" "Enviar captura de pantalla" - "Para comprobar que todo funciona correctamente, se enviarán registros de fallos con su mensaje. Serán privados. Para enviar sólo tu mensaje, desactiva esta opción." + "Los registros se incluirán con su mensaje para asegurarse de que todo funciona correctamente. Para enviar tu mensaje sin registros, desactiva esta configuración." "%1$s se cerró inesperadamente la última vez que se lo usaste. ¿Quieres compartir un informe de error con nosotros?" diff --git a/features/roomdetails/impl/src/main/res/values-es/translations.xml b/features/roomdetails/impl/src/main/res/values-es/translations.xml index 60353e3185..f4e598ed71 100644 --- a/features/roomdetails/impl/src/main/res/values-es/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-es/translations.xml @@ -4,18 +4,51 @@ "Una persona" "%1$d personas" + "Se ha producido un error al actualizar la configuración de notificaciones." + "Tu servidor principal no admite esta opción en salas cifradas, puede que no recibas notificaciones en algunas salas." + "Encuestas" + "Añadir tema" + "Ya eres miembro" + "Ya estás invitado" + "Editar sala" + "Se ha producido un error desconocido y no se ha podido cambiar la información." + "No se puede actualizar la sala" "Los mensajes están protegidos con \"candados\". Sólo tú y los destinatarios tenéis las llaves únicas para abrirlos." "Cifrado de mensajes activado" + "Se ha producido un error al cargar la configuración de las notificaciones." + "No se ha podido silenciar esta sala, inténtalo de nuevo." + "Error al dejar de silenciar esta sala, por favor inténtalo de nuevo." "Invitar a otras personas" + "Personalizado" + "Por defecto" + "Notificaciones" + "Nombre de la sala" "Compartir sala" + "Actualizando la sala…" + "Pendiente" + "Miembros de la sala" + "Permitir configuración personalizada" + "Si activas esta opción, anularás tu configuración por defecto" + "Notificarme en este chat para" + "Puedes cambiarlo en tus %1$s." + "ajustes globales" + "Ajustes predeterminados" + "Eliminar configuración personalizada" + "Se ha producido un error al cargar la configuración de las notificaciones." + "No se pudo restaurar el modo predeterminado, por favor vuelve a intentarlo de nuevo." + "No se pudo cambiar el modo, por favor inténtalo de nuevo." + "Tu servidor principal no admite esta opción en salas cifradas, no recibirás notificaciones en esta sala." + "Todos los mensajes" + "En esta sala, notificarme por" "Se ha producido un error al intentar iniciar un chat" "Bloquear" - "Los usuarios bloqueados no podrán enviarte mensajes y se ocultarán todos sus mensajes. Puede revertir esta acción en cualquier momento." + "Los usuarios bloqueados no podrán enviarte mensajes y todos sus mensajes se ocultarán. Puedes desbloquearlos cuando quieras." "Bloquear usuario" "Desbloquear" - "Al desbloquear al usuario, podrás volver a ver todos sus mensajes." + "Podrás ver todos sus mensajes de nuevo." "Desbloquear usuario" "Salir de la sala" "Seguridad" "Tema" + "Únicamente Menciones y Palabras clave" diff --git a/features/roomdetails/impl/src/main/res/values-in/translations.xml b/features/roomdetails/impl/src/main/res/values-in/translations.xml index d941939c41..d44f24342b 100644 --- a/features/roomdetails/impl/src/main/res/values-in/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-in/translations.xml @@ -5,6 +5,7 @@ "Terjadi kesalahan saat memperbarui pengaturan pemberitahuan." "Homeserver Anda tidak mendukung opsi ini dalam ruangan terenkripsi, Anda mungkin tidak diberi tahu dalam beberapa ruangan." + "Pemungutan suara" "Tambahkan topik" "Sudah menjadi anggota" "Sudah diundang" diff --git a/features/roomlist/impl/src/main/res/values-es/translations.xml b/features/roomlist/impl/src/main/res/values-es/translations.xml index 899b1e2cac..c3f8b23398 100644 --- a/features/roomlist/impl/src/main/res/values-es/translations.xml +++ b/features/roomlist/impl/src/main/res/values-es/translations.xml @@ -1,7 +1,11 @@ + "La copia de seguridad del chat no está sincronizada en este momento. Debes confirmar tu clave de recuperación para mantener el acceso a la copia de seguridad del chat." + "Confirma tu clave de recuperación" "Crear una nueva conversación o sala" + "Empieza enviando un mensaje a alguien." + "Aún no hay chats." "Todos los chats" "Parece que estás usando un nuevo dispositivo. Verifica que eres tú para acceder a tus mensajes cifrados." - "Accede a tu historial de mensajes" + "Verifica que eres tú" diff --git a/features/securebackup/impl/src/main/res/values-de/translations.xml b/features/securebackup/impl/src/main/res/values-de/translations.xml index 77ec0fa82a..5ec8f99e8c 100644 --- a/features/securebackup/impl/src/main/res/values-de/translations.xml +++ b/features/securebackup/impl/src/main/res/values-de/translations.xml @@ -17,6 +17,7 @@ "Du verlierst den Zugriff auf deine verschlüsselten Nachrichten, wenn du dich überall von %1$s abmeldest" "Bist du sicher, dass du das Backup ausschalten willst?" "Besorge dir einen neuen Wiederherstellungsschlüssel, wenn du deinen alten verloren hast. Nachdem du deinen Wiederherstellungsschlüssel geändert hast, funktioniert dein alter Schlüssel nicht mehr." + "Erstelle einen neuen Wiederherstellungsschlüssel" "Stelle sicher, dass du deinen Wiederherstellungsschlüssel an einem sicheren Ort aufbewahren kannst" "Wiederherstellungsschlüssel geändert" "Wiederherstellungsschlüssel ändern?" diff --git a/features/securebackup/impl/src/main/res/values-es/translations.xml b/features/securebackup/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..9dfc061a43 --- /dev/null +++ b/features/securebackup/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,44 @@ + + + "Desactivar copia de seguridad" + "Activar copia de seguridad" + "La copia de seguridad garantiza que no pierdas tu historial de mensajes. %1$s." + "Copia de seguridad" + "Cambiar la clave de recuperación" + "Confirmar clave de recuperación" + "La copia de seguridad de tus chats no está sincronizada ahora mismo." + "Configurar la clave de recuperación" + "Accede a tus mensajes cifrados si pierdes todos tus dispositivos o cierras sesión de %1$s en cualquier lugar." + "Desactivar" + "Perderás tus mensajes cifrados si cierras sesión en todos los dispositivos." + "¿Estás seguro de que quieres desactivar la copia de seguridad?" + "Desactivar la copia de seguridad eliminará la copia de seguridad de tu clave de encriptación actual y desactivará otras funciones de seguridad. En este caso:" + "No tendrás un historial de mensajes cifrados en nuevos dispositivos" + "Perderás el acceso a tus mensajes cifrados si cierras sesión %1$s en todas partes" + "¿Estás seguro de que quieres desactivar la copia de seguridad?" + "Obtén una nueva clave de recuperación si has perdido la que tenías. Después de cambiar la clave de recuperación, la anterior dejará de funcionar." + "Generar una nueva clave de recuperación" + "Asegúrate de poder guardar su clave de recuperación en un lugar seguro" + "Clave de recuperación cambiada" + "¿Cambiar la clave de recuperación?" + "Introduce tu clave de recuperación para confirmar el acceso a la copia de seguridad de tú chat." + "Por favor, inténtalo de nuevo para confirmar el acceso a tu copia de seguridad del chat." + "Clave de recuperación incorrecta" + "Introduce el código de 48 caracteres." + "Ingresar…" + "Clave de recuperación confirmada" + "Confirma tu clave de recuperación" + "Clave de recuperación copiada" + "Generando…" + "Guardar clave de recuperación" + "Anota tu clave de recuperación en un lugar seguro o guárdala en un administrador de contraseñas." + "Pulsa para copiar la clave de recuperación" + "Guardar tu clave de recuperación" + "No podrás acceder a tu nueva clave de recuperación después de este paso." + "¿Has guardado tu clave de recuperación?" + "La copia de seguridad del chat está protegida por una clave de recuperación. Si necesitas una nueva clave de recuperación después de la configuración, puedes volver a crearla seleccionando «Cambiar clave de recuperación»." + "Generar tu clave de recuperación" + "Asegúrate de que puedes guardar tu clave de recuperación en algún lugar seguro" + "Configuración de recuperación terminada" + "Configurar la recuperación" + diff --git a/features/securebackup/impl/src/main/res/values-zh-rTW/translations.xml b/features/securebackup/impl/src/main/res/values-zh-rTW/translations.xml new file mode 100644 index 0000000000..27b8f2e0a1 --- /dev/null +++ b/features/securebackup/impl/src/main/res/values-zh-rTW/translations.xml @@ -0,0 +1,9 @@ + + + "關閉備份功能" + "開啟備份功能" + "備份可確保您不會遺失歷史訊息。%1$s。" + "備份" + "關閉" + "點擊以複製復原金鑰" + diff --git a/features/signedout/impl/src/main/res/values-es/translations.xml b/features/signedout/impl/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..b4ec370c95 --- /dev/null +++ b/features/signedout/impl/src/main/res/values-es/translations.xml @@ -0,0 +1,8 @@ + + + "Has cambiado tu contraseña en otra sesión" + "Has eliminado la sesión desde otra sesión" + "El administrador de tu servidor ha invalidado su acceso" + "Es posible que haya cerrado sesión por uno de los motivos que se enumeran a continuación. Por favor inicia sesión nuevamente para continuar usando %s ." + "Has cerrado sesión" + diff --git a/features/verifysession/impl/src/main/res/values-es/translations.xml b/features/verifysession/impl/src/main/res/values-es/translations.xml index e80fcc8682..812ba53a32 100644 --- a/features/verifysession/impl/src/main/res/values-es/translations.xml +++ b/features/verifysession/impl/src/main/res/values-es/translations.xml @@ -3,12 +3,15 @@ "Algo no fue bien. Se agotó el tiempo de espera de la solicitud o se rechazó." "Confirma que los emojis que aparecen a continuación coinciden con los que aparecen en tu otra sesión." "Comparar emojis" + "Confirma que los números que aparecen a continuación coinciden con los mostrados en tu otra sesión." + "Comparar números" "Tu nueva sesión ya está verificada. Tienes acceso a tus mensajes cifrados y otros usuarios lo considerarán de confianza." "Demuestra que eres tú para acceder a tu historial de mensajes cifrados." "Abrir una sesión existente" "Reintentar la verificación" "Estoy listo" "Esperando a que coincida" + "Compara un conjunto único de emojis." "Compara los emoji, asegurándote de que aparecen en el mismo orden." "No coinciden" "Coinciden" diff --git a/features/verifysession/impl/src/main/res/values-in/translations.xml b/features/verifysession/impl/src/main/res/values-in/translations.xml index 0c0a7dad4d..25bcdb2508 100644 --- a/features/verifysession/impl/src/main/res/values-in/translations.xml +++ b/features/verifysession/impl/src/main/res/values-in/translations.xml @@ -3,6 +3,8 @@ "Sepertinya ada yang tidak beres. Entah permintaan sudah habis masa berlakunya atau permintaan ditolak." "Konfirmasikan bahwa emoji di bawah ini sesuai dengan yang ditampilkan pada sesi Anda yang lain." "Bandingkan emoji" + "Konfirmasikan bahwa angka-angka di bawah ini sesuai dengan yang ditampilkan pada sesi Anda yang lain." + "Bandingkan angka" "Sesi baru Anda sekarang diverifikasi. Ini memiliki akses ke pesan terenkripsi Anda, dan pengguna lain akan melihatnya sebagai tepercaya." "Buktikan bahwa ini memang Anda untuk mengakses riwayat pesan terenkripsi Anda." "Buka sesi yang sudah ada" diff --git a/features/verifysession/impl/src/main/res/values-zh-rTW/translations.xml b/features/verifysession/impl/src/main/res/values-zh-rTW/translations.xml index 39a74d1bb6..ed85823769 100644 --- a/features/verifysession/impl/src/main/res/values-zh-rTW/translations.xml +++ b/features/verifysession/impl/src/main/res/values-zh-rTW/translations.xml @@ -9,6 +9,7 @@ "重新嘗試驗證" "我準備好了" "等待比對" + "比對一組唯一的表情符號。" "表情符號是唯一的,請相互比對,確認它們的排列順序是否相同。" "不一樣" "一樣" diff --git a/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml b/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml index 0cee629b87..376d6dcc3e 100644 --- a/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-zh-rTW/translations.xml @@ -31,6 +31,7 @@ "%1$s 邀請 %2$s 加入聊天室" "您邀請 %1$s 加入聊天室" "%1$s 撤銷了 %2$s 加入房間的邀請" + "您撤銷了 %1$s 加入房間的邀請" "%1$s 將主題變更為 %2$s" "您將主題變更為 %1$s" "聊天室主題已被 %1$s 移除" diff --git a/libraries/permissions/api/src/main/res/values-es/translations.xml b/libraries/permissions/api/src/main/res/values-es/translations.xml new file mode 100644 index 0000000000..d530767ae0 --- /dev/null +++ b/libraries/permissions/api/src/main/res/values-es/translations.xml @@ -0,0 +1,7 @@ + + + "Para permitir que la aplicación utilice la cámara, por favor concede el permiso en los ajustes del sistema." + "Por favor concede el permiso en los ajustes del sistema." + "Para permitir que la aplicación utilice el micrófono, por favor conceda el permiso en los ajustes del sistema." + "Para permitir que la aplicación muestre notificaciones, por favor concede el permiso en los ajustes del sistema." + diff --git a/libraries/push/impl/src/main/res/values-de/translations.xml b/libraries/push/impl/src/main/res/values-de/translations.xml index a600cb83f7..b807d7548e 100644 --- a/libraries/push/impl/src/main/res/values-de/translations.xml +++ b/libraries/push/impl/src/main/res/values-de/translations.xml @@ -48,6 +48,6 @@ "Hintergrundsynchronisation" "Google-Dienste" "Keine gültigen Google Play-Dienste gefunden. Benachrichtigungen funktionieren möglicherweise nicht richtig." - "Benachrichtigung" + "Mitteilung" "Schnelle Antwort" diff --git a/libraries/push/impl/src/main/res/values-es/translations.xml b/libraries/push/impl/src/main/res/values-es/translations.xml index 138a2ce8e1..6f5baf70d7 100644 --- a/libraries/push/impl/src/main/res/values-es/translations.xml +++ b/libraries/push/impl/src/main/res/values-es/translations.xml @@ -1,5 +1,53 @@ + "Llamada" + "Esperando eventos" + "Notificaciones ruidosas" + "Notificaciones silenciosas" + "** No se ha podido enviar - por favor, abre la sala" + "Unirse" + "Rechazar" + "Te invitó a chatear" + "Te mencionó: %1$s" + "Mensajes nuevos" + "Reaccionó con %1$s" + "Marcar como leído" + "Te invitó a unirte a la sala" + "Yo" + "¡Estás viendo la notificación! ¡Haz clic en mí!" + "%1$s: %2$s" + "%1$s: %2$s %3$s" + "%1$s y %2$s" + "%1$s en %2$s" + "%1$s en %2$s y %3$s" + + "%1$s: %2$d mensaje" + "%1$s: %2$d mensajes" + + + "%d notificación" + "%d notificaciones" + + + "%d invitación" + "%d invitaciones" + + + "%d mensaje nuevo" + "%d mensajes nuevos" + + + "%d mensaje notificado no leído" + "%d mensajes notificados no leídos" + + + "%d sala" + "%d salas" + + "Elige cómo recibir las notificaciones" + "Sincronización en segundo plano" + "Servicios de Google" + "No se han encontrado Servicios de Google Play válidos. Es posible que las notificaciones no funcionen correctamente." "Notificación" "Respuesta rápida" diff --git a/libraries/push/impl/src/main/res/values-zh-rTW/translations.xml b/libraries/push/impl/src/main/res/values-zh-rTW/translations.xml index 973981253b..76a2ada95b 100644 --- a/libraries/push/impl/src/main/res/values-zh-rTW/translations.xml +++ b/libraries/push/impl/src/main/res/values-zh-rTW/translations.xml @@ -6,7 +6,9 @@ "加入" "拒絕" "邀請您聊天" + "提及您:%1$s" "新訊息" + "回應 %1$s" "標示為已讀" "邀請您加入聊天室" "我" diff --git a/libraries/textcomposer/impl/src/main/res/values-es/translations.xml b/libraries/textcomposer/impl/src/main/res/values-es/translations.xml index 606e3bde8e..fd38301104 100644 --- a/libraries/textcomposer/impl/src/main/res/values-es/translations.xml +++ b/libraries/textcomposer/impl/src/main/res/values-es/translations.xml @@ -1,8 +1,11 @@ "Lista de puntos" + "Cerrar opciones de formato" "Bloque de código" "Mensaje…" + "Crear un enlace" + "Editar enlace" "Aplicar formato negrita" "Aplicar formato cursiva" "Aplicar formato tachado" @@ -12,6 +15,11 @@ "Código" "Enlazar" "Lista numérica" + "Abrir opciones de formato" "Cita" + "Eliminar enlace" "Quitar sangría" + "Enlace" + "Adjuntar archivo" + "Mantén pulsado para grabar" diff --git a/libraries/ui-strings/src/main/res/values-de/translations.xml b/libraries/ui-strings/src/main/res/values-de/translations.xml index 085bb2c40a..b1fd043b64 100644 --- a/libraries/ui-strings/src/main/res/values-de/translations.xml +++ b/libraries/ui-strings/src/main/res/values-de/translations.xml @@ -24,7 +24,7 @@ "Sprachnachricht aufnehmen." "Aufnahme beenden" "Akzeptieren" - "Zur Zeitleiste hinzufügen" + "Zum Nachrichtenverlauf hinzufügen" "Zurück" "Abbrechen" "Foto auswählen" @@ -50,8 +50,8 @@ "Passwort vergessen?" "Weiter" "Einladen" - "Freunde einladen" - "Freunde einladen %1$s" + "Personen einladen" + "Zu %1$s einladen" "Lade Personen in %1$s ein" "Einladungen" "Beitreten" @@ -62,8 +62,8 @@ "Geräte verwalten" "Weiter" "Nein" - "Nicht jetzt" - "OK" + "Später" + "Ok" "Einstellungen öffnen" "Öffnen mit" "Schnelle Antwort" @@ -93,7 +93,7 @@ "Foto machen" "Für Optionen tippen" "Erneut versuchen" - "Quelle anzeigen" + "Quellcode anzeigen" "Ja" "Mehr laden …" "Über" @@ -110,6 +110,7 @@ "Dunkel" "Dekodierungsfehler" "Entwickleroptionen" + "Direktnachricht" "(bearbeitet)" "Bearbeitung" "* %1$s %2$s" @@ -146,6 +147,7 @@ "Datenschutz­erklärung" "Reaktion" "Reaktionen" + "Wiederherstellungsschlüssel" "Wird erneuert…" "%1$s antworten" "Einen Fehler melden" diff --git a/libraries/ui-strings/src/main/res/values-es/translations.xml b/libraries/ui-strings/src/main/res/values-es/translations.xml index eaab1988d5..9239bcea4b 100644 --- a/libraries/ui-strings/src/main/res/values-es/translations.xml +++ b/libraries/ui-strings/src/main/res/values-es/translations.xml @@ -1,11 +1,33 @@ + "Borrar" "Ocultar contraseña" + "Ir al final" + "Sólo menciones" + "Silenciado" + "Página %1$d" + "Pausar" + "Campo PIN" + "Reproducir" + "Encuesta" + "Encuesta finalizada" + "Reacciona con %1$s" + "Reacciona con otros emojis" + "Leído por %1$s y %2$s" + "Leído por %1$s" + "Pulsa para mostrar todo" + "Elimina la reacción con %1$s" "Enviar archivos" "Mostrar contraseña" + "Iniciar llamada" "Menú de usuario" + "Grabar mensaje de voz" + "Detener grabación" + "Aceptar" + "Añadir a la cronología" "Atrás" "Cancelar" + "Elegir foto" "Borrar" "Cerrar" "Completar verificación" @@ -13,24 +35,43 @@ "Continuar" "Copiar" "Copiar enlace" + "Copiar enlace al mensaje" + "Crear" "Crear una sala" + "Rechazar" + "Eliminar encuesta" "Desactivar" "Hecho" "Editar" + "Editar encuesta" "Activar" + "Finalizar encuesta" + "Introducir PIN" + "¿Olvidaste tu contraseña?" + "Reenviar" "Invitar" - "Invitar amigos a %1$s" + "Invitar personas" + "Invita a alguien a %1$s" + "Invita a alguien a %1$s" + "Invitaciones" + "Unirse" "Más información" "Salir" "Salir de la sala" + "Gestionar cuenta" + "Administrar dispositivos" "Siguiente" "No" "Ahora no" "OK" + "Ajustes" + "Abrir con" "Respuesta rápida" "Citar" + "Reaccionar" "Eliminar" "Responder" + "Responder en el hilo" "Informar de un error" "Reportar Contenido" "Reintentar" @@ -38,73 +79,166 @@ "Guardar" "Buscar" "Enviar" + "Enviar mensaje" "Compartir" "Compartir enlace" + "Inicia sesión de nuevo" + "Cerrar sesión" + "Cerrar sesión de todos modos" "Saltar" "Comenzar" "Iniciar chat" "Iniciar la verificación" + "Pulsa para cargar el mapa" + "Hacer foto" + "Toca para ver opciones" + "Inténtalo de nuevo" "Ver Fuente" "Sí" + "Cargar más" "Acerca de" + "Política de uso aceptable" + "Ajustes avanzados" + "Estadísticas" + "Apariencia" "Sonido" "Burbujas" + "Copia de seguridad del chat" + "Derechos de autor" "Creando sala…" "Saliste de la sala" + "Oscuro" "Error de descifrado" "Opciones de desarrollador" + "Chat directo" "(editado)" "Edición" + "* %1$s %2$s" "Cifrado activado" + "Introduce tu PIN" "Error" + "Todos" "Archivo" + "Archivo guardado en Descargas" + "Reenviar mensaje" "GIF" "Imagen" + "En respuesta a %1$s" + "Instalar APK" + "No se encontró este ID de Matrix, por lo que es posible que no se reciba la invitación." + "Abandonando la sala" + "Claro" "Enlace copiado al portapapeles" "Cargando…" "Mensaje" - "Diseño del mensaje" + "Acciones del mensaje" + "Diseño de los mensajes" "Mensaje eliminado" "Moderno" + "Silenciar" "No hay resultados" "Sin conexión" "Contraseña" "Personas" "Enlace permanente" + "Permiso" + "Total de votos: %1$s" + "Los resultados se mostrarán una vez finalizada la encuesta" + "Política de privacidad" + "Reacción" "Reacciones" + "Clave de recuperación" + "Recargando…" "Respondiendo a %1$s" "Informar de un error" + "Informar de un problema" "Informe enviado" + "Editor de texto enriquecido" + "Sala" + "Nombre de la sala" + "p. ej., el nombre de tu proyecto" + "Bloqueo de pantalla" "Buscar a alguien" + "Buscar resultados" "Seguridad" + "Visto por" "Enviando…" + "Fallo al enviar" + "Enviado" "Servidor no compatible" "Dirección del servidor" "Ajustes" + "Ubicación compartida" + "Cerrando sesión" + "Iniciando chat…" "Sticker" "Terminado" "Sugerencias" + "Sincronizando" + "Sistema" + "Texto" + "Avisos de terceros" + "Hilo" "Tema" + "¿De qué trata esta sala?" "No se puede descifrar" + "Las invitaciones no se pudieron enviar a uno o más usuarios." + "No se pudo enviar la(s) invitación(es)" + "Desbloquear" + "Dejar de silenciar" "Evento no compatible" "Usuario" "Verificación cancelada" "Verificación completada" "Vídeo" + "Mensaje de voz" "Esperando…" + "Esperando este mensaje" + "¿Estás seguro de que quieres finalizar esta encuesta?" + "Encuesta: %1$s" + "Verificar dispositivo" "Confirmar" "Atención" "No se pudo crear el enlace permanente" + "%1$s no pudo cargar el mapa. Por favor vuelve a intentarlo más tarde." "Error al cargar mensajes" + "%1$s no ha podido acceder a tu ubicación. Por favor vuelve a intentarlo más tarde." + "No se pudo cargar tu mensaje de voz." + "%1$s no tiene permiso para acceder a tu ubicación. Puedes habilitar el acceso en Ajustes." + "%1$s no tiene permiso para acceder a tu ubicación. Habilita el acceso a continuación." + "%1$s no tiene permiso para acceder al micrófono. Habilita el acceso para grabar un mensaje de voz." "Algunos mensajes no se han enviado" "Lo siento, se ha producido un error" + "🔐️ Únete a mí en %1$s" "Hola, puedes hablar conmigo en %1$s: %2$s" "%1$s Android" + + "%1$d dígito introducido" + "%1$d dígitos introducidos" + + + "Leído por %1$s y %2$d otro" + "Leído por %1$s y %2$d otros" + "%1$d miembro" "%1$d miembros" + + "%d voto" + "%d votos" + "Agitar con fuerza para informar de un error" + "Error al seleccionar archivos multimedia, por favor inténtalo de nuevo." + "Error al procesar el contenido multimedia, por favor inténtalo de nuevo." + "Error al subir el contenido multimedia, por favor inténtalo de nuevo." + "Compartir ubicación" + "Compartir mi ubicación" + "Abrir en Apple Maps" + "Abrir en Google Maps" + "Abrir en OpenStreetMap" + "Compartir esta ubicación" + "Ubicación" "Versión: %1$s (%2$s)" "es" "Error" diff --git a/libraries/ui-strings/src/main/res/values-in/translations.xml b/libraries/ui-strings/src/main/res/values-in/translations.xml index f7f05f71f2..e19aa1005d 100644 --- a/libraries/ui-strings/src/main/res/values-in/translations.xml +++ b/libraries/ui-strings/src/main/res/values-in/translations.xml @@ -50,8 +50,8 @@ "Lupa kata sandi?" "Teruskan" "Undang" - "Undang teman" - "Undang teman ke %1$s" + "Undang orang-orang" + "Undang orang-orang ke %1$s" "Undang orang-orang ke %1$s" "Undangan" "Gabung" diff --git a/libraries/ui-strings/src/main/res/values-sk/translations.xml b/libraries/ui-strings/src/main/res/values-sk/translations.xml index 9b7db8c032..29ecb56649 100644 --- a/libraries/ui-strings/src/main/res/values-sk/translations.xml +++ b/libraries/ui-strings/src/main/res/values-sk/translations.xml @@ -50,8 +50,8 @@ "Zabudnuté heslo?" "Preposlať" "Pozvať" - "Pozvať priateľov" - "Pozvať priateľov do %1$s" + "Pozvať ľudí" + "Pozvať ľudí do %1$s" "Pozvať ľudí do %1$s" "Pozvánky" "Pripojiť sa" diff --git a/libraries/ui-strings/src/main/res/values-zh-rTW/translations.xml b/libraries/ui-strings/src/main/res/values-zh-rTW/translations.xml index 2b3de76895..76cdca0b2b 100644 --- a/libraries/ui-strings/src/main/res/values-zh-rTW/translations.xml +++ b/libraries/ui-strings/src/main/res/values-zh-rTW/translations.xml @@ -2,15 +2,26 @@ "刪除" "隱藏密碼" + "跳至底部" "僅限提及" "已關閉通知" + "第 %1$d 頁" "暫停" + "PIN 碼欄位" "播放" "投票" "投票已結束" + "使用 %1$s 回應" + "用其他表情符號回應" + "%1$s 和 %2$s 已讀" + "%1$s 已讀" + "點擊以顯示全部" "傳送檔案" "顯示密碼" + "開始通話" "使用者選單" + "錄製語音訊息。" + "停止錄音" "接受" "新增至時間軸" "返回" @@ -26,12 +37,14 @@ "建立" "建立聊天室" "拒絕" + "刪除投票" "停用" "完成" "編輯" "編輯投票" "啟用" "結束投票" + "輸入 PIN 碼" "忘記密碼?" "轉寄" "邀請" @@ -67,29 +80,41 @@ "傳送訊息" "分享" "分享連結" + "再登入一次" + "登出" + "直接登出" "略過" "開始" "開始聊天" "開始驗證" "點擊以載入地圖" "拍照" + "再試一次" "檢視原始碼" "是" + "載入更多" "關於" "可接受使用政策" "進階設定" "分析" + "外觀" "音訊" + "泡泡" + "聊天室備份" "著作權" "正在建立聊天室…" "離開聊天室" + "深色" "解密錯誤" "開發者選項" + "私訊" "(已編輯)" "編輯中" "* %1$s %2$s" "已啟用加密" + "輸入您的 PIN 碼" "錯誤" + "所有人" "檔案" "檔案已儲存至 Downloads" "訊息轉寄" @@ -99,10 +124,11 @@ "安裝 APK" "找不到此 Matrix ID,因此可能沒有人會收到邀請。" "正在離開聊天室" + "淺色" "連結已複製到剪貼簿" "載入中…" "訊息" - "訊息布局" + "訊息佈局" "訊息已移除" "現代" "關閉通知" @@ -117,29 +143,38 @@ "隱私權政策" "回應" "回應" + "復原金鑰" "重新整理中…" "正在回覆%1$s" "回報程式錯誤" + "回報問題" "格式化文字編輯器" + "聊天室" "聊天室名稱" "範例:您的計畫名稱" "螢幕鎖定" "搜尋結果" "安全性" + "已讀" "傳送中…" + "傳送失敗" + "已傳送" "伺服器不支援" "伺服器 URL" "設定" + "正在登出" "貼圖" "成功" "建議" "同步中" + "系統" "文字" "討論串" "主題" "無法解密" "無法發送邀請給一或多個使用者。" "無法發送邀請" + "解鎖" "開啟通知" "不支援的事件" "使用者名稱" @@ -148,19 +183,28 @@ "影片" "語音訊息" "等待中…" + "等待此則訊息" "您確定要結束這項投票嗎?" "投票:%1$s" + "驗證裝置" "確認" "警告" "無法建立永久連結" "%1$s無法載入地圖。請稍後再試。" "無法載入訊息" "%1$s無法取得您的位置。請稍後再試。" + "無法上傳語音訊息。" "%1$s 沒有權限存取您的位置。您可以到設定中開啟權限。" "%1$s 沒有權限存取您的位置。請在下方開啟權限。" "有些訊息尚未傳送" "嘿,來 %1$s 和我聊天:%2$s" "%1$s Android" + + "已輸入 %1$d 個位數" + + + "%1$s 與其他 %2$d 個人已讀" + "%1$d 位成員" diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 10d3bbd12e..ab311752f6 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -50,8 +50,8 @@ "Forgot password?" "Forward" "Invite" - "Invite friends" - "Invite friends to %1$s" + "Invite people" + "Invite people to %1$s" "Invite people to %1$s" "Invites" "Join" From c65f5ed5607ae08bc389595b543a2797f3016621 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 12:10:11 +0100 Subject: [PATCH 008/161] Sign out: direct flow if not last session and if not currently backing up keys #2072 Extract some stuff from existing Logout to avoid duplication. --- .../logout/api/direct/DirectLogoutEvents.kt | 22 ++++ .../api/direct/DirectLogoutPresenter.kt | 21 ++++ .../logout/api/direct/DirectLogoutState.kt | 26 ++++ .../logout/api/direct/DirectLogoutView.kt | 27 +++++ .../features/logout/impl/LogoutView.kt | 56 +++------ .../direct/DefaultDirectLogoutPresenter.kt | 113 ++++++++++++++++++ .../impl/direct/DefaultDirectLogoutView.kt | 62 ++++++++++ .../features/logout/impl/tools/Extensions.kt | 31 +++++ .../logout/impl/ui/LogoutActionDialog.kt | 53 ++++++++ .../impl/ui/LogoutConfirmationDialog.kt | 37 ++++++ .../impl/root/PreferencesRootNode.kt | 19 ++- .../impl/root/PreferencesRootPresenter.kt | 5 + .../impl/root/PreferencesRootState.kt | 2 + .../impl/root/PreferencesRootStateProvider.kt | 10 ++ .../impl/root/PreferencesRootView.kt | 13 +- .../impl/root/PreferencesRootPresenterTest.kt | 32 +++-- 16 files changed, 477 insertions(+), 52 deletions(-) create mode 100644 features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutEvents.kt create mode 100644 features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutPresenter.kt create mode 100644 features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutState.kt create mode 100644 features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt create mode 100644 features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenter.kt create mode 100644 features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutView.kt create mode 100644 features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt create mode 100644 features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutActionDialog.kt create mode 100644 features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutConfirmationDialog.kt diff --git a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutEvents.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutEvents.kt new file mode 100644 index 0000000000..ab5f40c321 --- /dev/null +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutEvents.kt @@ -0,0 +1,22 @@ +/* + * 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.features.logout.api.direct + +sealed interface DirectLogoutEvents { + data class Logout(val ignoreSdkError: Boolean) : DirectLogoutEvents + data object CloseDialogs : DirectLogoutEvents +} diff --git a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutPresenter.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutPresenter.kt new file mode 100644 index 0000000000..bdd501cde6 --- /dev/null +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutPresenter.kt @@ -0,0 +1,21 @@ +/* + * 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.features.logout.api.direct + +import io.element.android.libraries.architecture.Presenter + +interface DirectLogoutPresenter : Presenter 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 new file mode 100644 index 0000000000..71e97a856d --- /dev/null +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutState.kt @@ -0,0 +1,26 @@ +/* + * 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.features.logout.api.direct + +import io.element.android.libraries.architecture.Async + +data class DirectLogoutState( + val canDoDirectSignOut: Boolean, + val showConfirmationDialog: Boolean, + val logoutAction: Async, + val eventSink: (DirectLogoutEvents) -> Unit, +) diff --git a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt new file mode 100644 index 0000000000..91c4dbcdda --- /dev/null +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt @@ -0,0 +1,27 @@ +/* + * 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.features.logout.api.direct + +import androidx.compose.runtime.Composable + +interface DirectLogoutView { + @Composable + fun render( + state: DirectLogoutState, + onSuccessLogout: (logoutUrlResult: String?) -> Unit + ) +} 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 d3d4805f82..e025f4825a 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 @@ -22,7 +22,6 @@ import androidx.compose.foundation.layout.ColumnScope import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.vector.ImageVector @@ -31,10 +30,11 @@ import androidx.compose.ui.res.vectorResource 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.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.designsystem.atomic.pages.FlowStepPage -import io.element.android.libraries.designsystem.components.ProgressDialog -import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog 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 @@ -81,10 +81,7 @@ fun LogoutView( // Log out confirmation dialog if (state.showConfirmationDialog) { - ConfirmationDialog( - title = stringResource(id = CommonStrings.action_signout), - content = stringResource(id = R.string.screen_signout_confirmation_dialog_content), - submitText = stringResource(id = CommonStrings.action_signout), + LogoutConfirmationDialog( onSubmitClicked = { eventSink(LogoutEvents.Logout(ignoreSdkError = false)) }, @@ -94,28 +91,18 @@ fun LogoutView( ) } - when (state.logoutAction) { - is Async.Loading -> - ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content)) - is Async.Failure -> - ConfirmationDialog( - title = stringResource(id = CommonStrings.dialog_title_error), - content = stringResource(id = CommonStrings.error_unknown), - submitText = stringResource(id = CommonStrings.action_signout_anyway), - onSubmitClicked = { - eventSink(LogoutEvents.Logout(ignoreSdkError = true)) - }, - onDismiss = { - eventSink(LogoutEvents.CloseDialogs) - } - ) - Async.Uninitialized -> - Unit - is Async.Success -> - LaunchedEffect(state.logoutAction) { - onSuccessLogout(state.logoutAction.data) - } - } + LogoutActionDialog( + state.logoutAction, + onForceLogoutClicked = { + eventSink(LogoutEvents.Logout(ignoreSdkError = true)) + }, + onDismissError = { + eventSink(LogoutEvents.CloseDialogs) + }, + onSuccessLogout = { + onSuccessLogout(it) + }, + ) } @Composable @@ -146,17 +133,6 @@ private fun subtitle(state: LogoutState): String? { } } -private fun BackupUploadState.isBackingUp(): Boolean { - return when (this) { - BackupUploadState.Waiting, - is BackupUploadState.Uploading -> true - is BackupUploadState.SteadyException -> exception is SteadyStateException.Connection - BackupUploadState.Unknown, - BackupUploadState.Done, - BackupUploadState.Error -> false - } -} - @Composable private fun ColumnScope.Buttons( state: LogoutState, 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 new file mode 100644 index 0000000000..70827e8ab0 --- /dev/null +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenter.kt @@ -0,0 +1,113 @@ +/* + * 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.features.logout.impl.direct + +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.MutableState +import androidx.compose.runtime.collectAsState +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 com.squareup.anvil.annotations.ContributesBinding +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.runCatchingUpdatingState +import io.element.android.libraries.di.SessionScope +import io.element.android.libraries.featureflag.api.FeatureFlagService +import io.element.android.libraries.featureflag.api.FeatureFlags +import io.element.android.libraries.matrix.api.MatrixClient +import io.element.android.libraries.matrix.api.encryption.BackupUploadState +import io.element.android.libraries.matrix.api.encryption.EncryptionService +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.flow.emptyFlow +import kotlinx.coroutines.flow.flowOf +import kotlinx.coroutines.launch +import javax.inject.Inject + +@ContributesBinding(SessionScope::class) +class DefaultDirectLogoutPresenter @Inject constructor( + private val matrixClient: MatrixClient, + private val encryptionService: EncryptionService, + private val featureFlagService: FeatureFlagService, +) : DirectLogoutPresenter { + @Composable + override fun present(): DirectLogoutState { + val localCoroutineScope = rememberCoroutineScope() + + val logoutAction: MutableState> = remember { + mutableStateOf(Async.Uninitialized) + } + + val secureStorageFlag by featureFlagService.isFeatureEnabledFlow(FeatureFlags.SecureStorage) + .collectAsState(initial = null) + + val backupUploadState: BackupUploadState by remember(secureStorageFlag) { + when (secureStorageFlag) { + true -> encryptionService.waitForBackupUploadSteadyState() + false -> flowOf(BackupUploadState.Done) + else -> emptyFlow() + } + } + .collectAsState(initial = BackupUploadState.Unknown) + + var showLogoutDialog by remember { mutableStateOf(false) } + var isLastSession by remember { mutableStateOf(false) } + LaunchedEffect(Unit) { + isLastSession = encryptionService.isLastDevice().getOrNull() ?: false + } + + fun handleEvents(event: DirectLogoutEvents) { + when (event) { + is DirectLogoutEvents.Logout -> { + if (showLogoutDialog || event.ignoreSdkError) { + showLogoutDialog = false + localCoroutineScope.logout(logoutAction, event.ignoreSdkError) + } else { + showLogoutDialog = true + } + } + DirectLogoutEvents.CloseDialogs -> { + logoutAction.value = Async.Uninitialized + showLogoutDialog = false + } + } + } + + return DirectLogoutState( + canDoDirectSignOut = !isLastSession && + !backupUploadState.isBackingUp(), + showConfirmationDialog = showLogoutDialog, + logoutAction = logoutAction.value, + eventSink = ::handleEvents + ) + } + + private fun CoroutineScope.logout( + logoutAction: MutableState>, + ignoreSdkError: Boolean, + ) = launch { + suspend { + matrixClient.logout(ignoreSdkError) + }.runCatchingUpdatingState(logoutAction) + } +} 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 new file mode 100644 index 0000000000..8667f2200e --- /dev/null +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutView.kt @@ -0,0 +1,62 @@ +/* + * 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.features.logout.impl.direct + +import androidx.compose.runtime.Composable +import com.squareup.anvil.annotations.ContributesBinding +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 + +@ContributesBinding(SessionScope::class) +class DefaultDirectLogoutView @Inject constructor() : DirectLogoutView { + @Composable + override fun render( + state: DirectLogoutState, + 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, + onForceLogoutClicked = { + eventSink(DirectLogoutEvents.Logout(ignoreSdkError = true)) + }, + onDismissError = { + eventSink(DirectLogoutEvents.CloseDialogs) + }, + onSuccessLogout = { + onSuccessLogout(it) + }, + ) + } +} diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt new file mode 100644 index 0000000000..ba71b2a045 --- /dev/null +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt @@ -0,0 +1,31 @@ +/* + * 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.features.logout.impl.tools + +import io.element.android.libraries.matrix.api.encryption.BackupUploadState +import io.element.android.libraries.matrix.api.encryption.SteadyStateException + +internal fun BackupUploadState.isBackingUp(): Boolean { + return when (this) { + BackupUploadState.Waiting, + is BackupUploadState.Uploading -> true + is BackupUploadState.SteadyException -> exception is SteadyStateException.Connection + BackupUploadState.Unknown, + BackupUploadState.Done, + BackupUploadState.Error -> false + } +} 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 new file mode 100644 index 0000000000..c5a3e41e73 --- /dev/null +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutActionDialog.kt @@ -0,0 +1,53 @@ +/* + * 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.features.logout.impl.ui + +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.designsystem.components.ProgressDialog +import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog +import io.element.android.libraries.ui.strings.CommonStrings + +@Composable +fun LogoutActionDialog( + state: Async, + onForceLogoutClicked: () -> Unit, + onDismissError: () -> Unit, + onSuccessLogout: (String?) -> Unit, +) { + when (state) { + is Async.Loading -> + ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content)) + is Async.Failure -> + ConfirmationDialog( + title = stringResource(id = CommonStrings.dialog_title_error), + content = stringResource(id = CommonStrings.error_unknown), + submitText = stringResource(id = CommonStrings.action_signout_anyway), + onSubmitClicked = onForceLogoutClicked, + onDismiss = onDismissError, + ) + Async.Uninitialized -> + Unit + is Async.Success -> + LaunchedEffect(state) { + onSuccessLogout(state.data) + } + } +} diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutConfirmationDialog.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutConfirmationDialog.kt new file mode 100644 index 0000000000..caf04a2752 --- /dev/null +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/ui/LogoutConfirmationDialog.kt @@ -0,0 +1,37 @@ +/* + * 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.features.logout.impl.ui + +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import io.element.android.features.logout.impl.R +import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog +import io.element.android.libraries.ui.strings.CommonStrings + +@Composable +fun LogoutConfirmationDialog( + onSubmitClicked: () -> Unit, + onDismiss: () -> Unit, +) { + ConfirmationDialog( + title = stringResource(id = CommonStrings.action_signout), + content = stringResource(id = R.string.screen_signout_confirmation_dialog_content), + submitText = stringResource(id = CommonStrings.action_signout), + onSubmitClicked = onSubmitClicked, + onDismiss = onDismiss, + ) +} diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt index ecb2f7f070..6fa8a65928 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt @@ -27,16 +27,19 @@ import com.bumble.appyx.core.plugin.plugins import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.compound.theme.ElementTheme +import io.element.android.features.logout.api.direct.DirectLogoutView import io.element.android.libraries.androidutils.browser.openUrlInChromeCustomTab import io.element.android.libraries.di.SessionScope import io.element.android.libraries.matrix.api.user.MatrixUser -import io.element.android.compound.theme.ElementTheme +import timber.log.Timber @ContributesNode(SessionScope::class) class PreferencesRootNode @AssistedInject constructor( @Assisted buildContext: BuildContext, @Assisted plugins: List, private val presenter: PreferencesRootPresenter, + private val directLogoutView: DirectLogoutView, ) : Node(buildContext, plugins = plugins) { interface Callback : Plugin { @@ -95,6 +98,13 @@ class PreferencesRootNode @AssistedInject constructor( } } + private fun onSuccessLogout(activity: Activity, url: String?) { + Timber.d("Success (direct) logout with result url: $url") + url?.let { + activity.openUrlInChromeCustomTab(null, false, it) + } + } + private fun onOpenNotificationSettings() { plugins().forEach { it.onOpenNotificationSettings() } } @@ -133,5 +143,12 @@ class PreferencesRootNode @AssistedInject constructor( onOpenUserProfile = this::onOpenUserProfile, onSignOutClicked = this::onSignOutClicked, ) + + directLogoutView.render( + state = state.directLogoutState, + onSuccessLogout = { + onSuccessLogout(activity, it) + } + ) } } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt index 3295e3a59a..7472f6df7a 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootPresenter.kt @@ -24,6 +24,7 @@ import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.saveable.rememberSaveable +import io.element.android.features.logout.api.direct.DirectLogoutPresenter import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.core.meta.BuildType import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher @@ -50,6 +51,7 @@ class PreferencesRootPresenter @Inject constructor( private val snackbarDispatcher: SnackbarDispatcher, private val featureFlagService: FeatureFlagService, private val indicatorService: IndicatorService, + private val directLogoutPresenter: DirectLogoutPresenter, ) : Presenter { @Composable @@ -88,6 +90,8 @@ class PreferencesRootPresenter @Inject constructor( mutableStateOf(null) } + val directLogoutState = directLogoutPresenter.present() + LaunchedEffect(Unit) { initAccountManagementUrl(accountManagementUrl, devicesManagementUrl) } @@ -105,6 +109,7 @@ class PreferencesRootPresenter @Inject constructor( showDeveloperSettings = showDeveloperSettings, showNotificationSettings = showNotificationSettings.value, showLockScreenSettings = showLockScreenSettings.value, + directLogoutState = directLogoutState, snackbarMessage = snackbarMessage, ) } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt index fec09f150f..0da537f26a 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootState.kt @@ -16,6 +16,7 @@ package io.element.android.features.preferences.impl.root +import io.element.android.features.logout.api.direct.DirectLogoutState import io.element.android.libraries.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.matrix.api.user.MatrixUser @@ -31,5 +32,6 @@ data class PreferencesRootState( val showDeveloperSettings: Boolean, val showLockScreenSettings: Boolean, val showNotificationSettings: Boolean, + val directLogoutState: DirectLogoutState, val snackbarMessage: SnackbarMessage?, ) 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 74d8b0f0c9..db8c5b97b9 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 @@ -16,6 +16,8 @@ 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.designsystem.utils.snackbar.SnackbarMessage import io.element.android.libraries.ui.strings.CommonStrings @@ -32,4 +34,12 @@ fun aPreferencesRootState() = PreferencesRootState( showNotificationSettings = true, showLockScreenSettings = true, snackbarMessage = SnackbarMessage(CommonStrings.common_verification_complete), + directLogoutState = aDirectLogoutState(), +) + +fun aDirectLogoutState() = DirectLogoutState( + canDoDirectSignOut = true, + showConfirmationDialog = false, + logoutAction = Async.Uninitialized, + eventSink = {}, ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt index 230648a96a..784202a892 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt @@ -29,6 +29,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.compound.tokens.generated.CompoundIcons +import io.element.android.features.logout.api.direct.DirectLogoutEvents import io.element.android.features.preferences.impl.R import io.element.android.features.preferences.impl.user.UserPreferences import io.element.android.libraries.designsystem.components.list.ListItemContent @@ -57,7 +58,7 @@ fun PreferencesRootView( onManageAccountClicked: (url: String) -> Unit, onOpenAnalytics: () -> Unit, onOpenRageShake: () -> Unit, - onOpenLockScreenSettings: ()->Unit, + onOpenLockScreenSettings: () -> Unit, onOpenAbout: () -> Unit, onOpenDeveloperSettings: () -> Unit, onOpenAdvancedSettings: () -> Unit, @@ -91,7 +92,7 @@ fun PreferencesRootView( if (state.showSecureBackup) { ListItem( headlineContent = { Text(stringResource(id = CommonStrings.common_chat_backup)) }, - leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_key_filled),), + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_key_filled)), trailingContent = ListItemContent.Badge.takeIf { state.showSecureBackupBadge }, onClick = onSecureBackupClicked, ) @@ -162,7 +163,13 @@ fun PreferencesRootView( headlineContent = { Text(stringResource(id = CommonStrings.action_signout)) }, leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_sign_out)), style = ListItemStyle.Destructive, - onClick = onSignOutClicked, + onClick = { + if (state.directLogoutState.canDoDirectSignOut) { + state.directLogoutState.eventSink(DirectLogoutEvents.Logout(ignoreSdkError = false)) + } else { + onSignOutClicked() + } + }, ) Text( modifier = Modifier 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 f914c21100..8655fb5df5 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 @@ -16,10 +16,14 @@ package io.element.android.features.preferences.impl.root +import androidx.compose.runtime.Composable 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.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.core.meta.BuildType import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher import io.element.android.libraries.featureflag.test.FakeFeatureFlagService @@ -41,23 +45,34 @@ class PreferencesRootPresenterTest { @get:Rule val warmUpRule = WarmUpRule() + private val aDirectLogoutState = DirectLogoutState( + canDoDirectSignOut = true, + showConfirmationDialog = false, + logoutAction = Async.Uninitialized, + eventSink = {}, + ) + @Test fun `present - initial state`() = runTest { val matrixClient = FakeMatrixClient() val sessionVerificationService = FakeSessionVerificationService() val presenter = PreferencesRootPresenter( - matrixClient, - sessionVerificationService, - FakeAnalyticsService(), - BuildType.DEBUG, - FakeVersionFormatter(), - SnackbarDispatcher(), - FakeFeatureFlagService(), - DefaultIndicatorService( + matrixClient = matrixClient, + sessionVerificationService = sessionVerificationService, + analyticsService = FakeAnalyticsService(), + buildType = BuildType.DEBUG, + versionFormatter = FakeVersionFormatter(), + snackbarDispatcher = SnackbarDispatcher(), + featureFlagService = FakeFeatureFlagService(), + indicatorService = DefaultIndicatorService( sessionVerificationService = sessionVerificationService, encryptionService = FakeEncryptionService(), featureFlagService = FakeFeatureFlagService(), ), + directLogoutPresenter = object : DirectLogoutPresenter { + @Composable + override fun present() = aDirectLogoutState + } ) moleculeFlow(RecompositionMode.Immediate) { presenter.present() @@ -77,6 +92,7 @@ class PreferencesRootPresenterTest { assertThat(loadedState.showAnalyticsSettings).isFalse() assertThat(loadedState.accountManagementUrl).isNull() assertThat(loadedState.devicesManagementUrl).isNull() + assertThat(loadedState.directLogoutState).isEqualTo(aDirectLogoutState) } } } From 729c6efa264bf70fabc326473ed60f14f95f4966 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 12:20:19 +0100 Subject: [PATCH 009/161] Test more fields --- .../impl/root/PreferencesRootPresenterTest.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 8655fb5df5..fc657bfbd7 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 @@ -88,11 +88,18 @@ class PreferencesRootPresenterTest { avatarUrl = AN_AVATAR_URL ) ) - assertThat(loadedState.showDeveloperSettings).isTrue() - assertThat(loadedState.showAnalyticsSettings).isFalse() + assertThat(initialState.version).isEqualTo("A Version") + assertThat(loadedState.showCompleteVerification).isTrue() + assertThat(loadedState.showSecureBackup).isFalse() + assertThat(loadedState.showSecureBackupBadge).isTrue() assertThat(loadedState.accountManagementUrl).isNull() assertThat(loadedState.devicesManagementUrl).isNull() + assertThat(loadedState.showAnalyticsSettings).isFalse() + assertThat(loadedState.showDeveloperSettings).isTrue() + assertThat(loadedState.showLockScreenSettings).isTrue() + assertThat(loadedState.showNotificationSettings).isTrue() assertThat(loadedState.directLogoutState).isEqualTo(aDirectLogoutState) + assertThat(loadedState.snackbarMessage).isNull() } } } From 9081ba79fa6440d32065d85232c91699ec02c160 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 12:32:36 +0100 Subject: [PATCH 010/161] Add test for `DefaultDirectLogoutPresenter` --- .../DefaultDirectLogoutPresenterTest.kt | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenterTest.kt 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 new file mode 100644 index 0000000000..d9cd793105 --- /dev/null +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/direct/DefaultDirectLogoutPresenterTest.kt @@ -0,0 +1,206 @@ +/* + * 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.features.logout.impl.direct + +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.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.libraries.architecture.Async +import io.element.android.libraries.featureflag.api.FeatureFlags +import io.element.android.libraries.featureflag.test.FakeFeatureFlagService +import io.element.android.libraries.matrix.api.MatrixClient +import io.element.android.libraries.matrix.api.encryption.BackupUploadState +import io.element.android.libraries.matrix.api.encryption.EncryptionService +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 +import org.junit.Test + +class DefaultDirectLogoutPresenterTest { + + @get:Rule + val warmUpRule = WarmUpRule() + + @Test + fun `present - initial state`() = runTest { + val presenter = createDefaultDirectLogoutPresenter() + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + val initialState = awaitLastSequentialItem() + assertThat(initialState.canDoDirectSignOut).isTrue() + assertThat(initialState.showConfirmationDialog).isFalse() + assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + } + } + + @Test + fun `present - initial state - last session`() = runTest { + val presenter = createDefaultDirectLogoutPresenter( + encryptionService = FakeEncryptionService().apply { + givenIsLastDevice(true) + } + ) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + skipItems(2) + val initialState = awaitItem() + assertThat(initialState.canDoDirectSignOut).isFalse() + assertThat(initialState.showConfirmationDialog).isFalse() + assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + } + } + + @Test + fun `present - initial state - backing up`() = runTest { + val encryptionService = FakeEncryptionService() + encryptionService.givenWaitForBackupUploadSteadyStateFlow( + flow { + emit(BackupUploadState.Waiting) + } + ) + val presenter = createDefaultDirectLogoutPresenter( + encryptionService = encryptionService + ) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + skipItems(2) + val initialState = awaitItem() + assertThat(initialState.canDoDirectSignOut).isFalse() + assertThat(initialState.showConfirmationDialog).isFalse() + assertThat(initialState.logoutAction).isEqualTo(Async.Uninitialized) + } + } + + @Test + fun `present - logout then cancel`() = runTest { + val presenter = createDefaultDirectLogoutPresenter() + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + val initialState = awaitLastSequentialItem() + initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + val confirmationState = awaitItem() + assertThat(confirmationState.showConfirmationDialog).isTrue() + initialState.eventSink.invoke(DirectLogoutEvents.CloseDialogs) + val finalState = awaitItem() + assertThat(finalState.showConfirmationDialog).isFalse() + } + } + + @Test + fun `present - logout then confirm`() = runTest { + val presenter = createDefaultDirectLogoutPresenter() + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + val initialState = awaitLastSequentialItem() + initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + val confirmationState = awaitItem() + assertThat(confirmationState.showConfirmationDialog).isTrue() + confirmationState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + skipItems(1) + val loadingState = awaitItem() + assertThat(loadingState.showConfirmationDialog).isFalse() + assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + val successState = awaitItem() + assertThat(successState.logoutAction).isInstanceOf(Async.Success::class.java) + } + } + + @Test + fun `present - logout with error then cancel`() = runTest { + val matrixClient = FakeMatrixClient().apply { + givenLogoutError(A_THROWABLE) + } + val presenter = createDefaultDirectLogoutPresenter( + matrixClient, + ) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + skipItems(1) + val initialState = awaitItem() + initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + val confirmationState = awaitItem() + assertThat(confirmationState.showConfirmationDialog).isTrue() + confirmationState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + skipItems(1) + val loadingState = awaitItem() + assertThat(loadingState.showConfirmationDialog).isFalse() + assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + val errorState = awaitItem() + assertThat(errorState.logoutAction).isEqualTo(Async.Failure(A_THROWABLE)) + errorState.eventSink.invoke(DirectLogoutEvents.CloseDialogs) + val finalState = awaitItem() + assertThat(finalState.logoutAction).isEqualTo(Async.Uninitialized) + } + } + + @Test + fun `present - logout with error then force`() = runTest { + val matrixClient = FakeMatrixClient().apply { + givenLogoutError(A_THROWABLE) + } + val presenter = createDefaultDirectLogoutPresenter( + matrixClient, + ) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + skipItems(1) + val initialState = awaitItem() + initialState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + val confirmationState = awaitItem() + assertThat(confirmationState.showConfirmationDialog).isTrue() + confirmationState.eventSink.invoke(DirectLogoutEvents.Logout(ignoreSdkError = false)) + skipItems(1) + val loadingState = awaitItem() + assertThat(loadingState.showConfirmationDialog).isFalse() + assertThat(loadingState.logoutAction).isInstanceOf(Async.Loading::class.java) + val errorState = awaitItem() + assertThat(errorState.logoutAction).isEqualTo(Async.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) + val successState = awaitItem() + assertThat(successState.logoutAction).isInstanceOf(Async.Success::class.java) + } + } + + private fun createDefaultDirectLogoutPresenter( + matrixClient: MatrixClient = FakeMatrixClient(), + encryptionService: EncryptionService = FakeEncryptionService(), + ): DefaultDirectLogoutPresenter = DefaultDirectLogoutPresenter( + matrixClient = matrixClient, + encryptionService = encryptionService, + featureFlagService = FakeFeatureFlagService(mapOf(FeatureFlags.SecureStorage.key to true)), + ) +} + From fba9788678743539aed1287f4f25cb0a57709d3f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 13:24:59 +0100 Subject: [PATCH 011/161] Quality --- .../android/features/logout/api/direct/DirectLogoutView.kt | 2 +- .../features/logout/impl/direct/DefaultDirectLogoutView.kt | 2 +- .../logout/impl/direct/DefaultDirectLogoutPresenterTest.kt | 1 - .../features/preferences/impl/root/PreferencesRootNode.kt | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt index 91c4dbcdda..0fd4c04cf2 100644 --- a/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt +++ b/features/logout/api/src/main/kotlin/io/element/android/features/logout/api/direct/DirectLogoutView.kt @@ -20,7 +20,7 @@ import androidx.compose.runtime.Composable interface DirectLogoutView { @Composable - fun render( + fun Render( state: DirectLogoutState, onSuccessLogout: (logoutUrlResult: String?) -> Unit ) 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 8667f2200e..bd00975864 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 @@ -29,7 +29,7 @@ import javax.inject.Inject @ContributesBinding(SessionScope::class) class DefaultDirectLogoutView @Inject constructor() : DirectLogoutView { @Composable - override fun render( + override fun Render( state: DirectLogoutState, onSuccessLogout: (logoutUrlResult: String?) -> Unit, ) { 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 d9cd793105..5341a8c19e 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 @@ -21,7 +21,6 @@ import app.cash.molecule.moleculeFlow 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.DirectLogoutPresenter import io.element.android.features.logout.api.direct.DirectLogoutState import io.element.android.libraries.architecture.Async import io.element.android.libraries.featureflag.api.FeatureFlags diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt index 6fa8a65928..ee79de0cce 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt @@ -144,7 +144,7 @@ class PreferencesRootNode @AssistedInject constructor( onSignOutClicked = this::onSignOutClicked, ) - directLogoutView.render( + directLogoutView.Render( state = state.directLogoutState, onSuccessLogout = { onSuccessLogout(activity, it) From 25c623549d0ea705d1f9abcca745c8b913764c30 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 13:26:01 +0100 Subject: [PATCH 012/161] towncrier file --- changelog.d/2072.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2072.misc diff --git a/changelog.d/2072.misc b/changelog.d/2072.misc new file mode 100644 index 0000000000..7ae9d0be44 --- /dev/null +++ b/changelog.d/2072.misc @@ -0,0 +1 @@ + Remove extra logout screen. From ea4a0cfc682144d154f3a8f2353cdf49438dd113 Mon Sep 17 00:00:00 2001 From: ElementBot Date: Tue, 26 Dec 2023 13:01:40 +0000 Subject: [PATCH 013/161] Update screenshots --- ...null_CreateRoomRootView-Day-4_4_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...ll_CreateRoomRootView-Night-4_5_null_0,NEXUS_5,1.0,en].png | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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_4_null_0,NEXUS_5,1.0,en].png index 3b6d8bc1b0..c5f3236dde 100644 --- 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_4_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e055da42d13817ccd4f6de3a45ac24db3a64aaf58e6f43e66f362ce391873100 -size 23794 +oid sha256:bb9b7d6711afd4c21acd3a5a1c93807c4add46cba94ede30aca92bfbc533a2da +size 23879 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_5_null_0,NEXUS_5,1.0,en].png index 55017d72a8..d0d90c769b 100644 --- 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_5_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ab61e6f09be66482c0afb7f0667ed249b2b1e67bb6b41cfc4618237e9013bef -size 22278 +oid sha256:14554d6b72e1daa3e7385fbc26e9f377d281f6f6bfa8d9c4b8048bf0f8fd104b +size 22339 From 93386b6867249ed276f5a711f331b14844da90ec Mon Sep 17 00:00:00 2001 From: ElementBot Date: Tue, 26 Dec 2023 13:06:19 +0000 Subject: [PATCH 014/161] Update screenshots --- ...null_CreateRoomRootView-Day-4_4_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...ll_CreateRoomRootView-Night-4_5_null_0,NEXUS_5,1.0,en].png | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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_4_null_0,NEXUS_5,1.0,en].png index 3b6d8bc1b0..c5f3236dde 100644 --- 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_4_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e055da42d13817ccd4f6de3a45ac24db3a64aaf58e6f43e66f362ce391873100 -size 23794 +oid sha256:bb9b7d6711afd4c21acd3a5a1c93807c4add46cba94ede30aca92bfbc533a2da +size 23879 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_5_null_0,NEXUS_5,1.0,en].png index 55017d72a8..d0d90c769b 100644 --- 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_5_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0ab61e6f09be66482c0afb7f0667ed249b2b1e67bb6b41cfc4618237e9013bef -size 22278 +oid sha256:14554d6b72e1daa3e7385fbc26e9f377d281f6f6bfa8d9c4b8048bf0f8fd104b +size 22339 From 78f0ce0d27fd6ab2931e20dfd669b8e6b3b4aea8 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 14:45:08 +0100 Subject: [PATCH 015/161] Refacto: move `displayEmojiReactions` to `ActionListState.Target.Success` --- .../impl/actionlist/ActionListPresenter.kt | 18 ++-- .../impl/actionlist/ActionListState.kt | 2 +- .../actionlist/ActionListStateProvider.kt | 12 ++- .../impl/actionlist/ActionListView.kt | 2 +- .../model/event/TimelineItemEventContent.kt | 1 + .../actionlist/ActionListPresenterTest.kt | 82 +++++++++++-------- 6 files changed, 65 insertions(+), 52 deletions(-) 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 d936ea9af8..645c903158 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 @@ -19,7 +19,6 @@ package io.element.android.features.messages.impl.actionlist import androidx.compose.runtime.Composable import androidx.compose.runtime.MutableState import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.derivedStateOf import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember @@ -53,13 +52,6 @@ class ActionListPresenter @Inject constructor( val isDeveloperModeEnabled by preferencesStore.isDeveloperModeEnabledFlow().collectAsState(initial = false) - val displayEmojiReactions by remember { - derivedStateOf { - val event = (target.value as? ActionListState.Target.Success)?.event - event?.isRemote == true && event.content.canReact() - } - } - fun handleEvents(event: ActionListEvents) { when (event) { ActionListEvents.Clear -> target.value = ActionListState.Target.None @@ -75,7 +67,6 @@ class ActionListPresenter @Inject constructor( return ActionListState( target = target.value, - displayEmojiReactions = displayEmojiReactions, eventSink = { handleEvents(it) } ) } @@ -178,8 +169,13 @@ class ActionListPresenter @Inject constructor( } } } - if (actions.isNotEmpty()) { - target.value = ActionListState.Target.Success(timelineItem, actions.toImmutableList()) + val displayEmojiReactions = timelineItem.isRemote && timelineItem.content.canReact() + if (actions.isNotEmpty() || displayEmojiReactions) { + target.value = ActionListState.Target.Success( + event = timelineItem, + displayEmojiReactions = displayEmojiReactions, + actions = actions.toImmutableList() + ) } else { target.value = ActionListState.Target.None } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt index a8fbf81486..5566f949d0 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListState.kt @@ -24,7 +24,6 @@ import kotlinx.collections.immutable.ImmutableList @Immutable data class ActionListState( val target: Target, - val displayEmojiReactions: Boolean, val eventSink: (ActionListEvents) -> Unit, ) { sealed interface Target { @@ -32,6 +31,7 @@ data class ActionListState( data class Loading(val event: TimelineItem.Event) : Target data class Success( val event: TimelineItem.Event, + val displayEmojiReactions: Boolean, val actions: ImmutableList, ) : Target } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt index 3ea99aaede..e33f54de3e 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListStateProvider.kt @@ -42,6 +42,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent().copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -50,6 +51,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemImageContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -58,6 +60,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemVideoContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -66,6 +69,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemFileContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -74,6 +78,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemAudioContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -82,6 +87,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemVoiceContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -90,6 +96,7 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemLocationContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = true, actions = aTimelineItemActionList(), ) ), @@ -98,18 +105,18 @@ open class ActionListStateProvider : PreviewParameterProvider { event = aTimelineItemEvent(content = aTimelineItemLocationContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = false, actions = aTimelineItemActionList(), ), - displayEmojiReactions = false, ), anActionListState().copy( target = ActionListState.Target.Success( event = aTimelineItemEvent(content = aTimelineItemPollContent()).copy( reactionsState = reactionsState ), + displayEmojiReactions = false, actions = aTimelineItemPollActionList(), ), - displayEmojiReactions = false, ), ) } @@ -117,7 +124,6 @@ open class ActionListStateProvider : PreviewParameterProvider { fun anActionListState() = ActionListState( target = ActionListState.Target.None, - displayEmojiReactions = true, eventSink = {} ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt index c7b72ce527..93736933fd 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt @@ -179,7 +179,7 @@ private fun SheetContent( HorizontalDivider() } } - if (state.displayEmojiReactions) { + if (target.displayEmojiReactions) { item { EmojiReactionsRow( highlightedEmojis = target.event.reactionsState.highlightedKeys, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt index feb3246e54..f459e27d88 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt @@ -47,6 +47,7 @@ fun TimelineItemEventContent.canBeRepliedTo(): Boolean = /** * Return true if user can react (i.e. send a reaction) on the event content. + * This does not take into account the power level of the user. */ fun TimelineItemEventContent.canReact(): Boolean = when (this) { diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt index 3c8dcf6e85..1fcd873d5a 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt @@ -68,8 +68,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = false, + actions = persistentListOf( TimelineItemAction.ViewSource, ) ) @@ -93,8 +94,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = false, + actions = persistentListOf( TimelineItemAction.ViewSource, ) ) @@ -121,8 +123,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Forward, TimelineItemAction.Copy, @@ -153,8 +156,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Forward, TimelineItemAction.Copy, TimelineItemAction.ViewSource, @@ -182,8 +186,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Forward, TimelineItemAction.Copy, @@ -215,8 +220,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Forward, TimelineItemAction.Edit, @@ -248,8 +254,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Forward, TimelineItemAction.ViewSource, @@ -279,8 +286,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - stateEvent, - persistentListOf( + event = stateEvent, + displayEmojiReactions = false, + actions = persistentListOf( TimelineItemAction.Copy, TimelineItemAction.ViewSource, ) @@ -308,8 +316,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - stateEvent, - persistentListOf( + event = stateEvent, + displayEmojiReactions = false, + actions = persistentListOf( TimelineItemAction.Copy, ) ) @@ -336,8 +345,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Forward, TimelineItemAction.Edit, @@ -373,7 +383,6 @@ class ActionListPresenterTest { initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(redactedEvent, canRedact = false, canSendMessage = true)) awaitItem().run { assertThat(target).isEqualTo(ActionListState.Target.None) - assertThat(displayEmojiReactions).isFalse() } } } @@ -395,15 +404,15 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = false, + actions = persistentListOf( TimelineItemAction.Edit, TimelineItemAction.Copy, TimelineItemAction.Redact, ) ) ) - assertThat(successState.displayEmojiReactions).isFalse() } } @@ -423,8 +432,9 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Edit, TimelineItemAction.EndPoll, @@ -432,9 +442,9 @@ class ActionListPresenterTest { ) ) ) - assertThat(successState.displayEmojiReactions).isTrue() } } + @Test fun `present - compute for non-editable poll message`() = runTest { val presenter = createActionListPresenter(isDeveloperModeEnabled = false) @@ -451,15 +461,15 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.EndPoll, TimelineItemAction.Redact, ) ) ) - assertThat(successState.displayEmojiReactions).isTrue() } } @@ -479,14 +489,14 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Redact, ) ) ) - assertThat(successState.displayEmojiReactions).isTrue() } } @@ -505,15 +515,15 @@ class ActionListPresenterTest { val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( - messageEvent, - persistentListOf( + event = messageEvent, + displayEmojiReactions = true, + actions = persistentListOf( TimelineItemAction.Reply, TimelineItemAction.Forward, TimelineItemAction.Redact, ) ) ) - assertThat(successState.displayEmojiReactions).isTrue() } } } From f0fc1507ec539435da557cfaa4c3c515ccbdc68e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 14:57:47 +0100 Subject: [PATCH 016/161] Hide reaction is user do not have permission to send reaction #2093 --- .../messages/impl/MessagesPresenter.kt | 2 + .../features/messages/impl/MessagesState.kt | 1 + .../messages/impl/MessagesStateProvider.kt | 1 + .../features/messages/impl/MessagesView.kt | 1 + .../impl/actionlist/ActionListEvents.kt | 1 + .../impl/actionlist/ActionListPresenter.kt | 6 +- .../actionlist/ActionListPresenterTest.kt | 66 ++++++++++++++----- 7 files changed, 60 insertions(+), 18 deletions(-) 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 7d421a256a..1ca834bc66 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 @@ -139,6 +139,7 @@ class MessagesPresenter @AssistedInject constructor( val syncUpdateFlow = room.syncUpdateFlow.collectAsState() 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 } } @@ -219,6 +220,7 @@ class MessagesPresenter @AssistedInject constructor( roomAvatar = roomAvatar, userHasPermissionToSendMessage = userHasPermissionToSendMessage, userHasPermissionToRedact = userHasPermissionToRedact, + userHasPermissionToSendReaction = userHasPermissionToSendReaction, composerState = composerState, voiceMessageComposerState = voiceMessageComposerState, timelineState = timelineState, 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 7d342ab107..c7ef5f320f 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 @@ -37,6 +37,7 @@ data class MessagesState( val roomAvatar: Async, val userHasPermissionToSendMessage: Boolean, val userHasPermissionToRedact: Boolean, + val userHasPermissionToSendReaction: Boolean, val composerState: MessageComposerState, val voiceMessageComposerState: VoiceMessageComposerState, val timelineState: TimelineState, 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 00c15fb410..2984e4e087 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 @@ -87,6 +87,7 @@ fun aMessagesState() = MessagesState( roomAvatar = Async.Success(AvatarData("!id:domain", "Room name", size = AvatarSize.TimelineRoom)), userHasPermissionToSendMessage = true, userHasPermissionToRedact = false, + userHasPermissionToSendReaction = true, composerState = aMessageComposerState().copy( richTextEditorState = RichTextEditorState("Hello", initialFocus = true), isFullScreen = false, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt index dd728aa274..d6556c9a8c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt @@ -159,6 +159,7 @@ fun MessagesView( event = event, canRedact = state.userHasPermissionToRedact, canSendMessage = state.userHasPermissionToSendMessage, + canSendReaction = state.userHasPermissionToSendReaction, ) ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt index 7c8fad6c7c..6339716ccf 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListEvents.kt @@ -24,5 +24,6 @@ sealed interface ActionListEvents { val event: TimelineItem.Event, val canRedact: Boolean, val canSendMessage: Boolean, + val canSendReaction: Boolean, ) : ActionListEvents } 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 645c903158..d3a4d44246 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 @@ -59,6 +59,7 @@ class ActionListPresenter @Inject constructor( timelineItem = event.event, userCanRedact = event.canRedact, userCanSendMessage = event.canSendMessage, + userCanSendReaction = event.canSendReaction, isDeveloperModeEnabled = isDeveloperModeEnabled, target = target, ) @@ -75,6 +76,7 @@ class ActionListPresenter @Inject constructor( timelineItem: TimelineItem.Event, userCanRedact: Boolean, userCanSendMessage: Boolean, + userCanSendReaction: Boolean, isDeveloperModeEnabled: Boolean, target: MutableState ) = launch { @@ -169,7 +171,9 @@ class ActionListPresenter @Inject constructor( } } } - val displayEmojiReactions = timelineItem.isRemote && timelineItem.content.canReact() + val displayEmojiReactions = userCanSendReaction && + timelineItem.isRemote + && timelineItem.content.canReact() if (actions.isNotEmpty() || displayEmojiReactions) { target.value = ActionListState.Target.Success( event = timelineItem, diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt index 1fcd873d5a..14ae8f1b59 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt @@ -62,7 +62,7 @@ class ActionListPresenterTest { }.test { val initialState = awaitItem() val messageEvent = aMessageEvent(isMine = true, content = TimelineItemRedactedContent) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -88,7 +88,7 @@ class ActionListPresenterTest { }.test { val initialState = awaitItem() val messageEvent = aMessageEvent(isMine = false, content = TimelineItemRedactedContent) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -117,7 +117,7 @@ class ActionListPresenterTest { isMine = false, content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null) ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -150,7 +150,7 @@ class ActionListPresenterTest { isMine = false, content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null) ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = false)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = false, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -182,7 +182,7 @@ class ActionListPresenterTest { isMine = false, content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null) ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = true, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = true, canSendMessage = true, canSendReaction = true)) val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( @@ -203,6 +203,38 @@ class ActionListPresenterTest { } } + @Test + fun `present - compute for others message and cannot send reaction`() = runTest { + val presenter = createActionListPresenter(isDeveloperModeEnabled = true) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + val initialState = awaitItem() + val messageEvent = aMessageEvent( + isMine = false, + content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null) + ) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = true, canSendMessage = true, canSendReaction = false)) + val successState = awaitItem() + assertThat(successState.target).isEqualTo( + ActionListState.Target.Success( + event = messageEvent, + displayEmojiReactions = false, + actions = persistentListOf( + TimelineItemAction.Reply, + TimelineItemAction.Forward, + TimelineItemAction.Copy, + TimelineItemAction.ViewSource, + TimelineItemAction.ReportContent, + TimelineItemAction.Redact, + ) + ) + ) + initialState.eventSink.invoke(ActionListEvents.Clear) + assertThat(awaitItem().target).isEqualTo(ActionListState.Target.None) + } + } + @Test fun `present - compute for my message`() = runTest { val presenter = createActionListPresenter(isDeveloperModeEnabled = true) @@ -214,7 +246,7 @@ class ActionListPresenterTest { isMine = true, content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null) ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -248,7 +280,7 @@ class ActionListPresenterTest { isMine = true, content = aTimelineItemImageContent(), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -280,7 +312,7 @@ class ActionListPresenterTest { isMine = true, content = aTimelineItemStateEventContent(), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(stateEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(stateEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -310,7 +342,7 @@ class ActionListPresenterTest { isMine = true, content = aTimelineItemStateEventContent(), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(stateEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(stateEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -339,7 +371,7 @@ class ActionListPresenterTest { isMine = true, content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null) ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) // val loadingState = awaitItem() // assertThat(loadingState.target).isEqualTo(ActionListState.Target.Loading(messageEvent)) val successState = awaitItem() @@ -377,10 +409,10 @@ class ActionListPresenterTest { content = TimelineItemRedactedContent, ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) assertThat(awaitItem().target).isInstanceOf(ActionListState.Target.Success::class.java) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(redactedEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(redactedEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) awaitItem().run { assertThat(target).isEqualTo(ActionListState.Target.None) } @@ -400,7 +432,7 @@ class ActionListPresenterTest { content = TimelineItemTextContent(body = A_MESSAGE, htmlDocument = null, isEdited = false, formattedBody = null), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( @@ -428,7 +460,7 @@ class ActionListPresenterTest { isEditable = true, content = aTimelineItemPollContent(answerItems = aPollAnswerItemList(hasVotes = false)), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( @@ -457,7 +489,7 @@ class ActionListPresenterTest { isEditable = false, content = aTimelineItemPollContent(answerItems = aPollAnswerItemList(hasVotes = true)), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( @@ -485,7 +517,7 @@ class ActionListPresenterTest { isEditable = false, content = aTimelineItemPollContent(isEnded = true), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( @@ -511,7 +543,7 @@ class ActionListPresenterTest { isMine = true, content = aTimelineItemVoiceContent(), ) - initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true)) + initialState.eventSink.invoke(ActionListEvents.ComputeForMessage(messageEvent, canRedact = false, canSendMessage = true, canSendReaction = true)) val successState = awaitItem() assertThat(successState.target).isEqualTo( ActionListState.Target.Success( From b46f84ee5b11c6523d77e94311f4ebdd0803ae9d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 15:27:08 +0100 Subject: [PATCH 017/161] Hide add more reaction button if user do not have permission to send reaction #2093 Also: - move `userHasPermissionToSendMessage` to `TimelineRoomInfo` - remove `canReply` parameter which can be computed from other params. --- .../impl/timeline/TimelinePresenter.kt | 15 +++++++--- .../messages/impl/timeline/TimelineState.kt | 3 +- .../impl/timeline/TimelineStateProvider.kt | 3 +- .../messages/impl/timeline/TimelineView.kt | 1 - .../components/ATimelineItemEventRow.kt | 1 - .../components/TimelineItemEventRow.kt | 4 ++- .../TimelineItemGroupedEventsRow.kt | 1 - .../components/TimelineItemReactionsLayout.kt | 19 ++++++------ .../components/TimelineItemReactionsView.kt | 29 +++++++++++++------ .../timeline/components/TimelineItemRow.kt | 5 +--- 10 files changed, 48 insertions(+), 33 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt index 8613f2404e..37d2d7d2a6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt @@ -98,6 +98,7 @@ class TimelinePresenter @AssistedInject constructor( val paginationState by timeline.paginationState.collectAsState() val syncUpdateFlow = room.syncUpdateFlow.collectAsState() val userHasPermissionToSendMessage by room.canSendMessageAsState(type = MessageEventType.ROOM_MESSAGE, updateKey = syncUpdateFlow.value) + val userHasPermissionToSendReaction by room.canSendMessageAsState(type = MessageEventType.REACTION_SENT, updateKey = syncUpdateFlow.value) val prevMostRecentItemId = rememberSaveable { mutableStateOf(null) } val newItemState = remember { mutableStateOf(NewEventState.None) } @@ -175,12 +176,18 @@ class TimelinePresenter @AssistedInject constructor( .launchIn(this) } + val timelineRoomInfo by remember { + derivedStateOf { + TimelineRoomInfo( + isDirect = room.isDirect, + userHasPermissionToSendMessage = userHasPermissionToSendMessage, + userHasPermissionToSendReaction = userHasPermissionToSendReaction, + ) + } + } return TimelineState( - timelineRoomInfo = TimelineRoomInfo( - isDirect = room.isDirect - ), + timelineRoomInfo = timelineRoomInfo, highlightedEventId = highlightedEventId.value, - userHasPermissionToSendMessage = userHasPermissionToSendMessage, paginationState = paginationState, timelineItems = timelineItems, showReadReceipts = readReceiptsEnabled, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt index d334aebf8c..abf7e626a3 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineState.kt @@ -30,7 +30,6 @@ data class TimelineState( val timelineRoomInfo: TimelineRoomInfo, val showReadReceipts: Boolean, val highlightedEventId: EventId?, - val userHasPermissionToSendMessage: Boolean, val paginationState: MatrixTimeline.PaginationState, val newEventState: NewEventState, val sessionState: SessionState, @@ -40,4 +39,6 @@ data class TimelineState( @Immutable data class TimelineRoomInfo( val isDirect: Boolean, + val userHasPermissionToSendMessage: Boolean, + val userHasPermissionToSendReaction: Boolean, ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt index 63d8f0ed01..80d98b070d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt @@ -55,7 +55,6 @@ fun aTimelineState(timelineItems: ImmutableList = persistentListOf beginningOfRoomReached = false, ), highlightedEventId = null, - userHasPermissionToSendMessage = true, newEventState = NewEventState.None, sessionState = aSessionState( isSessionVerified = true, @@ -218,4 +217,6 @@ internal fun aTimelineRoomInfo( isDirect: Boolean = false, ) = TimelineRoomInfo( isDirect = isDirect, + userHasPermissionToSendMessage = true, + userHasPermissionToSendReaction = true, ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index bc285b0bc5..137d18d8bc 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -123,7 +123,6 @@ fun TimelineView( isLastOutgoingMessage = (timelineItem as? TimelineItem.Event)?.isMine == true && state.timelineItems.first().identifier() == timelineItem.identifier(), highlightedItem = state.highlightedEventId?.value, - userHasPermissionToSendMessage = state.userHasPermissionToSendMessage, onClick = onMessageClicked, onLongClick = onMessageLongClicked, onUserDataClick = onUserDataClicked, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ATimelineItemEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ATimelineItemEventRow.kt index a2a0ae5f4e..6c65ecf828 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ATimelineItemEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ATimelineItemEventRow.kt @@ -35,7 +35,6 @@ internal fun ATimelineItemEventRow( showReadReceipts = showReadReceipts, isLastOutgoingMessage = isLastOutgoingMessage, isHighlighted = isHighlighted, - canReply = true, onClick = {}, onLongClick = {}, onUserDataClick = {}, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt index d22cfedae7..19fc7dff0d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt @@ -81,6 +81,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemTextContent +import io.element.android.features.messages.impl.timeline.model.event.canBeRepliedTo import io.element.android.features.messages.impl.timeline.model.metadata import io.element.android.libraries.androidutils.system.openUrlInExternalApp import io.element.android.libraries.designsystem.colors.AvatarColorsProvider @@ -112,7 +113,6 @@ fun TimelineItemEventRow( showReadReceipts: Boolean, isLastOutgoingMessage: Boolean, isHighlighted: Boolean, - canReply: Boolean, onClick: () -> Unit, onLongClick: () -> Unit, onUserDataClick: (UserId) -> Unit, @@ -151,6 +151,7 @@ fun TimelineItemEventRow( } else { Spacer(modifier = Modifier.height(2.dp)) } + val canReply = timelineRoomInfo.userHasPermissionToSendMessage && event.content.canBeRepliedTo() if (canReply) { val state: SwipeableActionsState = rememberSwipeableActionsState() val offset = state.offset.floatValue @@ -335,6 +336,7 @@ private fun TimelineItemEventRowContent( if (event.reactionsState.reactions.isNotEmpty()) { TimelineItemReactionsView( reactionsState = event.reactionsState, + userCanSendReaction = timelineRoomInfo.userHasPermissionToSendReaction, isOutgoing = event.isMine, onReactionClicked = onReactionClicked, onReactionLongClicked = onReactionLongClicked, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt index d52795c052..76462e35a9 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt @@ -131,7 +131,6 @@ private fun TimelineItemGroupedEventsRowContent( isLastOutgoingMessage = isLastOutgoingMessage, highlightedItem = highlightedItem, sessionState = sessionState, - userHasPermissionToSendMessage = false, onClick = onClick, onLongClick = onLongClick, inReplyToClick = inReplyToClick, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt index d30a60c7a4..60fda07d35 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt @@ -26,8 +26,8 @@ import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp import io.element.android.features.messages.impl.R -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.utils.CommonDrawables /** @@ -46,7 +46,7 @@ import io.element.android.libraries.designsystem.utils.CommonDrawables @Composable fun TimelineItemReactionsLayout( expandButton: @Composable () -> Unit, - addMoreButton: @Composable () -> Unit, + addMoreButton: (@Composable () -> Unit)?, modifier: Modifier = Modifier, itemSpacing: Dp = 0.dp, rowSpacing: Dp = 0.dp, @@ -82,21 +82,21 @@ fun TimelineItemReactionsLayout( // Used to render the collapsed state, this takes the rows inputted and adds the extra button to the last row, // removing only as many trailing reactions as needed to make space for it. - fun replaceTrailingItemsWithButtons(rowsIn: List>, expandButton: Placeable, addMoreButton: Placeable): List> { + fun replaceTrailingItemsWithButtons(rowsIn: List>, expandButton: Placeable, addMoreButton: Placeable?): List> { val rows = rowsIn.toMutableList() val lastRow = rows.last() - val buttonsWidth = expandButton.width + itemSpacing.toPx().toInt() + addMoreButton.width + val buttonsWidth = expandButton.width + itemSpacing.toPx().toInt() + (addMoreButton?.width ?: 0) var rowX = 0 lastRow.forEachIndexed { i, placeable -> val horizontalSpacing = if (i == 0) 0 else itemSpacing.toPx().toInt() rowX += placeable.width + horizontalSpacing if (rowX > constraints.maxWidth - (buttonsWidth + horizontalSpacing)) { - val lastRowWithButton = lastRow.take(i) + listOf(expandButton, addMoreButton) + val lastRowWithButton = lastRow.take(i) + listOfNotNull(expandButton, addMoreButton) rows[rows.size - 1] = lastRowWithButton return rows } } - val lastRowWithButton = lastRow + listOf(expandButton, addMoreButton) + val lastRowWithButton = lastRow + listOfNotNull(expandButton, addMoreButton) rows[rows.size - 1] = lastRowWithButton return rows } @@ -155,16 +155,15 @@ fun TimelineItemReactionsLayout( val newConstrains = constraints.copy(minHeight = maxHeight) reactionsPlaceables = subcompose(2, reactions).map { it.measure(newConstrains) } expandPlaceable = subcompose(3, expandButton).first().measure(newConstrains) - val addMorePlaceable = subcompose(4, addMoreButton).first().measure(newConstrains) - + val addMorePlaceable = addMoreButton?.let { subcompose(4, addMoreButton).first().measure(newConstrains) } // Calculate the layout of the rows with the reactions button and add more button - val reactionsAndAddMore = calculateRows(reactionsPlaceables + listOf(addMorePlaceable)) + val reactionsAndAddMore = calculateRows(reactionsPlaceables + listOfNotNull(addMorePlaceable)) // If we have extended beyond the defined number of rows we are showing the expand/collapse ui if (rowsBeforeCollapsible?.let { reactionsAndAddMore.size > it } == true) { if (expanded) { // Show all subviews with the add more button at the end - var reactionsAndButtons = calculateRows(reactionsPlaceables + listOf(expandPlaceable, addMorePlaceable)) + var reactionsAndButtons = calculateRows(reactionsPlaceables + listOfNotNull(expandPlaceable, addMorePlaceable)) reactionsAndButtons = ensureCollapseAndAddMoreButtonsAreOnTheSameRow(reactionsAndButtons) layoutRows(reactionsAndButtons) } else { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt index 764b4cdea4..0f5026f0a2 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt @@ -31,8 +31,8 @@ import io.element.android.features.messages.impl.R import io.element.android.features.messages.impl.timeline.aTimelineItemReactions import io.element.android.features.messages.impl.timeline.model.AggregatedReaction import io.element.android.features.messages.impl.timeline.model.TimelineItemReactions -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.utils.CommonDrawables import kotlinx.collections.immutable.ImmutableList @@ -40,6 +40,7 @@ import kotlinx.collections.immutable.ImmutableList fun TimelineItemReactionsView( reactionsState: TimelineItemReactions, isOutgoing: Boolean, + userCanSendReaction: Boolean, onReactionClicked: (emoji: String) -> Unit, onReactionLongClicked: (emoji: String) -> Unit, onMoreReactionsClicked: () -> Unit, @@ -49,6 +50,7 @@ fun TimelineItemReactionsView( TimelineItemReactionsView( modifier = modifier, reactions = reactionsState.reactions, + userCanSendReaction = userCanSendReaction, expanded = expanded, isOutgoing = isOutgoing, onReactionClick = onReactionClicked, @@ -61,6 +63,7 @@ fun TimelineItemReactionsView( @Composable private fun TimelineItemReactionsView( reactions: ImmutableList, + userCanSendReaction: Boolean, isOutgoing: Boolean, expanded: Boolean, onReactionClick: (emoji: String) -> Unit, @@ -93,19 +96,26 @@ private fun TimelineItemReactionsView( onLongClick = {} ) }, - addMoreButton = { - MessagesReactionButton( - content = MessagesReactionsButtonContent.Icon(CommonDrawables.ic_add_reaction), - onClick = onMoreReactionsClick, - onLongClick = {} - ) - }, + addMoreButton = if (userCanSendReaction) { + { + MessagesReactionButton( + content = MessagesReactionsButtonContent.Icon(CommonDrawables.ic_add_reaction), + onClick = onMoreReactionsClick, + onLongClick = {} + ) + } + } else null, reactions = { reactions.forEach { reaction -> CompositionLocalProvider(LocalLayoutDirection provides currentLayout) { MessagesReactionButton( content = MessagesReactionsButtonContent.Reaction(reaction = reaction), - onClick = { onReactionClick(reaction.key) }, + onClick = { + // Always allow user to redact their own reactions + if (reaction.isHighlighted || userCanSendReaction) { + onReactionClick(reaction.key) + } + }, onLongClick = { onReactionLongClick(reaction.key) } ) } @@ -157,6 +167,7 @@ private fun ContentToPreview( reactionsState = TimelineItemReactions( reactions ), + userCanSendReaction = true, isOutgoing = isOutgoing, onReactionClicked = {}, onReactionLongClicked = {}, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt index 92dbbe46b6..b7ab65e69e 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemRow.kt @@ -18,11 +18,10 @@ package io.element.android.features.messages.impl.timeline.components import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import io.element.android.features.messages.impl.timeline.TimelineRoomInfo import io.element.android.features.messages.impl.timeline.TimelineEvents +import io.element.android.features.messages.impl.timeline.TimelineRoomInfo import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateContent -import io.element.android.features.messages.impl.timeline.model.event.canBeRepliedTo import io.element.android.features.messages.impl.timeline.session.SessionState import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.UserId @@ -34,7 +33,6 @@ internal fun TimelineItemRow( showReadReceipts: Boolean, isLastOutgoingMessage: Boolean, highlightedItem: String?, - userHasPermissionToSendMessage: Boolean, sessionState: SessionState, onUserDataClick: (UserId) -> Unit, onClick: (TimelineItem.Event) -> Unit, @@ -77,7 +75,6 @@ internal fun TimelineItemRow( showReadReceipts = showReadReceipts, isLastOutgoingMessage = isLastOutgoingMessage, isHighlighted = highlightedItem == timelineItem.identifier(), - canReply = userHasPermissionToSendMessage && timelineItem.content.canBeRepliedTo(), onClick = { onClick(timelineItem) }, onLongClick = { onLongClick(timelineItem) }, onUserDataClick = onUserDataClick, From e22bb8212e5cc0c2e378deadc93afc2e7da08313 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 15:30:18 +0100 Subject: [PATCH 018/161] changelog --- changelog.d/2093.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2093.bugfix diff --git a/changelog.d/2093.bugfix b/changelog.d/2093.bugfix new file mode 100644 index 0000000000..59a6aa9b2a --- /dev/null +++ b/changelog.d/2093.bugfix @@ -0,0 +1 @@ +Disable ability to send reaction if the user does not have the permission to. From cc19bd9d0ba42e19dce47127136ebb577e4bb5f5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 15:37:08 +0100 Subject: [PATCH 019/161] Cleanup --- .../features/messages/impl/actionlist/ActionListPresenter.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 d3a4d44246..9547d57ff7 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 @@ -172,8 +172,8 @@ class ActionListPresenter @Inject constructor( } } val displayEmojiReactions = userCanSendReaction && - timelineItem.isRemote - && timelineItem.content.canReact() + timelineItem.isRemote && + timelineItem.content.canReact() if (actions.isNotEmpty() || displayEmojiReactions) { target.value = ActionListState.Target.Success( event = timelineItem, From eb63c882e154633c1c3b3b9b3e813a29b1a86b0e Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 15:39:56 +0100 Subject: [PATCH 020/161] Add comment to clarify the `SteadyException` case. --- .../io/element/android/features/logout/impl/tools/Extensions.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt index ba71b2a045..5d9858782d 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/tools/Extensions.kt @@ -23,6 +23,7 @@ internal fun BackupUploadState.isBackingUp(): Boolean { return when (this) { BackupUploadState.Waiting, is BackupUploadState.Uploading -> true + // The backup is in progress, but there have been a network issue, so we have to warn the user. is BackupUploadState.SteadyException -> exception is SteadyStateException.Connection BackupUploadState.Unknown, BackupUploadState.Done, From fcd8562bb964700d62dad54eab99602fb9340add Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 15:42:44 +0100 Subject: [PATCH 021/161] Use a RetryDialog here, it does not change the rendering, but is more appropriate. --- .../android/features/logout/impl/ui/LogoutActionDialog.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 c5a3e41e73..9baad1d1f3 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 @@ -22,7 +22,7 @@ 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.designsystem.components.ProgressDialog -import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog +import io.element.android.libraries.designsystem.components.dialogs.RetryDialog import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -36,11 +36,11 @@ fun LogoutActionDialog( is Async.Loading -> ProgressDialog(text = stringResource(id = R.string.screen_signout_in_progress_dialog_content)) is Async.Failure -> - ConfirmationDialog( + RetryDialog( title = stringResource(id = CommonStrings.dialog_title_error), content = stringResource(id = CommonStrings.error_unknown), - submitText = stringResource(id = CommonStrings.action_signout_anyway), - onSubmitClicked = onForceLogoutClicked, + retryText = stringResource(id = CommonStrings.action_signout_anyway), + onRetry = onForceLogoutClicked, onDismiss = onDismissError, ) Async.Uninitialized -> From 1d672d572ad351f1858d74418cb69d44184226f5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 15:47:42 +0100 Subject: [PATCH 022/161] Move the logic to the Node, which handles navigation. --- .../preferences/impl/root/PreferencesRootNode.kt | 9 ++++++++- .../preferences/impl/root/PreferencesRootView.kt | 9 +-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt index ee79de0cce..05d11b85f1 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootNode.kt @@ -28,6 +28,7 @@ import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode import io.element.android.compound.theme.ElementTheme +import io.element.android.features.logout.api.direct.DirectLogoutEvents import io.element.android.features.logout.api.direct.DirectLogoutView import io.element.android.libraries.androidutils.browser.openUrlInChromeCustomTab import io.element.android.libraries.di.SessionScope @@ -141,7 +142,13 @@ class PreferencesRootNode @AssistedInject constructor( onOpenNotificationSettings = this::onOpenNotificationSettings, onOpenLockScreenSettings = this::onOpenLockScreenSettings, onOpenUserProfile = this::onOpenUserProfile, - onSignOutClicked = this::onSignOutClicked, + onSignOutClicked = { + if (state.directLogoutState.canDoDirectSignOut) { + state.directLogoutState.eventSink(DirectLogoutEvents.Logout(ignoreSdkError = false)) + } else { + onSignOutClicked() + } + }, ) directLogoutView.Render( diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt index 784202a892..f25cb515e9 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/root/PreferencesRootView.kt @@ -29,7 +29,6 @@ import androidx.compose.ui.tooling.preview.PreviewParameter 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.logout.api.direct.DirectLogoutEvents import io.element.android.features.preferences.impl.R import io.element.android.features.preferences.impl.user.UserPreferences import io.element.android.libraries.designsystem.components.list.ListItemContent @@ -163,13 +162,7 @@ fun PreferencesRootView( headlineContent = { Text(stringResource(id = CommonStrings.action_signout)) }, leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_sign_out)), style = ListItemStyle.Destructive, - onClick = { - if (state.directLogoutState.canDoDirectSignOut) { - state.directLogoutState.eventSink(DirectLogoutEvents.Logout(ignoreSdkError = false)) - } else { - onSignOutClicked() - } - }, + onClick = onSignOutClicked, ) Text( modifier = Modifier From 1013fe04e111c56adc3ce0073f5d9c6de36abe15 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 16:55:58 +0100 Subject: [PATCH 023/161] Fix Maestro --- .maestro/tests/account/logout.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.maestro/tests/account/logout.yaml b/.maestro/tests/account/logout.yaml index f10d5ef364..3019f1d2c3 100644 --- a/.maestro/tests/account/logout.yaml +++ b/.maestro/tests/account/logout.yaml @@ -6,12 +6,10 @@ appId: ${APP_ID} - takeScreenshot: build/maestro/900-SignOutScreen - back - tapOn: "Sign out" -- tapOn: - id: "sign-out-submit" # Ensure cancel cancels -- tapOn: "Cancel" - tapOn: - id: "sign-out-submit" + id: "dialog-negative" +- tapOn: "Sign out" - tapOn: id: "dialog-positive" - runFlow: ../assertions/assertInitDisplayed.yaml From bf356171a3e75f94658e571d48cca725a105f252 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 13:46:30 +0100 Subject: [PATCH 024/161] Handle `MembershipChange.NONE` rendering in the timeline #2102 And avoid `else` in the when statement. --- changelog.d/2102.misc | 1 + .../impl/RoomMembershipContentFormatter.kt | 15 ++++++++++++++- .../impl/src/main/res/values/localazy.xml | 2 ++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2102.misc diff --git a/changelog.d/2102.misc b/changelog.d/2102.misc new file mode 100644 index 0000000000..87c258ef70 --- /dev/null +++ b/changelog.d/2102.misc @@ -0,0 +1 @@ +Handle `MembershipChange.NONE` rendering in the timeline. diff --git a/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/RoomMembershipContentFormatter.kt b/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/RoomMembershipContentFormatter.kt index 6a65a9bd1e..926648458f 100644 --- a/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/RoomMembershipContentFormatter.kt +++ b/libraries/eventformatter/impl/src/main/kotlin/io/element/android/libraries/eventformatter/impl/RoomMembershipContentFormatter.kt @@ -104,7 +104,20 @@ class RoomMembershipContentFormatter @Inject constructor( } else { sp.getString(R.string.state_event_room_knock_denied, senderDisplayName, userId.value) } - else -> { + MembershipChange.NONE -> if (senderIsYou) { + sp.getString(R.string.state_event_room_none_by_you) + } else { + sp.getString(R.string.state_event_room_none, senderDisplayName) + } + MembershipChange.ERROR -> { + Timber.v("Filtering timeline item for room membership: $membershipContent") + null + } + MembershipChange.NOT_IMPLEMENTED -> { + Timber.v("Filtering timeline item for room membership: $membershipContent") + null + } + null -> { Timber.v("Filtering timeline item for room membership: $membershipContent") null } diff --git a/libraries/eventformatter/impl/src/main/res/values/localazy.xml b/libraries/eventformatter/impl/src/main/res/values/localazy.xml index 03a13bd29b..525a9435fe 100644 --- a/libraries/eventformatter/impl/src/main/res/values/localazy.xml +++ b/libraries/eventformatter/impl/src/main/res/values/localazy.xml @@ -39,6 +39,8 @@ "You changed the room name to: %1$s" "%1$s removed the room name" "You removed the room name" + "%1$s made no changes" + "You made no changes" "%1$s rejected the invitation" "You rejected the invitation" "%1$s removed %2$s" From 0ba973501cb0f2fc716768ad3a4bceff6885b203 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 26 Dec 2023 16:10:07 +0100 Subject: [PATCH 025/161] Add test for `MembershipChange.NONE` --- .../DefaultRoomLastMessageFormatterTest.kt | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt b/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt index a6d0f2e776..fa83c65139 100644 --- a/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt +++ b/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt @@ -469,10 +469,26 @@ class DefaultRoomLastMessageFormatterTest { assertThat(someoneDeniedYourKnock).isEqualTo("$otherName rejected your request to join") } + @Test + @Config(qualifiers = "en") + fun `Membership change - None`() { + val otherName = "Someone" + val youContent = RoomMembershipContent(A_USER_ID, MembershipChange.NONE) + val someoneContent = RoomMembershipContent(UserId("@someone_else:domain"), MembershipChange.NONE) + + val youNoneRoomEvent = createRoomEvent(sentByYou = true, senderDisplayName = null, content = youContent) + val youNoneRoom = formatter.format(youNoneRoomEvent, false) + assertThat(youNoneRoom).isEqualTo("You made no changes") + + val someoneNoneRoomEvent = createRoomEvent(sentByYou = false, senderDisplayName = otherName, content = someoneContent) + val someoneNoneRoom = formatter.format(someoneNoneRoomEvent, false) + assertThat(someoneNoneRoom).isEqualTo("$otherName made no changes") + } + @Test @Config(qualifiers = "en") fun `Membership change - others`() { - val otherChanges = arrayOf(MembershipChange.NONE, MembershipChange.ERROR, MembershipChange.NOT_IMPLEMENTED) + val otherChanges = arrayOf(MembershipChange.ERROR, MembershipChange.NOT_IMPLEMENTED) val results = otherChanges.map { change -> val content = RoomMembershipContent(A_USER_ID, change) From 4c3c3607ef4deb1eed1af6c09b022cfc7b8a7328 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 09:31:13 +0100 Subject: [PATCH 026/161] Add missing test case. --- .../eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt b/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt index fa83c65139..58c48808a6 100644 --- a/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt +++ b/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt @@ -488,7 +488,7 @@ class DefaultRoomLastMessageFormatterTest { @Test @Config(qualifiers = "en") fun `Membership change - others`() { - val otherChanges = arrayOf(MembershipChange.ERROR, MembershipChange.NOT_IMPLEMENTED) + val otherChanges = arrayOf(MembershipChange.ERROR, MembershipChange.NOT_IMPLEMENTED, null) val results = otherChanges.map { change -> val content = RoomMembershipContent(A_USER_ID, change) From 770668589b55ddd33cb2339a360af86eea2d429c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 28 Dec 2023 12:03:23 +0100 Subject: [PATCH 027/161] Add build script for the RTE library --- features/messages/impl/build.gradle.kts | 1 - libraries/textcomposer/impl/build.gradle.kts | 9 ++- libraries/textcomposer/lib/.gitignore | 2 + libraries/textcomposer/lib/build.gradle.kts | 3 + tools/rte/build_rte.sh | 77 ++++++++++++++++++++ 5 files changed, 89 insertions(+), 3 deletions(-) create mode 100644 libraries/textcomposer/lib/.gitignore create mode 100644 libraries/textcomposer/lib/build.gradle.kts create mode 100755 tools/rte/build_rte.sh diff --git a/features/messages/impl/build.gradle.kts b/features/messages/impl/build.gradle.kts index 21d39de816..4428103105 100644 --- a/features/messages/impl/build.gradle.kts +++ b/features/messages/impl/build.gradle.kts @@ -74,7 +74,6 @@ dependencies { implementation(libs.vanniktech.blurhash) implementation(libs.telephoto.zoomableimage) implementation(libs.matrix.emojibase.bindings) - api(libs.matrix.richtexteditor.compose) testImplementation(libs.test.junit) testImplementation(libs.coroutines.test) diff --git a/libraries/textcomposer/impl/build.gradle.kts b/libraries/textcomposer/impl/build.gradle.kts index 6cce2b855d..8ac2172649 100644 --- a/libraries/textcomposer/impl/build.gradle.kts +++ b/libraries/textcomposer/impl/build.gradle.kts @@ -34,8 +34,13 @@ dependencies { implementation(projects.libraries.testtags) implementation(projects.libraries.uiUtils) - api(libs.matrix.richtexteditor) - api(libs.matrix.richtexteditor.compose) + if (file("${rootDir.path}/libraries/textcomposer/lib/library-compose.aar").exists()) { + println("\nNote: Using local binaries of the Rich Text Editor.\n") + debugApi(projects.libraries.textcomposer.lib) + } else { + debugApi(libs.matrix.richtexteditor) + debugApi(libs.matrix.richtexteditor.compose) + } ksp(libs.showkase.processor) diff --git a/libraries/textcomposer/lib/.gitignore b/libraries/textcomposer/lib/.gitignore new file mode 100644 index 0000000000..67f29a6964 --- /dev/null +++ b/libraries/textcomposer/lib/.gitignore @@ -0,0 +1,2 @@ +# Built application files +*.aar diff --git a/libraries/textcomposer/lib/build.gradle.kts b/libraries/textcomposer/lib/build.gradle.kts new file mode 100644 index 0000000000..3fbff24e20 --- /dev/null +++ b/libraries/textcomposer/lib/build.gradle.kts @@ -0,0 +1,3 @@ +configurations.maybeCreate("default") +artifacts.add("default", file("library.aar")) +artifacts.add("default", file("library-compose.aar")) diff --git a/tools/rte/build_rte.sh b/tools/rte/build_rte.sh new file mode 100755 index 0000000000..36f5b776ab --- /dev/null +++ b/tools/rte/build_rte.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +# Exit on error +set -e + +# Ask to build from local source or to clone the repository +read -p "Do you want to build the RTE from local source (yes/no) default to yes? " buildLocal +buildLocal=${buildLocal:-yes} + +date=$(gdate +%Y%m%d%H%M%S) +elementPwd=`pwd` + +# Ask for the RTE local source path +# if folder rte/ exists, use it as default +if [ ${buildLocal} == "yes" ]; then + read -p "Please enter the path to the Rust SDK local source, default to ../matrix-rich-text-editor: " rtePath + rtePath=${rtePath:-../matrix-rich-text-editor/} + if [ ! -d "${rtePath}" ]; then + printf "\nFolder ${rtePath} does not exist. Please clone the matrix-rich-text-editor repository in the folder ../matrix-rich-text-editor.\n\n" + exit 0 + fi +else + read -p "Please enter the RTE repository url, default to https://github.com/matrix-org/matrix-rich-text-editor.git " rteUrl + rteUrl=${rteUrl:-https://github.com/matrix-org/matrix-rich-text-editor.git} + read -p "Please enter the Rust SDK branch, default to main " rteBranch + rteBranch=${rteBranch:-main} + cd .. + git clone ${rteUrl} matrix-rich-text-editor-$date + cd matrix-rich-text-editor-$date + git checkout ${rteBranch} + rtePath=$(pwd) + cd ${elementPwd} +fi + + +cd ${rtePath} +git status + +read -p "Will build with this version of the RTE ^. Is it correct (yes/no) default to yes? " rteCorrect +rteCorrect=${rteCorrect:-yes} + +if [ ${rteCorrect} != "yes" ]; then + exit 0 +fi + +# Ask if the user wants to build the app after +read -p "Do you want to build the app after (yes/no) default to yes? " buildApp +buildApp=${buildApp:-yes} + +cd ${elementPwd} + +cd $rtePath + +printf "\nBuilding the RTE for aarch64...\n\n" +make android-bindings-aarch64 +cd platforms/android +./gradlew :library-compose:assembleRelease +cp ./library/build/outputs/aar/library-release.aar $elementPwd/libraries/textcomposer/lib/library.aar +cp ./library-compose/build/outputs/aar/library-compose-release.aar $elementPwd/libraries/textcomposer/lib/library-compose.aar + +cd ${elementPwd} +mkdir -p ./libraries/textcomposer/lib/versions +cp ./libraries/textcomposer/lib/library.aar ./libraries/textcomposer/lib/versions/library-${date}.aar +cp ./libraries/textcomposer/lib/library-compose.aar ./libraries/textcomposer/lib/versions/library-compose-${date}.aar + + +if [ ${buildApp} == "yes" ]; then + printf "\nBuilding the application...\n\n" + ./gradlew assembleDebug +fi + +if [ ${buildLocal} == "no" ]; then + printf "\nCleaning up...\n\n" + rm -rf ../matrix-rich-text-editor-$date +fi + +printf "\nDone!\n" From 0bf14ca7c3759d33139083f234f1c14d271f08b1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 11:39:27 +0100 Subject: [PATCH 028/161] Add configuration for suppressKotlinVersionCompatibilityCheck (commented out) --- build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 1a19007a28..6705c5a870 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -100,6 +100,16 @@ allprojects { // You can override by passing `-PallWarningsAsErrors=true` in the command line // Or add a line with "allWarningsAsErrors=true" in your ~/.gradle/gradle.properties file kotlinOptions.allWarningsAsErrors = project.properties["allWarningsAsErrors"] == "true" + + kotlinOptions { + // Uncomment to suppress Compose Kotlin compiler compatibility warning + /* + freeCompilerArgs += listOf( + "-P", + "plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true" + ) + */ + } } // Detect unused dependencies From d9fb5ce00795a504ee0c60ef5552aa3f593e4512 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:00:25 +0100 Subject: [PATCH 029/161] Remove now useless ExperimentalLayoutApi opt in --- .../io/element/android/appnav/room/LoadingRoomNodeView.kt | 2 -- .../features/createroom/impl/addpeople/AddPeopleView.kt | 4 +--- .../createroom/impl/configureroom/ConfigureRoomView.kt | 7 +++---- .../features/createroom/impl/root/CreateRoomRootView.kt | 4 +--- .../android/features/invitelist/impl/InviteListView.kt | 7 +++---- .../features/location/impl/show/ShowLocationView.kt | 3 +-- .../changeaccountprovider/ChangeAccountProviderView.kt | 3 +-- .../login/impl/screens/loginpassword/LoginPasswordView.kt | 3 +-- .../features/messages/impl/report/ReportMessageView.kt | 3 +-- .../roomdetails/impl/members/RoomMemberListView.kt | 6 ++---- .../element/android/features/roomlist/impl/RoomListView.kt | 3 +-- .../roomlist/impl/search/RoomListSearchResultView.kt | 3 +-- 12 files changed, 16 insertions(+), 32 deletions(-) diff --git a/appnav/src/main/kotlin/io/element/android/appnav/room/LoadingRoomNodeView.kt b/appnav/src/main/kotlin/io/element/android/appnav/room/LoadingRoomNodeView.kt index 69a5e9c8a2..26d69cc213 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/room/LoadingRoomNodeView.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/room/LoadingRoomNodeView.kt @@ -18,7 +18,6 @@ package io.element.android.appnav.room import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize @@ -43,7 +42,6 @@ import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.ui.strings.CommonStrings -@OptIn(ExperimentalLayoutApi::class) @Composable fun LoadingRoomNodeView( state: LoadingRoomState, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleView.kt index 1a8540cd0e..147020fddb 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleView.kt @@ -17,7 +17,6 @@ package io.element.android.features.createroom.impl.addpeople import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -27,6 +26,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter +import io.element.android.compound.theme.ElementTheme import io.element.android.features.createroom.impl.R import io.element.android.features.createroom.impl.components.UserListView import io.element.android.features.createroom.impl.userlist.UserListEvents @@ -39,10 +39,8 @@ import io.element.android.libraries.designsystem.theme.components.Scaffold import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TextButton import io.element.android.libraries.designsystem.theme.components.TopAppBar -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings -@OptIn(ExperimentalLayoutApi::class) @Composable fun AddPeopleView( state: UserListState, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt index bf407dd4ec..f979239b4c 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt @@ -21,7 +21,6 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.gestures.detectTapGestures import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.consumeWindowInsets @@ -46,6 +45,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.KeyboardCapitalization 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.createroom.impl.R import io.element.android.features.createroom.impl.components.RoomPrivacyOption import io.element.android.libraries.designsystem.components.LabelledTextField @@ -63,11 +63,10 @@ import io.element.android.libraries.matrix.ui.components.AvatarActionBottomSheet import io.element.android.libraries.matrix.ui.components.SelectedUsersList import io.element.android.libraries.matrix.ui.components.UnsavedAvatar import io.element.android.libraries.permissions.api.PermissionsView -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.coroutines.launch -@OptIn(ExperimentalLayoutApi::class, ExperimentalMaterialApi::class) +@OptIn(ExperimentalMaterialApi::class) @Composable fun ConfigureRoomView( state: ConfigureRoomState, @@ -153,7 +152,7 @@ fun ConfigureRoomView( async = state.createRoomAction, progressText = stringResource(CommonStrings.common_creating_room), onSuccess = { onRoomCreated(it) }, - errorMessage = { stringResource(R.string.screen_create_room_error_creating_room) }, + errorMessage = { stringResource(R.string.screen_create_room_error_creating_room) }, onRetry = { state.eventSink(ConfigureRoomEvents.CreateRoom(state.config)) }, onErrorDismiss = { state.eventSink(ConfigureRoomEvents.CancelCreateRoom) }, ) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt index d1b910dae2..0acf9d2343 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt @@ -20,7 +20,6 @@ import androidx.annotation.DrawableRes import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxWidth @@ -37,11 +36,11 @@ import androidx.compose.ui.tooling.preview.PreviewParameter 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.libraries.designsystem.icons.CompoundDrawables import io.element.android.features.createroom.impl.R import io.element.android.features.createroom.impl.components.UserListView import io.element.android.libraries.designsystem.components.async.AsyncView import io.element.android.libraries.designsystem.components.button.BackButton +import io.element.android.libraries.designsystem.icons.CompoundDrawables import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.aliasScreenTitle @@ -52,7 +51,6 @@ import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.ui.strings.CommonStrings -@OptIn(ExperimentalLayoutApi::class) @Composable fun CreateRoomRootView( state: CreateRoomRootState, 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 e661b121c9..c831024448 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 @@ -17,7 +17,6 @@ package io.element.android.features.invitelist.impl import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxWidth @@ -34,20 +33,20 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign 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.designsystem.components.button.BackButton 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.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.aliasScreenTitle import io.element.android.libraries.designsystem.theme.components.HorizontalDivider import io.element.android.libraries.designsystem.theme.components.Scaffold import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.matrix.api.core.RoomId -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -109,7 +108,7 @@ fun InviteListView( } } -@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable private fun InviteListContent( state: InviteListState, diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt index 999c2ee36a..85575197ed 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/show/ShowLocationView.kt @@ -17,7 +17,6 @@ package io.element.android.features.location.impl.show import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -64,7 +63,7 @@ import io.element.android.libraries.maplibre.compose.rememberSymbolState import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.toImmutableMap -@OptIn(ExperimentalLayoutApi::class, ExperimentalMaterial3Api::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable fun ShowLocationView( state: ShowLocationState, diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/changeaccountprovider/ChangeAccountProviderView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/changeaccountprovider/ChangeAccountProviderView.kt index 8f5292b5a6..5daf4e8f1c 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/changeaccountprovider/ChangeAccountProviderView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/screens/changeaccountprovider/ChangeAccountProviderView.kt @@ -14,13 +14,12 @@ * limitations under the License. */ -@file:OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@file:OptIn(ExperimentalMaterial3Api::class) package io.element.android.features.login.impl.screens.changeaccountprovider import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize 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 303ffdae52..9a5735fe10 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 @@ -17,7 +17,6 @@ package io.element.android.features.login.impl.screens.loginpassword import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize @@ -75,7 +74,7 @@ import io.element.android.libraries.testtags.TestTags import io.element.android.libraries.testtags.testTag import io.element.android.libraries.ui.strings.CommonStrings -@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable fun LoginPasswordView( state: LoginPasswordState, 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 8ec2b8be03..6642ad4b55 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 @@ -18,7 +18,6 @@ package io.element.android.features.messages.impl.report import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.consumeWindowInsets @@ -55,7 +54,7 @@ import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.ui.strings.CommonStrings -@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable fun ReportMessageView( state: ReportMessageState, 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 0e48a95ec1..49de90a854 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 @@ -20,7 +20,6 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth @@ -38,12 +37,13 @@ import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource 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.designsystem.components.avatar.AvatarSize import io.element.android.libraries.designsystem.components.button.BackButton -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.theme.aliasScreenTitle import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator import io.element.android.libraries.designsystem.theme.components.Scaffold @@ -56,11 +56,9 @@ import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.room.RoomMember import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.ui.components.MatrixUserRow -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList -@OptIn(ExperimentalLayoutApi::class) @Composable fun RoomMemberListView( state: RoomMemberListState, diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt index 42192a3376..0a9f4f523b 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListView.kt @@ -18,7 +18,6 @@ package io.element.android.features.roomlist.impl import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize @@ -123,7 +122,7 @@ fun RoomListView( } } -@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable private fun RoomListContent( state: RoomListState, diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/search/RoomListSearchResultView.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/search/RoomListSearchResultView.kt index 668c3b96bd..e05f0a3ac5 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/search/RoomListSearchResultView.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/search/RoomListSearchResultView.kt @@ -20,7 +20,6 @@ import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding @@ -98,7 +97,7 @@ internal fun RoomListSearchResultView( } } -@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@OptIn(ExperimentalMaterial3Api::class) @Composable private fun RoomListSearchResultContent( state: RoomListState, From 61ae9cae6f6fb07a91672032f5554bcfa2f8bde7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:03:22 +0100 Subject: [PATCH 030/161] Upgrade knit to 0.5.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3aca91810e..befe260060 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -219,7 +219,7 @@ paparazzi = "app.cash.paparazzi:1.3.1" kover = "org.jetbrains.kotlinx.kover:0.6.1" sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } firebaseAppDistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppDistribution" } -knit = { id = "org.jetbrains.kotlinx.knit", version = "0.4.0" } +knit = { id = "org.jetbrains.kotlinx.knit", version = "0.5.0" } # Version '4.3.1.3277' introduced some regressions in CI time (more than 2x slower), so make sure # this is no longer the case before upgrading. From c4de849a2b32a5b2cc308725e71ad27138bec6ed Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:03:46 +0100 Subject: [PATCH 031/161] Update datetime to 0.5.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index befe260060..95e8134cb4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -34,7 +34,7 @@ test_core = "1.5.0" #other coil = "2.5.0" -datetime = "0.4.1" +datetime = "0.5.0" serialization_json = "1.6.1" showkase = "1.0.2" appyx = "1.4.0" From 3e40d30701db0458611217acbf81f955b49c3ede Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:04:05 +0100 Subject: [PATCH 032/161] Update json to 1.6.2 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 95e8134cb4..7e725f3ab9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,7 +35,7 @@ test_core = "1.5.0" #other coil = "2.5.0" datetime = "0.5.0" -serialization_json = "1.6.1" +serialization_json = "1.6.2" showkase = "1.0.2" appyx = "1.4.0" sqldelight = "2.0.1" From 0cf5d3b55eeda66c61acdeb5f732887406f3f589 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:06:03 +0100 Subject: [PATCH 033/161] Fix issue in doc (detected with knit 0.5.0) --- docs/integration_tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integration_tests.md b/docs/integration_tests.md index b5a830e7ff..dbd3ce2b68 100644 --- a/docs/integration_tests.md +++ b/docs/integration_tests.md @@ -8,7 +8,7 @@ * [Stop Synapse](#stop-synapse) * [Troubleshoot](#troubleshoot) * [Android Emulator does cannot reach the homeserver](#android-emulator-does-cannot-reach-the-homeserver) - * [Tests partially run but some fail with "Unable to contact localhost:8080"](#tests-partially-run-but-some-fail-with-"unable-to-contact-localhost:8080") + * [Tests partially run but some fail with "Unable to contact localhost:8080"](#tests-partially-run-but-some-fail-with-"unable-to-contact-localhost8080") * [virtualenv command fails](#virtualenv-command-fails) From 4ec118d45dea6ff789442e04063f18e8b851f0a9 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:07:03 +0100 Subject: [PATCH 034/161] Update kotlinx-collections-immutable to 0.3.7 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7e725f3ab9..0f6ec8f8f4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -143,7 +143,7 @@ coil_test = { module = "io.coil-kt:coil-test", version.ref = "coil" } compound = { module = "io.element.android:compound-android", version = "0.0.2" } datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "datetime" } serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_json" } -kotlinx_collections_immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.6" +kotlinx_collections_immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.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.1" From a71b0ed0675d63d0dd0559b645c7e890b160cb91 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:32:40 +0100 Subject: [PATCH 035/161] Kotlin 1.9.21 and compose compiler 1.5.7 --- gradle/libs.versions.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 0f6ec8f8f4..9195a029c1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,8 +6,8 @@ # 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" -kotlin = "1.9.20" -ksp = "1.9.20-1.0.14" +kotlin = "1.9.21" +ksp = "1.9.21-1.0.16" firebaseAppDistribution = "4.0.1" # AndroidX @@ -21,7 +21,7 @@ media3 = "1.2.0" # Compose compose_bom = "2023.10.01" -composecompiler = "1.5.4" +composecompiler = "1.5.7" # Coroutines coroutines = "1.7.3" From 88d99d6623982863285ae855d553d5482ec17168 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 12:36:07 +0100 Subject: [PATCH 036/161] Fix compilation issue with compose compiler 1.5.7 --- .../createroom/impl/root/CreateRoomRootNode.kt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt index 597c5d0d01..4cb4ea21e6 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootNode.kt @@ -48,14 +48,12 @@ class CreateRoomRootNode @AssistedInject constructor( fun onStartChatSuccess(roomId: RoomId) } - private val callback = object : Callback { - override fun onCreateNewRoom() { - plugins().forEach { it.onCreateNewRoom() } - } + private fun onCreateNewRoom() { + plugins().forEach { it.onCreateNewRoom() } + } - override fun onStartChatSuccess(roomId: RoomId) { - plugins().forEach { it.onStartChatSuccess(roomId) } - } + private fun onStartChatSuccess(roomId: RoomId) { + plugins().forEach { it.onStartChatSuccess(roomId) } } init { @@ -72,8 +70,8 @@ class CreateRoomRootNode @AssistedInject constructor( state = state, modifier = modifier, onClosePressed = this::navigateUp, - onNewRoomClicked = callback::onCreateNewRoom, - onOpenDM = callback::onStartChatSuccess, + onNewRoomClicked = ::onCreateNewRoom, + onOpenDM = ::onStartChatSuccess, onInviteFriendsClicked = { invitePeople(activity) } ) } From 416a56faa36bf1fa48716f8182d4ee7f39d34cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 28 Dec 2023 15:20:28 +0100 Subject: [PATCH 037/161] Fix release build --- libraries/textcomposer/impl/build.gradle.kts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/textcomposer/impl/build.gradle.kts b/libraries/textcomposer/impl/build.gradle.kts index 8ac2172649..0bbb508b3c 100644 --- a/libraries/textcomposer/impl/build.gradle.kts +++ b/libraries/textcomposer/impl/build.gradle.kts @@ -34,6 +34,8 @@ dependencies { implementation(projects.libraries.testtags) implementation(projects.libraries.uiUtils) + releaseApi(libs.matrix.richtexteditor) + releaseApi(libs.matrix.richtexteditor.compose) if (file("${rootDir.path}/libraries/textcomposer/lib/library-compose.aar").exists()) { println("\nNote: Using local binaries of the Rich Text Editor.\n") debugApi(projects.libraries.textcomposer.lib) From 521d4a19838ec8126ce0402b34bf2752086c9525 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 28 Dec 2023 16:33:53 +0100 Subject: [PATCH 038/161] Add missing test for SecureBackupEnablePresenter --- .../enable/SecureBackupEnablePresenterTest.kt | 21 +++++++++++++++++++ .../test/encryption/FakeEncryptionService.kt | 7 +++++++ 2 files changed, 28 insertions(+) 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 5aa223cf93..7bc051662b 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 @@ -22,6 +22,7 @@ import app.cash.turbine.test import com.google.common.truth.Truth.assertThat import io.element.android.libraries.architecture.Async 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 import io.element.android.tests.testutils.WarmUpRule import kotlinx.coroutines.test.runTest @@ -58,6 +59,26 @@ class SecureBackupEnablePresenterTest { } } + @Test + fun `present - user enable backup with error`() = runTest { + val encryptionService = FakeEncryptionService() + encryptionService.givenEnableBackupsFailure(AN_EXCEPTION) + val presenter = createPresenter(encryptionService = encryptionService) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + val initialState = awaitItem() + initialState.eventSink(SecureBackupEnableEvents.EnableBackup) + val loadingState = awaitItem() + assertThat(loadingState.enableAction).isInstanceOf(Async.Loading::class.java) + val errorState = awaitItem() + assertThat(errorState.enableAction).isEqualTo(Async.Failure(AN_EXCEPTION)) + errorState.eventSink(SecureBackupEnableEvents.DismissDialog) + val finalState = awaitItem() + assertThat(finalState.enableAction).isEqualTo(Async.Uninitialized) + } + } + private fun createPresenter( encryptionService: EncryptionService = FakeEncryptionService(), ) = SecureBackupEnablePresenter( diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt index aafb2e8074..fe13d9766d 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/encryption/FakeEncryptionService.kt @@ -36,7 +36,14 @@ class FakeEncryptionService : EncryptionService { private var recoverFailure: Exception? = null private var doesBackupExistOnServerResult: Result = Result.success(true) + private var enableBackupsFailure: Exception? = null + + fun givenEnableBackupsFailure(exception: Exception?) { + enableBackupsFailure = exception + } + override suspend fun enableBackups(): Result = simulateLongTask { + enableBackupsFailure?.let { return Result.failure(it) } return Result.success(Unit) } From 0e19c2f2c8da97e3f74c69c1907bc76c701a195a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 28 Dec 2023 12:54:16 +0100 Subject: [PATCH 039/161] Only apply dependencyanalysis plugin to some modules --- build.gradle.kts | 5 ----- gradle.properties | 3 +++ gradle/libs.versions.toml | 5 +++-- plugins/build.gradle.kts | 1 + .../kotlin/io.element.android-compose-application.gradle.kts | 1 + .../kotlin/io.element.android-compose-library.gradle.kts | 1 + .../src/main/kotlin/io.element.android-library.gradle.kts | 1 + 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6705c5a870..4356d1ac1e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -111,11 +111,6 @@ allprojects { */ } } - - // Detect unused dependencies - apply { - plugin("com.autonomousapps.dependency-analysis") - } } // See https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin/wiki/Customizing-plugin-behavior diff --git a/gradle.properties b/gradle.properties index 0ece8f4e8c..959d1bc05c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -56,3 +56,6 @@ android.experimental.enableTestFixtures=true # Create BuildConfig files as bytecode to avoid Java compilation phase android.enableBuildConfigAsBytecode=true + +# By default, the plugin applies itself to all subprojects, but we don't want that as it would cause issues with builds using local AARs +dependency.analysis.autoapply=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9195a029c1..1f47d63f5a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -35,6 +35,7 @@ test_core = "1.5.0" #other coil = "2.5.0" datetime = "0.5.0" +dependencyAnalysis = "1.28.0" serialization_json = "1.6.2" showkase = "1.0.2" appyx = "1.4.0" @@ -63,6 +64,7 @@ gms_google_services = "com.google.gms:google-services:4.4.0" # https://firebase.google.com/docs/android/setup#available-libraries google_firebase_bom = "com.google.firebase:firebase-bom:32.7.0" firebase_appdistribution_gradle = { module = "com.google.firebase:firebase-appdistribution-gradle", version.ref = "firebaseAppDistribution" } +autonomousapps_dependencyanalysis_plugin = { module = "com.autonomousapps:dependency-analysis-gradle-plugin", version.ref = "dependencyAnalysis" } # AndroidX androidx_core = { module = "androidx.core:core", version.ref = "core" } @@ -213,8 +215,7 @@ detekt = "io.gitlab.arturbosch.detekt:1.23.4" ktlint = "org.jlleitschuh.gradle.ktlint:12.0.3" dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12" dependencycheck = "org.owasp.dependencycheck:9.0.7" -# DO NOT UPGRADE FOR NOW! This causes the build to fail with local AAR versions of the Rust SDK -dependencyanalysis = "com.autonomousapps.dependency-analysis:1.27.0" +dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" } paparazzi = "app.cash.paparazzi:1.3.1" kover = "org.jetbrains.kotlinx.kover:0.6.1" sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } diff --git a/plugins/build.gradle.kts b/plugins/build.gradle.kts index c820902905..78500f5a15 100644 --- a/plugins/build.gradle.kts +++ b/plugins/build.gradle.kts @@ -29,4 +29,5 @@ dependencies { implementation(platform(libs.google.firebase.bom)) implementation(libs.firebase.appdistribution.gradle) implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) + implementation(libs.autonomousapps.dependencyanalysis.plugin) } diff --git a/plugins/src/main/kotlin/io.element.android-compose-application.gradle.kts b/plugins/src/main/kotlin/io.element.android-compose-application.gradle.kts index 80bc0f884e..2ac8fb8b72 100644 --- a/plugins/src/main/kotlin/io.element.android-compose-application.gradle.kts +++ b/plugins/src/main/kotlin/io.element.android-compose-application.gradle.kts @@ -27,6 +27,7 @@ val libs = the() plugins { id("com.android.application") id("kotlin-android") + id("com.autonomousapps.dependency-analysis") } android { diff --git a/plugins/src/main/kotlin/io.element.android-compose-library.gradle.kts b/plugins/src/main/kotlin/io.element.android-compose-library.gradle.kts index 3194505e4e..3176856339 100644 --- a/plugins/src/main/kotlin/io.element.android-compose-library.gradle.kts +++ b/plugins/src/main/kotlin/io.element.android-compose-library.gradle.kts @@ -27,6 +27,7 @@ val libs = the() plugins { id("com.android.library") id("kotlin-android") + id("com.autonomousapps.dependency-analysis") } android { diff --git a/plugins/src/main/kotlin/io.element.android-library.gradle.kts b/plugins/src/main/kotlin/io.element.android-library.gradle.kts index f3a84031e6..572168b0c4 100644 --- a/plugins/src/main/kotlin/io.element.android-library.gradle.kts +++ b/plugins/src/main/kotlin/io.element.android-library.gradle.kts @@ -25,6 +25,7 @@ val libs = the() plugins { id("com.android.library") id("kotlin-android") + id("com.autonomousapps.dependency-analysis") } android { From 4c8c63db5933d2d9da0dbcd0456058d751d48b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 28 Dec 2023 14:28:14 +0100 Subject: [PATCH 040/161] Add changelog --- .../+only-apply-dependency-analysis-plugin-where-needed.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc diff --git a/changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc b/changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc new file mode 100644 index 0000000000..cfa053dc90 --- /dev/null +++ b/changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc @@ -0,0 +1 @@ +Only apply `com.autonomousapps.dependency-analysis` plugin in those modules that need it. From 67bd7f81af5bd6a7b10940dcce3dfc8f0c4eba6a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 28 Dec 2023 16:06:19 +0000 Subject: [PATCH 041/161] Update wysiwyg to v2.23.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9195a029c1..d9ef6427a6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -39,7 +39,7 @@ serialization_json = "1.6.2" showkase = "1.0.2" appyx = "1.4.0" sqldelight = "2.0.1" -wysiwyg = "2.22.0" +wysiwyg = "2.23.0" # DI dagger = "2.49" From 6bfbd276745570d6c1ca60dd5f6f9d9ccffc6b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 28 Dec 2023 17:52:29 +0100 Subject: [PATCH 042/161] Build `library` module too and make sure to build from scratch --- tools/rte/build_rte.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/rte/build_rte.sh b/tools/rte/build_rte.sh index 36f5b776ab..7dda29fa3c 100755 --- a/tools/rte/build_rte.sh +++ b/tools/rte/build_rte.sh @@ -54,7 +54,7 @@ cd $rtePath printf "\nBuilding the RTE for aarch64...\n\n" make android-bindings-aarch64 cd platforms/android -./gradlew :library-compose:assembleRelease +./gradlew clean :library:assembleRelease :library-compose:assembleRelease cp ./library/build/outputs/aar/library-release.aar $elementPwd/libraries/textcomposer/lib/library.aar cp ./library-compose/build/outputs/aar/library-compose-release.aar $elementPwd/libraries/textcomposer/lib/library-compose.aar From 9346b261fad4f46b1471dbf73443a79fee1db8ec Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 03:43:20 +0000 Subject: [PATCH 043/161] Update dependency org.jsoup:jsoup to v1.17.2 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1f47d63f5a..4a6873ee28 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -148,7 +148,7 @@ serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-jso kotlinx_collections_immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.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.1" +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" timber = "com.jakewharton.timber:timber:5.0.1" From 98955a27723bbc6e840b3450beafa0a1f683a32b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 29 Dec 2023 11:41:07 +0000 Subject: [PATCH 044/161] Update dependency org.matrix.rustcomponents:sdk-android to v0.1.83 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1f47d63f5a..707fde13e1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -152,7 +152,7 @@ jsoup = "org.jsoup:jsoup:1.17.1" appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" } molecule-runtime = "app.cash.molecule:molecule-runtime:1.3.1" timber = "com.jakewharton.timber:timber:5.0.1" -matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.1.82" +matrix_sdk = "org.matrix.rustcomponents:sdk-android:0.1.83" matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" } matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" } sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" } From 4f296ffb494c3265e48836afff1791c77ac84b3e Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Fri, 29 Dec 2023 12:41:08 +0100 Subject: [PATCH 045/161] Disable vector XML rasterisation on API 23 (#2128) * Disable vector XML rasterisation on API 23 --------- Co-authored-by: ElementBot --- app/build.gradle.kts | 4 ---- changelog.d/2124.bugfix | 1 + gradle/libs.versions.toml | 2 +- .../android/libraries/designsystem/icons/IconsList.kt | 2 +- .../main/res/drawable/{ic_plus.xml => ic_plus_composer.xml} | 0 .../textcomposer/components/ComposerOptionsButton.kt | 2 +- plugins/src/main/kotlin/extension/CommonExtension.kt | 5 +++++ samples/minimal/build.gradle.kts | 3 --- ...ull_CreateRoomRootView-Day-4_4_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...l_CreateRoomRootView-Night-4_5_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...pound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...und_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...onsOther_null_IconsOther-Day_0_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...sOther_null_IconsOther-Night_1_null_0,NEXUS_5,1.0,en].png | 4 ++-- 14 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 changelog.d/2124.bugfix rename libraries/designsystem/src/main/res/drawable/{ic_plus.xml => ic_plus_composer.xml} (100%) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f936e991fc..91f924af91 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -43,10 +43,6 @@ android { versionCode = Versions.versionCode versionName = Versions.versionName - vectorDrawables { - useSupportLibrary = true - } - // Keep abiFilter for the universalApk ndk { abiFilters += listOf("armeabi-v7a", "x86", "arm64-v8a", "x86_64") diff --git a/changelog.d/2124.bugfix b/changelog.d/2124.bugfix new file mode 100644 index 0000000000..1b81e44093 --- /dev/null +++ b/changelog.d/2124.bugfix @@ -0,0 +1 @@ +Disable rasterisation of Vector XMLs, which was causing crashes on API 23. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1f47d63f5a..91253fac21 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -142,7 +142,7 @@ coil = { module = "io.coil-kt:coil", version.ref = "coil" } coil_compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" } coil_gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" } coil_test = { module = "io.coil-kt:coil-test", version.ref = "coil" } -compound = { module = "io.element.android:compound-android", version = "0.0.2" } +compound = { module = "io.element.android:compound-android", version = "0.0.3" } datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "datetime" } serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization_json" } kotlinx_collections_immutable = "org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7" diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt index cd7e36d611..748f6dcd32 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsList.kt @@ -41,7 +41,7 @@ internal val iconsOther = listOf( R.drawable.ic_location_navigator_centered, R.drawable.ic_new_message, R.drawable.ic_numbered_list, - R.drawable.ic_plus, + R.drawable.ic_plus_composer, R.drawable.ic_quote, R.drawable.ic_reply, R.drawable.ic_retry, diff --git a/libraries/designsystem/src/main/res/drawable/ic_plus.xml b/libraries/designsystem/src/main/res/drawable/ic_plus_composer.xml similarity index 100% rename from libraries/designsystem/src/main/res/drawable/ic_plus.xml rename to libraries/designsystem/src/main/res/drawable/ic_plus_composer.xml diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt index c833b46b23..c11516558e 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt @@ -41,7 +41,7 @@ internal fun ComposerOptionsButton( ) { Icon( modifier = Modifier.size(30.dp), - resourceId = CommonDrawables.ic_plus, + resourceId = CommonDrawables.ic_plus_composer, contentDescription = stringResource(R.string.rich_text_editor_a11y_add_attachment), tint = ElementTheme.colors.iconPrimary, ) diff --git a/plugins/src/main/kotlin/extension/CommonExtension.kt b/plugins/src/main/kotlin/extension/CommonExtension.kt index 9e903e9057..4f7a097e0f 100644 --- a/plugins/src/main/kotlin/extension/CommonExtension.kt +++ b/plugins/src/main/kotlin/extension/CommonExtension.kt @@ -28,6 +28,11 @@ fun CommonExtension<*, *, *, *, *>.androidConfig(project: Project) { compileSdk = Versions.compileSdk minSdk = Versions.minSdk testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + + vectorDrawables { + useSupportLibrary = true + generatedDensities() + } } compileOptions { diff --git a/samples/minimal/build.gradle.kts b/samples/minimal/build.gradle.kts index 150a718e44..edf2527572 100644 --- a/samples/minimal/build.gradle.kts +++ b/samples/minimal/build.gradle.kts @@ -28,9 +28,6 @@ android { versionCode = Versions.versionCode versionName = Versions.versionName testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { - useSupportLibrary = true - } } buildTypes { 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_4_null_0,NEXUS_5,1.0,en].png index c5f3236dde..1fe1da734b 100644 --- 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_4_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb9b7d6711afd4c21acd3a5a1c93807c4add46cba94ede30aca92bfbc533a2da -size 23879 +oid sha256:ddcc4223f226314ebf06fdac43863179c5ae3bf3574351ed3a4114d48c0869e6 +size 23195 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_5_null_0,NEXUS_5,1.0,en].png index d0d90c769b..22825184b9 100644 --- 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_5_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:14554d6b72e1daa3e7385fbc26e9f377d281f6f6bfa8d9c4b8048bf0f8fd104b -size 22339 +oid sha256:28a347a2b84dd63b6c434b64a42fff8b655bdb8f22ee69b8c0650d2eba59514a +size 21584 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png index 7462a51174..8834b4a173 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Day_0_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93259e689404ece68cc2445e2ff67469f42305ea368dbe09aac31ef4836ff8e9 -size 80199 +oid sha256:83f4a320f72a3213da7f08ac77f4e13a51ac3bdbea5928eceef4d23a421f2346 +size 79190 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png index aa1122237f..fa80251fbd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsCompound_null_IconsCompound-Night_1_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7f37427ccf7fcb57cf17d3d8783b4c90644685e994c651fd0243a95cecdb953c -size 77487 +oid sha256:5071fe12f35e6056bb7e04a6e66b9b401b4164d2cfbb28bb1e17ed83f315ec3e +size 76666 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null_0,NEXUS_5,1.0,en].png index ff1f8a68f4..7e955fec7d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Day_0_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b56adae1ba8b83b4291aaf54a57a43bc7138b585a26fbf195a4969ba52129181 -size 71820 +oid sha256:4cf590f17e970865951d8e644ddf7863f2f0118677610cedc30b3986bec6f0d3 +size 72987 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null_0,NEXUS_5,1.0,en].png index b05ecbc480..6b3688866e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.icons_IconsOther_null_IconsOther-Night_1_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0a5398cd9a06246f0ada91f3e57bbfa13ed5f4b25ed3b48210cb437307a804db -size 68811 +oid sha256:1f33fc1af4beeb18997a2cc6c16f1c058222bca222ba812e9b3837fc87ee9f27 +size 69942 From 47f0a2e73ca0204d8fee274e9d6c82a07852193a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 29 Dec 2023 15:14:40 +0100 Subject: [PATCH 046/161] Add support for sending images from the keyboard #1977 --- changelog.d/1977.feature | 1 + .../impl/messagecomposer/MessageComposerEvents.kt | 2 ++ .../impl/messagecomposer/MessageComposerPresenter.kt | 12 ++++++++++++ .../impl/messagecomposer/MessageComposerView.kt | 6 ++++++ .../android/libraries/textcomposer/TextComposer.kt | 8 +++++++- 5 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 changelog.d/1977.feature diff --git a/changelog.d/1977.feature b/changelog.d/1977.feature new file mode 100644 index 0000000000..61ae78b082 --- /dev/null +++ b/changelog.d/1977.feature @@ -0,0 +1 @@ +Add support for sending images from the keyboard diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerEvents.kt index c8ce20b6b9..4f5c2aba10 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerEvents.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerEvents.kt @@ -16,6 +16,7 @@ package io.element.android.features.messages.impl.messagecomposer +import android.net.Uri import androidx.compose.runtime.Immutable import io.element.android.features.messages.impl.mentions.MentionSuggestion import io.element.android.libraries.textcomposer.model.Message @@ -26,6 +27,7 @@ import io.element.android.libraries.textcomposer.model.Suggestion sealed interface MessageComposerEvents { data object ToggleFullScreenState : MessageComposerEvents data class SendMessage(val message: Message) : MessageComposerEvents + data class SendUri(val uri: Uri) : MessageComposerEvents data object CloseSpecialMode : MessageComposerEvents data class SetMode(val composerMode: MessageComposerMode) : MessageComposerEvents data object AddAttachment : MessageComposerEvents diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index 38ba51fa72..2e9aeaf6e6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -225,6 +225,18 @@ class MessageComposerPresenter @Inject constructor( updateComposerMode = { messageComposerContext.composerMode = it }, richTextEditorState = richTextEditorState, ) + is MessageComposerEvents.SendUri -> appCoroutineScope.sendAttachment( + attachment = Attachment.Media( + localMedia = localMediaFactory.createFromUri( + uri = event.uri, + mimeType = null, + name = null, + formattedFileSize = null + ), + compressIfPossible = true + ), + attachmentState = attachmentsState, + ) is MessageComposerEvents.SetMode -> { messageComposerContext.composerMode = event.composerMode when (event.composerMode) { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerView.kt index 28e40a910f..47b5adea5e 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerView.kt @@ -16,6 +16,7 @@ package io.element.android.features.messages.impl.messagecomposer +import android.net.Uri import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.IntrinsicSize import androidx.compose.foundation.layout.height @@ -52,6 +53,10 @@ internal fun MessageComposerView( state.eventSink(MessageComposerEvents.SendMessage(message)) } + fun sendUri(uri: Uri) { + state.eventSink(MessageComposerEvents.SendUri(uri)) + } + fun onAddAttachment() { state.eventSink(MessageComposerEvents.AddAttachment) } @@ -117,6 +122,7 @@ internal fun MessageComposerView( onSuggestionReceived = ::onSuggestionReceived, onError = ::onError, currentUserId = state.currentUserId, + onRichContentSelected = ::sendUri, ) } diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt index 0d6d01f000..c43d6b14b2 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt @@ -16,6 +16,7 @@ package io.element.android.libraries.textcomposer +import android.net.Uri import androidx.compose.foundation.background import androidx.compose.foundation.border import androidx.compose.foundation.clickable @@ -111,6 +112,7 @@ fun TextComposer( onDeleteVoiceMessage: () -> Unit, onError: (Throwable) -> Unit, onSuggestionReceived: (Suggestion?) -> Unit, + onRichContentSelected: ((Uri) -> Unit)?, modifier: Modifier = Modifier, showTextFormatting: Boolean = false, subcomposing: Boolean = false, @@ -162,6 +164,7 @@ fun TextComposer( resolveMentionDisplay = { text, url -> TextDisplay.Custom(mentionSpanProvider.getMentionSpanFor(text, url)) }, resolveRoomMentionDisplay = { TextDisplay.Custom(mentionSpanProvider.getMentionSpanFor("@room", "#")) }, onError = onError, + onRichContentSelected = onRichContentSelected, ) } } @@ -397,6 +400,7 @@ private fun TextInput( resolveMentionDisplay: (text: String, url: String) -> TextDisplay, modifier: Modifier = Modifier, onError: (Throwable) -> Unit = {}, + onRichContentSelected: ((Uri) -> Unit)? = null, ) { val bgColor = ElementTheme.colors.bgSubtleSecondary val borderColor = ElementTheme.colors.borderDisabled @@ -443,7 +447,8 @@ private fun TextInput( style = ElementRichTextEditorStyle.composerStyle(hasFocus = state.hasFocus), resolveMentionDisplay = resolveMentionDisplay, resolveRoomMentionDisplay = resolveRoomMentionDisplay, - onError = onError + onError = onError, + onRichContentSelected = onRichContentSelected, ) } } @@ -902,5 +907,6 @@ private fun ATextComposer( onDeleteVoiceMessage = {}, onError = {}, onSuggestionReceived = {}, + onRichContentSelected = null, ) } From 66073a14615bc3e2474d8ad2cad1993462bdb4fe Mon Sep 17 00:00:00 2001 From: bmarty Date: Mon, 1 Jan 2024 00:11:02 +0000 Subject: [PATCH 047/161] Sync Strings from Localazy --- .../eventformatter/impl/src/main/res/values-cs/translations.xml | 2 ++ .../eventformatter/impl/src/main/res/values-fr/translations.xml | 2 ++ .../eventformatter/impl/src/main/res/values-ru/translations.xml | 2 ++ .../eventformatter/impl/src/main/res/values-sk/translations.xml | 2 ++ 4 files changed, 8 insertions(+) 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" From 0cef15014744a944e1b5c9344f4b857107fa802d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Sat, 30 Dec 2023 10:38:15 +0100 Subject: [PATCH 048/161] Fix record screenshots workflow and script --- .github/workflows/recordScreenshots.yml | 5 ++--- .../workflows/scripts/recordScreenshots.sh | 22 ++++++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/recordScreenshots.yml b/.github/workflows/recordScreenshots.yml index ea86142700..8658fa2de7 100644 --- a/.github/workflows/recordScreenshots.yml +++ b/.github/workflows/recordScreenshots.yml @@ -26,7 +26,7 @@ jobs: uses: nschloe/action-cached-lfs-checkout@v1.2.2 with: persist-credentials: false - ref: ${{ github.event.pull_request.head.ref }} + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref }} - name: ⏬ Checkout with LFS (Branch) if: github.event_name == 'workflow_dispatch' uses: nschloe/action-cached-lfs-checkout@v1.2.2 @@ -45,6 +45,5 @@ jobs: - name: Record screenshots run: ./.github/workflows/scripts/recordScreenshots.sh env: - GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} - diff --git a/.github/workflows/scripts/recordScreenshots.sh b/.github/workflows/scripts/recordScreenshots.sh index 5a86a91580..ad3e372970 100755 --- a/.github/workflows/scripts/recordScreenshots.sh +++ b/.github/workflows/scripts/recordScreenshots.sh @@ -68,11 +68,27 @@ echo "Record screenshots" ./gradlew recordPaparazziDebug --stacktrace -PpreDexEnable=false --max-workers 4 --warn echo "Committing changes" -git config user.name "ElementBot" -git config user.email "benoitm+elementbot@element.io" +git config http.sslVerify false + +if [[ -z ${INPUT_AUTHOR_NAME} ]]; then + git config user.name "ElementBot" +else + git config --local user.name "${INPUT_AUTHOR_NAME}" +fi + +if [[ -z ${INPUT_AUTHOR_EMAIL} ]]; then + git config user.email "benoitm+elementbot@element.io" +else + git config --local user.name "${INPUT_AUTHOR_EMAIL}" +fi git add -A git commit -m "Update screenshots" +GITHUB_REPO="https://$GITHUB_ACTOR:$TOKEN@github.com/$REPO.git" echo "Pushing changes" -git push "https://$TOKEN@github.com/$REPO.git" $BRANCH +if [[ -z ${GITHUB_ACTOR} ]]; then + echo "No GITHUB_ACTOR env var" + GITHUB_REPO="https://$TOKEN@github.com/$REPO.git" +fi +git push $GITHUB_REPO "$BRANCH" echo "Done!" From 378da8ce21c2ec219d98bd3b018a95da8a3e7ae1 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Tue, 2 Jan 2024 16:03:19 +0100 Subject: [PATCH 049/161] [Feature] Render m.sticker events (#2122) * Render m.sticker events --------- Signed-off-by: Marco Antonio Alvarez Co-authored-by: ElementBot --- changelog.d/1949.feature | 1 + .../messages/impl/MessagesFlowNode.kt | 14 +++++ .../messages/impl/MessagesPresenter.kt | 7 +++ .../impl/actionlist/ActionListView.kt | 4 ++ .../components/TimelineItemEventRow.kt | 2 + .../TimelineItemEventRowWithReplyPreview.kt | 5 ++ .../event/TimelineItemEventContentView.kt | 5 ++ .../event/TimelineItemStickerView.kt | 60 +++++++++++++++++++ .../TimelineItemContentMessageFactory.kt | 17 ++++++ .../TimelineItemContentStickerFactory.kt | 38 ++++++++++-- .../impl/timeline/groups/Groupability.kt | 2 + .../impl/timeline/model/InReplyToDetails.kt | 5 ++ .../impl/timeline/model/InReplyToMetadata.kt | 9 +++ .../model/event/TimelineItemEventContent.kt | 1 + .../model/event/TimelineItemStickerContent.kt | 41 +++++++++++++ .../TimelineItemStickerContentProvider.kt | 44 ++++++++++++++ .../MessageSummaryFormatterImpl.kt | 2 + .../impl/fixtures/timelineItemsFactory.kt | 5 +- .../TimelineItemContentMessageFactoryTest.kt | 42 +++++++++++++ .../impl/DefaultRoomLastMessageFormatter.kt | 4 ++ .../DefaultRoomLastMessageFormatterTest.kt | 5 ++ .../api/timeline/item/event/MessageType.kt | 6 ++ .../notifications/NotifiableEventResolver.kt | 2 + .../NotifiableEventResolverTest.kt | 18 ++++++ ...Button-Day-47_47_null,NEXUS_5,1.0,en].png} | 0 ...tton-Night-47_48_null,NEXUS_5,1.0,en].png} | 0 ...rView-Day-41_41_null_0,NEXUS_5,1.0,en].png | 3 + ...rView-Day-41_41_null_1,NEXUS_5,1.0,en].png | 3 + ...rView-Day-41_41_null_2,NEXUS_5,1.0,en].png | 3 + ...iew-Night-41_42_null_0,NEXUS_5,1.0,en].png | 3 + ...iew-Night-41_42_null_1,NEXUS_5,1.0,en].png | 3 + ...iew-Night-41_42_null_2,NEXUS_5,1.0,en].png | 3 + ...View-Day-42_42_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Day-42_42_null_1,NEXUS_5,1.0,en].png} | 0 ...View-Day-42_42_null_2,NEXUS_5,1.0,en].png} | 0 ...View-Day-42_42_null_3,NEXUS_5,1.0,en].png} | 0 ...View-Day-42_42_null_4,NEXUS_5,1.0,en].png} | 0 ...View-Day-42_42_null_5,NEXUS_5,1.0,en].png} | 0 ...ew-Night-42_43_null_0,NEXUS_5,1.0,en].png} | 0 ...ew-Night-42_43_null_1,NEXUS_5,1.0,en].png} | 0 ...ew-Night-42_43_null_2,NEXUS_5,1.0,en].png} | 0 ...ew-Night-42_43_null_3,NEXUS_5,1.0,en].png} | 0 ...ew-Night-42_43_null_4,NEXUS_5,1.0,en].png} | 0 ...ew-Night-42_43_null_5,NEXUS_5,1.0,en].png} | 0 ...wnView-Day-43_43_null,NEXUS_5,1.0,en].png} | 0 ...View-Night-43_44_null,NEXUS_5,1.0,en].png} | 0 ...View-Day-44_44_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Day-44_44_null_1,NEXUS_5,1.0,en].png} | 0 ...View-Day-44_44_null_2,NEXUS_5,1.0,en].png} | 0 ...ew-Night-44_45_null_0,NEXUS_5,1.0,en].png} | 0 ...ew-Night-44_45_null_1,NEXUS_5,1.0,en].png} | 0 ...ew-Night-44_45_null_2,NEXUS_5,1.0,en].png} | 0 ...nified-Day-46_46_null,NEXUS_5,1.0,en].png} | 0 ...fied-Night-46_47_null,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_1,NEXUS_5,1.0,en].png} | 0 ...iew-Day-45_45_null_10,NEXUS_5,1.0,en].png} | 0 ...iew-Day-45_45_null_11,NEXUS_5,1.0,en].png} | 0 ...iew-Day-45_45_null_12,NEXUS_5,1.0,en].png} | 0 ...iew-Day-45_45_null_13,NEXUS_5,1.0,en].png} | 0 ...iew-Day-45_45_null_14,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_2,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_3,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_4,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_5,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_6,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_7,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_8,NEXUS_5,1.0,en].png} | 0 ...View-Day-45_45_null_9,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_0,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_1,NEXUS_5,1.0,en].png} | 0 ...w-Night-45_46_null_10,NEXUS_5,1.0,en].png} | 0 ...w-Night-45_46_null_11,NEXUS_5,1.0,en].png} | 0 ...w-Night-45_46_null_12,NEXUS_5,1.0,en].png} | 0 ...w-Night-45_46_null_13,NEXUS_5,1.0,en].png} | 0 ...w-Night-45_46_null_14,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_2,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_3,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_4,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_5,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_6,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_7,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_8,NEXUS_5,1.0,en].png} | 0 ...ew-Night-45_46_null_9,NEXUS_5,1.0,en].png} | 0 ...erView-Day-48_48_null,NEXUS_5,1.0,en].png} | 0 ...View-Night-48_49_null,NEXUS_5,1.0,en].png} | 0 ...tent-Day-49_49_null_0,NEXUS_5,1.0,en].png} | 0 ...nt-Night-49_50_null_0,NEXUS_5,1.0,en].png} | 0 ...heet-Day-51_51_null_0,NEXUS_5,1.0,en].png} | 0 ...heet-Day-51_51_null_1,NEXUS_5,1.0,en].png} | 0 ...heet-Day-51_51_null_2,NEXUS_5,1.0,en].png} | 0 ...heet-Day-51_51_null_3,NEXUS_5,1.0,en].png} | 0 ...heet-Day-51_51_null_4,NEXUS_5,1.0,en].png} | 0 ...heet-Day-51_51_null_5,NEXUS_5,1.0,en].png} | 0 ...et-Night-51_52_null_0,NEXUS_5,1.0,en].png} | 0 ...et-Night-51_52_null_1,NEXUS_5,1.0,en].png} | 0 ...et-Night-51_52_null_2,NEXUS_5,1.0,en].png} | 0 ...et-Night-51_52_null_3,NEXUS_5,1.0,en].png} | 0 ...et-Night-51_52_null_4,NEXUS_5,1.0,en].png} | 0 ...et-Night-51_52_null_5,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_1,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_2,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_3,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_4,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_5,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_6,NEXUS_5,1.0,en].png} | 0 ...View-Day-50_50_null_7,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_0,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_1,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_2,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_3,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_4,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_5,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_6,NEXUS_5,1.0,en].png} | 0 ...ew-Night-50_51_null_7,NEXUS_5,1.0,en].png} | 0 ...Menu-Day-52_52_null_0,NEXUS_5,1.0,en].png} | 0 ...Menu-Day-52_52_null_1,NEXUS_5,1.0,en].png} | 0 ...nu-Night-52_53_null_0,NEXUS_5,1.0,en].png} | 0 ...nu-Night-52_53_null_1,NEXUS_5,1.0,en].png} | 0 ...View-Day-53_53_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Day-53_53_null_1,NEXUS_5,1.0,en].png} | 0 ...View-Day-53_53_null_2,NEXUS_5,1.0,en].png} | 0 ...ew-Night-53_54_null_0,NEXUS_5,1.0,en].png} | 0 ...ew-Night-53_54_null_1,NEXUS_5,1.0,en].png} | 0 ...ew-Night-53_54_null_2,NEXUS_5,1.0,en].png} | 0 ...View-Day-54_54_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Day-54_54_null_1,NEXUS_5,1.0,en].png} | 0 ...ew-Night-54_55_null_0,NEXUS_5,1.0,en].png} | 0 ...ew-Night-54_55_null_1,NEXUS_5,1.0,en].png} | 0 ...erView-Day-55_55_null,NEXUS_5,1.0,en].png} | 0 ...View-Night-55_56_null,NEXUS_5,1.0,en].png} | 0 ...ngView-Day-56_56_null,NEXUS_5,1.0,en].png} | 0 ...View-Night-56_57_null,NEXUS_5,1.0,en].png} | 0 ...icator-Day-57_57_null,NEXUS_5,1.0,en].png} | 0 ...ator-Night-57_58_null,NEXUS_5,1.0,en].png} | 0 ...eply-Day-21_21_null_10,NEXUS_5,1.0,en].png | 4 +- ...eply-Day-21_21_null_11,NEXUS_5,1.0,en].png | 3 + ...Reply-Day-21_21_null_6,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_7,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_8,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_9,NEXUS_5,1.0,en].png | 4 +- ...ly-Night-21_22_null_10,NEXUS_5,1.0,en].png | 4 +- ...ly-Night-21_22_null_11,NEXUS_5,1.0,en].png | 3 + ...ply-Night-21_22_null_6,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_7,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_8,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_9,NEXUS_5,1.0,en].png | 4 +- ...foView-Day-58_58_null,NEXUS_5,1.0,en].png} | 0 ...View-Night-58_59_null,NEXUS_5,1.0,en].png} | 0 150 files changed, 378 insertions(+), 25 deletions(-) create mode 100644 changelog.d/1949.feature create mode 100644 features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStickerView.kt create mode 100644 features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContent.kt create mode 100644 features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContentProvider.kt rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Day-46_46_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Day-47_47_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Night-46_47_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Night-47_48_null,NEXUS_5,1.0,en].png} (100%) create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_0,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_1,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_2,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_0,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_1,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_2,NEXUS_5,1.0,en].png rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Day-42_42_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Day-43_43_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Night-42_43_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Night-43_44_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-45_45_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-45_46_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_10,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_10,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_11,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_12,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_13,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_14,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_14,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_6,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_7,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_8,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_9,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_10,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_10,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_11,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_12,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_13,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_14,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_14,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_6,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_7,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_8,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_9,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Day-47_47_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Day-48_48_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Night-47_48_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Night-48_49_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Day-48_48_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Day-49_49_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Night-48_49_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Night-49_50_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_6,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_7,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_3,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_3,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_4,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_4,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_5,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_5,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_6,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_6,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_7,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_7,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-51_51_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-52_52_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-51_51_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-52_52_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-51_52_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-52_53_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-51_52_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-52_53_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_2,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_2,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-53_53_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-54_54_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-53_53_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-54_54_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-53_54_null_0,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-54_55_null_0,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-53_54_null_1,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-54_55_null_1,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Day-54_54_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Day-55_55_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Night-54_55_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Night-55_56_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Day-55_55_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Day-56_56_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Night-55_56_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Night-56_57_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Day-56_56_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Day-57_57_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Night-56_57_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Night-57_58_null,NEXUS_5,1.0,en].png} (100%) create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Day-57_57_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Day-58_58_null,NEXUS_5,1.0,en].png} (100%) rename tests/uitests/src/test/snapshots/images/{ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Night-57_58_null,NEXUS_5,1.0,en].png => ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Night-58_59_null,NEXUS_5,1.0,en].png} (100%) diff --git a/changelog.d/1949.feature b/changelog.d/1949.feature new file mode 100644 index 0000000000..e5ff7b03a7 --- /dev/null +++ b/changelog.d/1949.feature @@ -0,0 +1 @@ +Render m.sticker events 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 acccfeaedc..9f0a91fa52 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 @@ -46,6 +46,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemFileContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent import io.element.android.features.poll.api.create.CreatePollEntryPoint import io.element.android.features.poll.api.create.CreatePollMode @@ -253,6 +254,19 @@ 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) + } is TimelineItemVideoContent -> { val navTarget = NavTarget.MediaViewer( mediaInfo = MediaInfo( 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 1ca834bc66..f8682cbd49 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 @@ -54,6 +54,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemPollContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateContent +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.event.TimelineItemUnknownContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent @@ -351,6 +352,12 @@ class MessagesPresenter @AssistedInject constructor( type = AttachmentThumbnailType.Image, blurHash = targetEvent.content.blurhash, ) + is TimelineItemStickerContent -> AttachmentThumbnailInfo( + thumbnailSource = targetEvent.content.thumbnailSource ?: targetEvent.content.mediaSource, + textContent = targetEvent.content.body, + type = AttachmentThumbnailType.Image, + blurHash = targetEvent.content.blurhash, + ) is TimelineItemVideoContent -> AttachmentThumbnailInfo( thumbnailSource = targetEvent.content.thumbnailSource, textContent = targetEvent.content.body, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt index 93736933fd..200bed433a 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt @@ -63,6 +63,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemPollContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateContent +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.event.TimelineItemUnknownContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent @@ -239,6 +240,9 @@ private fun MessageSummary(event: TimelineItem.Event, modifier: Modifier = Modif is TimelineItemImageContent -> { content = { ContentForBody(event.content.body) } } + is TimelineItemStickerContent -> { + content = { ContentForBody(event.content.body) } + } is TimelineItemVideoContent -> { content = { ContentForBody(event.content.body) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt index 19fc7dff0d..b5ce459a12 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt @@ -78,6 +78,7 @@ import io.element.android.features.messages.impl.timeline.model.bubble.BubbleSta import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemPollContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemTextContent @@ -583,6 +584,7 @@ private fun MessageEventBubbleContent( val timestampPosition = when (event.content) { is TimelineItemImageContent, + is TimelineItemStickerContent, is TimelineItemVideoContent, is TimelineItemLocationContent -> TimestampPosition.Overlay is TimelineItemPollContent -> TimestampPosition.Below diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithReplyPreview.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithReplyPreview.kt index ed046f1735..146a985039 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithReplyPreview.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithReplyPreview.kt @@ -42,6 +42,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.MessageConten import io.element.android.libraries.matrix.api.timeline.item.event.MessageType import io.element.android.libraries.matrix.api.timeline.item.event.NoticeMessageType import io.element.android.libraries.matrix.api.timeline.item.event.PollContent +import io.element.android.libraries.matrix.api.timeline.item.event.StickerMessageType import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VideoMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VoiceMessageType @@ -109,6 +110,10 @@ class InReplyToDetailsProvider : PreviewParameterProvider { body = "Image", type = ImageMessageType("Image", MediaSource("url"), null), ), + aMessageContent( + body = "Sticker", + type = StickerMessageType("Image", MediaSource("url"), null), + ), aMessageContent( body = "File", type = FileMessageType("File", MediaSource("url"), null), diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt index 82f1af4858..175adf4d38 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt @@ -30,6 +30,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemPollContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateContent +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.event.TimelineItemUnknownContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent @@ -76,6 +77,10 @@ fun TimelineItemEventContentView( content = content, modifier = modifier, ) + is TimelineItemStickerContent -> TimelineItemStickerView( + content = content, + modifier = modifier, + ) is TimelineItemVideoContent -> TimelineItemVideoView( content = content, modifier = modifier diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStickerView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStickerView.kt new file mode 100644 index 0000000000..c34da9e473 --- /dev/null +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStickerView.kt @@ -0,0 +1,60 @@ +/* + * 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.features.messages.impl.timeline.components.event + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.heightIn +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.tooling.preview.PreviewParameter +import androidx.compose.ui.unit.dp +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContentProvider +import io.element.android.libraries.designsystem.components.BlurHashAsyncImage +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.matrix.ui.media.MediaRequestData + +private const val STICKER_SIZE_IN_DP = 128 +private const val DEFAULT_ASPECT_RATIO = 1.33f + +@Composable +fun TimelineItemStickerView( + content: TimelineItemStickerContent, + modifier: Modifier = Modifier, +) { + val safeAspectRatio = content.aspectRatio ?: DEFAULT_ASPECT_RATIO + Box( + modifier = modifier + .heightIn(min = STICKER_SIZE_IN_DP.dp, max = STICKER_SIZE_IN_DP.dp) + .aspectRatio(safeAspectRatio, false), + contentAlignment = Alignment.TopStart, + ) { + BlurHashAsyncImage( + model = MediaRequestData(content.preferredMediaSource, MediaRequestData.Kind.File(content.body, content.mimeType)), + blurHash = content.blurhash, + ) + } +} + +@PreviewsDayNight +@Composable +internal fun TimelineItemStickerViewPreview(@PreviewParameter(TimelineItemStickerContentProvider::class) content: TimelineItemStickerContent) = ElementPreview { + TimelineItemStickerView(content) +} 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 69c453bb44..f02140847e 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 @@ -32,6 +32,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemNoticeContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVoiceContent @@ -50,6 +51,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.MessageConten import io.element.android.libraries.matrix.api.timeline.item.event.MessageFormat import io.element.android.libraries.matrix.api.timeline.item.event.NoticeMessageType import io.element.android.libraries.matrix.api.timeline.item.event.OtherMessageType +import io.element.android.libraries.matrix.api.timeline.item.event.StickerMessageType import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VideoMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VoiceMessageType @@ -93,6 +95,21 @@ class TimelineItemContentMessageFactory @Inject constructor( fileExtension = fileExtensionExtractor.extractFromName(messageType.body) ) } + is StickerMessageType -> { + val aspectRatio = aspectRatioOf(messageType.info?.width, messageType.info?.height) + TimelineItemStickerContent( + body = messageType.body, + mediaSource = messageType.source, + thumbnailSource = messageType.info?.thumbnailSource, + mimeType = messageType.info?.mimetype ?: MimeTypes.OctetStream, + blurhash = messageType.info?.blurhash, + width = messageType.info?.width?.toInt(), + height = messageType.info?.height?.toInt(), + aspectRatio = aspectRatio, + formattedFileSize = fileSizeFormatter.format(messageType.info?.size ?: 0), + fileExtension = fileExtensionExtractor.extractFromName(messageType.body) + ) + } is LocationMessageType -> { val location = Location.fromGeoUri(messageType.geoUri) if (location == null) { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt index 1607bb77c4..14f95202d4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt @@ -17,13 +17,43 @@ package io.element.android.features.messages.impl.timeline.factories.event import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEventContent -import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent +import io.element.android.libraries.androidutils.filesize.FileSizeFormatter +import io.element.android.libraries.core.mimetype.MimeTypes +import io.element.android.libraries.matrix.api.media.MediaSource import io.element.android.libraries.matrix.api.timeline.item.event.StickerContent +import io.element.android.libraries.mediaviewer.api.util.FileExtensionExtractor import javax.inject.Inject -class TimelineItemContentStickerFactory @Inject constructor() { +class TimelineItemContentStickerFactory @Inject constructor( + private val fileSizeFormatter: FileSizeFormatter, + private val fileExtensionExtractor: FileExtensionExtractor +) { + private fun aspectRatioOf(width: Long?, height: Long?): Float? { + val result = if (height != null && width != null) { + width.toFloat() / height.toFloat() + } else { + null + } - fun create(@Suppress("UNUSED_PARAMETER") content: StickerContent): TimelineItemEventContent { - return TimelineItemUnknownContent + return result?.takeIf { it.isFinite() } + } + + fun create(content: StickerContent): TimelineItemEventContent { + + val aspectRatio = aspectRatioOf(content.info.width, content.info.height) + + return TimelineItemStickerContent( + body = content.body, + mediaSource = MediaSource(content.url), + thumbnailSource = content.info.thumbnailSource, + mimeType = content.info.mimetype ?: MimeTypes.OctetStream, + blurhash = content.info.blurhash, + width = content.info.width?.toInt(), + height = content.info.height?.toInt(), + aspectRatio = aspectRatio, + formattedFileSize = fileSizeFormatter.format(content.info.size ?: 0), + fileExtension = fileExtensionExtractor.extractFromName(content.body) + ) } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/groups/Groupability.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/groups/Groupability.kt index 51ab200c48..f2ecaee85d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/groups/Groupability.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/groups/Groupability.kt @@ -27,6 +27,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRoomMembershipContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateEventContent +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.event.TimelineItemUnknownContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent @@ -54,6 +55,7 @@ internal fun TimelineItem.Event.canBeGrouped(): Boolean { is TimelineItemTextBasedContent, is TimelineItemEncryptedContent, is TimelineItemImageContent, + is TimelineItemStickerContent, is TimelineItemFileContent, is TimelineItemVideoContent, is TimelineItemAudioContent, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToDetails.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToDetails.kt index 14596ac1f0..759ead5b61 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToDetails.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToDetails.kt @@ -21,6 +21,7 @@ import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.timeline.item.event.EventContent import io.element.android.libraries.matrix.api.timeline.item.event.InReplyTo import io.element.android.libraries.matrix.api.timeline.item.event.MessageContent +import io.element.android.libraries.matrix.api.timeline.item.event.StickerContent import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.ui.messages.toPlainText @@ -45,6 +46,10 @@ fun InReplyTo.map() = when (this) { val messageContent = content as MessageContent (messageContent.type as? TextMessageType)?.toPlainText() ?: messageContent.body } + is StickerContent -> { + val stickerContent = content as StickerContent + stickerContent.body + } else -> null } ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadata.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadata.kt index 63775d5ac2..1c723205a8 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadata.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/InReplyToMetadata.kt @@ -19,12 +19,14 @@ package io.element.android.features.messages.impl.timeline.model import androidx.compose.runtime.Composable import androidx.compose.runtime.Immutable import androidx.compose.ui.res.stringResource +import io.element.android.libraries.matrix.api.media.MediaSource import io.element.android.libraries.matrix.api.timeline.item.event.AudioMessageType import io.element.android.libraries.matrix.api.timeline.item.event.FileMessageType import io.element.android.libraries.matrix.api.timeline.item.event.ImageMessageType import io.element.android.libraries.matrix.api.timeline.item.event.LocationMessageType import io.element.android.libraries.matrix.api.timeline.item.event.MessageContent import io.element.android.libraries.matrix.api.timeline.item.event.PollContent +import io.element.android.libraries.matrix.api.timeline.item.event.StickerContent import io.element.android.libraries.matrix.api.timeline.item.event.VideoMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VoiceMessageType import io.element.android.libraries.matrix.ui.components.AttachmentThumbnailInfo @@ -98,6 +100,13 @@ internal fun InReplyToDetails.metadata(): InReplyToMetadata? = when (eventConten ) else -> InReplyToMetadata.Text(textContent ?: eventContent.body) } + is StickerContent -> InReplyToMetadata.Thumbnail( + AttachmentThumbnailInfo( + thumbnailSource = MediaSource(eventContent.url), + textContent = eventContent.body, + type = AttachmentThumbnailType.Image + ) + ) is PollContent -> InReplyToMetadata.Thumbnail( AttachmentThumbnailInfo( textContent = eventContent.question, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt index f459e27d88..ad0f62a94d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemEventContent.kt @@ -56,6 +56,7 @@ fun TimelineItemEventContent.canReact(): Boolean = is TimelineItemEncryptedContent, is TimelineItemFileContent, is TimelineItemImageContent, + is TimelineItemStickerContent, is TimelineItemLocationContent, is TimelineItemPollContent, is TimelineItemVoiceContent, 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 new file mode 100644 index 0000000000..e608ed824a --- /dev/null +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContent.kt @@ -0,0 +1,41 @@ +/* + * 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.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( + val body: String, + val mediaSource: MediaSource, + val thumbnailSource: MediaSource?, + val formattedFileSize: String, + val fileExtension: String, + val mimeType: String, + val blurhash: String?, + val width: Int?, + val height: Int?, + val aspectRatio: Float? +) : TimelineItemEventContent { + override val type: String = "TimelineItemStickerContent" + + val preferredMediaSource = if (mimeType == MimeTypes.Gif) { + mediaSource + } else { + thumbnailSource ?: mediaSource + } +} diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContentProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContentProvider.kt new file mode 100644 index 0000000000..5080cd1c84 --- /dev/null +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemStickerContentProvider.kt @@ -0,0 +1,44 @@ +/* + * 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.features.messages.impl.timeline.model.event + +import androidx.compose.ui.tooling.preview.PreviewParameterProvider +import androidx.media3.common.MimeTypes +import io.element.android.libraries.matrix.api.media.MediaSource +import io.element.android.libraries.matrix.ui.components.A_BLUR_HASH + +open class TimelineItemStickerContentProvider : PreviewParameterProvider { + override val values: Sequence + get() = sequenceOf( + aTimelineItemStickerContent(), + aTimelineItemStickerContent().copy(aspectRatio = 1.0f), + aTimelineItemStickerContent().copy(aspectRatio = 1.5f), + ) +} + +fun aTimelineItemStickerContent() = TimelineItemStickerContent( + body = "a body", + mediaSource = MediaSource(""), + thumbnailSource = null, + mimeType = MimeTypes.IMAGE_JPEG, + blurhash = A_BLUR_HASH, + width = null, + height = 128, + aspectRatio = 0.5f, + formattedFileSize = "4MB", + fileExtension = "jpg" +) 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 762e43cf92..589ecaede0 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 @@ -28,6 +28,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemProfileChangeContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateContent +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.event.TimelineItemUnknownContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent @@ -53,6 +54,7 @@ class MessageSummaryFormatterImpl @Inject constructor( is TimelineItemVoiceContent -> context.getString(CommonStrings.common_voice_message) is TimelineItemUnknownContent -> context.getString(CommonStrings.common_unsupported_event) is TimelineItemImageContent -> context.getString(CommonStrings.common_image) + is TimelineItemStickerContent -> context.getString(CommonStrings.common_sticker) is TimelineItemVideoContent -> context.getString(CommonStrings.common_video) is TimelineItemFileContent -> context.getString(CommonStrings.common_file) is TimelineItemAudioContent -> context.getString(CommonStrings.common_audio) diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/timelineItemsFactory.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/timelineItemsFactory.kt index 587d9f47df..562424474c 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/timelineItemsFactory.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/timelineItemsFactory.kt @@ -59,7 +59,10 @@ internal fun TestScope.aTimelineItemsFactory(): TimelineItemsFactory { htmlConverterProvider = FakeHtmlConverterProvider(), ), redactedMessageFactory = TimelineItemContentRedactedFactory(), - stickerFactory = TimelineItemContentStickerFactory(), + stickerFactory = TimelineItemContentStickerFactory( + fileSizeFormatter = FakeFileSizeFormatter(), + fileExtensionExtractor = FileExtensionExtractorWithoutValidation() + ), pollFactory = TimelineItemContentPollFactory(FakeFeatureFlagService(), FakePollContentStateFactory()), utdFactory = TimelineItemContentUTDFactory(), roomMembershipFactory = TimelineItemContentRoomMembershipFactory(timelineEventFormatter), diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt index 0fe79b8963..381c6048c2 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt @@ -29,6 +29,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemNoticeContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVoiceContent @@ -57,6 +58,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.MessageFormat import io.element.android.libraries.matrix.api.timeline.item.event.MessageType import io.element.android.libraries.matrix.api.timeline.item.event.NoticeMessageType import io.element.android.libraries.matrix.api.timeline.item.event.OtherMessageType +import io.element.android.libraries.matrix.api.timeline.item.event.StickerContent import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VideoMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VoiceMessageType @@ -438,6 +440,30 @@ class TimelineItemContentMessageFactoryTest { assertThat(result).isEqualTo(expected) } + @Test + fun `test create StickerMessageType`() = runTest { + val sut = createTimelineItemContentStickerFactory() + val result = sut.create( + content = createStickerContent( + "body", + ImageInfo(32, 32, "image/webp", 8192, null, MediaSource("thumbnail://url"), null), + "url") + ) + val expected = TimelineItemStickerContent( + body = "body", + mediaSource = MediaSource(url = "url", json = null), + thumbnailSource = MediaSource(url = "thumbnail://url", json = null), + formattedFileSize = "8192 Bytes", + fileExtension = "", + mimeType = MimeTypes.WebP, + blurhash = null, + width = 32, + height = 32, + aspectRatio = 1.0f + ) + assertThat(result).isEqualTo(expected) + } + @Test fun `test create ImageMessageType with info`() = runTest { val sut = createTimelineItemContentMessageFactory() @@ -627,4 +653,20 @@ class TimelineItemContentMessageFactoryTest { featureFlagService = featureFlagService, htmlConverterProvider = FakeHtmlConverterProvider(htmlConverterTransform), ) + + private fun createStickerContent( + body: String = "Body", + inImageInfo: ImageInfo, + inUrl: String + ): StickerContent { + return StickerContent ( + body = body, + info = inImageInfo, + url = inUrl + ) + } + private fun createTimelineItemContentStickerFactory() = TimelineItemContentStickerFactory( + fileSizeFormatter = FakeFileSizeFormatter(), + fileExtensionExtractor = FileExtensionExtractorWithoutValidation() + ) } 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 9475275e5d..e79b0ed199 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 @@ -44,6 +44,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.RedactedConte import io.element.android.libraries.matrix.api.timeline.item.event.RoomMembershipContent import io.element.android.libraries.matrix.api.timeline.item.event.StateContent import io.element.android.libraries.matrix.api.timeline.item.event.StickerContent +import io.element.android.libraries.matrix.api.timeline.item.event.StickerMessageType import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.UnableToDecryptContent import io.element.android.libraries.matrix.api.timeline.item.event.UnknownContent @@ -120,6 +121,9 @@ class DefaultRoomLastMessageFormatter @Inject constructor( is ImageMessageType -> { sp.getString(CommonStrings.common_image) } + is StickerMessageType -> { + sp.getString(CommonStrings.common_sticker) + } is LocationMessageType -> { sp.getString(CommonStrings.common_shared_location) } diff --git a/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt b/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt index 58c48808a6..049d5af4dd 100644 --- a/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt +++ b/libraries/eventformatter/impl/src/test/kotlin/io/element/android/libraries/eventformatter/impl/DefaultRoomLastMessageFormatterTest.kt @@ -43,6 +43,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.RedactedConte import io.element.android.libraries.matrix.api.timeline.item.event.RoomMembershipContent import io.element.android.libraries.matrix.api.timeline.item.event.StateContent import io.element.android.libraries.matrix.api.timeline.item.event.StickerContent +import io.element.android.libraries.matrix.api.timeline.item.event.StickerMessageType import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.UnableToDecryptContent import io.element.android.libraries.matrix.api.timeline.item.event.UnknownContent @@ -165,6 +166,7 @@ class DefaultRoomLastMessageFormatterTest { AudioMessageType(body, MediaSource("url"), null), VoiceMessageType(body, MediaSource("url"), null, null), ImageMessageType(body, MediaSource("url"), null), + StickerMessageType(body, MediaSource("url"), null), FileMessageType(body, MediaSource("url"), null), LocationMessageType(body, "geo:1,2", null), NoticeMessageType(body, null), @@ -196,6 +198,7 @@ class DefaultRoomLastMessageFormatterTest { is AudioMessageType -> "Audio" is VoiceMessageType -> "Voice message" is ImageMessageType -> "Image" + is StickerMessageType -> "Sticker" is FileMessageType -> "File" is LocationMessageType -> "Shared location" is EmoteMessageType -> "* $senderName ${type.body}" @@ -214,6 +217,7 @@ class DefaultRoomLastMessageFormatterTest { is AudioMessageType -> "$senderName: Audio" is VoiceMessageType -> "$senderName: Voice message" is ImageMessageType -> "$senderName: Image" + is StickerMessageType -> "$senderName: Sticker" is FileMessageType -> "$senderName: File" is LocationMessageType -> "$senderName: Shared location" is TextMessageType, @@ -226,6 +230,7 @@ class DefaultRoomLastMessageFormatterTest { is AudioMessageType -> true is VoiceMessageType -> true is ImageMessageType -> true + is StickerMessageType -> true is FileMessageType -> true is LocationMessageType -> false is EmoteMessageType -> false diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MessageType.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MessageType.kt index 0b2d948c4e..3e69b1f8f9 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MessageType.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MessageType.kt @@ -38,6 +38,12 @@ data class ImageMessageType( val info: ImageInfo? ) : MessageType +data class StickerMessageType( + val body: String, + val source: MediaSource, + val info: ImageInfo? +) : MessageType + data class LocationMessageType( val body: String, val geoUri: String, diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt index 017627305e..f2b763bda9 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolver.kt @@ -38,6 +38,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.ImageMessageT import io.element.android.libraries.matrix.api.timeline.item.event.LocationMessageType import io.element.android.libraries.matrix.api.timeline.item.event.NoticeMessageType import io.element.android.libraries.matrix.api.timeline.item.event.OtherMessageType +import io.element.android.libraries.matrix.api.timeline.item.event.StickerMessageType import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VideoMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VoiceMessageType @@ -231,6 +232,7 @@ class NotifiableEventResolver @Inject constructor( is EmoteMessageType -> "* $senderDisplayName ${messageType.body}" is FileMessageType -> messageType.body is ImageMessageType -> messageType.body + is StickerMessageType -> messageType.body is NoticeMessageType -> messageType.body is TextMessageType -> messageType.toPlainText() is VideoMessageType -> messageType.body diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolverTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolverTest.kt index bad49b64ef..a28bee695a 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolverTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventResolverTest.kt @@ -30,6 +30,7 @@ import io.element.android.libraries.matrix.api.timeline.item.event.ImageMessageT import io.element.android.libraries.matrix.api.timeline.item.event.LocationMessageType import io.element.android.libraries.matrix.api.timeline.item.event.MessageFormat import io.element.android.libraries.matrix.api.timeline.item.event.NoticeMessageType +import io.element.android.libraries.matrix.api.timeline.item.event.StickerMessageType import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VideoMessageType import io.element.android.libraries.matrix.api.timeline.item.event.VoiceMessageType @@ -234,6 +235,23 @@ class NotifiableEventResolverTest { assertThat(result).isEqualTo(expectedResult) } + @Test + fun `resolve event message sticker`() = runTest { + val sut = createNotifiableEventResolver( + notificationResult = Result.success( + createNotificationData( + content = NotificationContent.MessageLike.RoomMessage( + senderId = A_USER_ID_2, + messageType = StickerMessageType("Sticker", MediaSource("url"), null), + ) + ) + ) + ) + val result = sut.resolveEvent(A_SESSION_ID, A_ROOM_ID, AN_EVENT_ID) + val expectedResult = createNotifiableMessageEvent(body = "Sticker") + assertThat(result).isEqualTo(expectedResult) + } + @Test fun `resolve event message file`() = runTest { val sut = createNotifiableEventResolver( diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Day-46_46_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Day-47_47_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Day-46_46_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Day-47_47_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Night-46_47_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Night-47_48_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Night-46_47_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_ProgressButton_null_ProgressButton-Night-47_48_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_0,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..65dcec812b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_0,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d3090c82ca29fbbce10efdb7d1720efe7a4eebb6fe2f871401fdc81f9c5a422 +size 38433 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_1,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..c779804fc6 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_1,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0e56460df17a40455f62f6387ce169e70376561ec9fc74827e4ab63316a8210 +size 51671 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_2,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..f9d9fd56e4 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Day-41_41_null_2,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65dd1c851fa79f9180e371f4c0b0f0ba39b33040ee247ed2cfb754942db5def4 +size 64822 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_0,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..d9a04bbe7b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_0,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8996238bb446dac62d49e322feab0b66e47de0a2b4b0f96e4f9294e5dd56c5e0 +size 38518 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_1,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..6bf01c2693 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_1,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3923a0d08cd0afdea404508886068c70c0653c79af558c44a4e96dc448e88fd0 +size 51649 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_2,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..9060095a66 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemStickerView_null_TimelineItemStickerView-Night-41_42_null_2,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd3f2efe2de6b4709bfd91fff38c74f1444ff1508a159b4902e70dd65f6987b6 +size 64144 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-41_41_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Day-42_42_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-41_42_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemTextView_null_TimelineItemTextView-Night-42_43_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Day-42_42_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Day-43_43_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Day-42_42_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Day-43_43_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Night-42_43_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Night-43_44_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Night-42_43_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemUnknownView_null_TimelineItemUnknownView-Night-43_44_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-43_43_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Day-44_44_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-43_44_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVideoView_null_TimelineItemVideoView-Night-44_45_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-45_45_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-45_45_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-45_46_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-45_46_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_10,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_10,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_10,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_11,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_12,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_13,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_14,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_14,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_14,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_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.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-44_44_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_10,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_10,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_10,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_11,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_12,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_13,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_14,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_14,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_14,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_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.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_8,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-44_45_null_9,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Day-47_47_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Day-48_48_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Day-47_47_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Day-48_48_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Night-47_48_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Night-48_49_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Night-47_48_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.group_GroupHeaderView_null_GroupHeaderView-Night-48_49_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Day-48_48_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Day-49_49_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Day-48_48_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Day-49_49_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Night-48_49_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Night-49_50_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Night-48_49_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.reactionsummary_SheetContent_null_SheetContent-Night-49_50_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-50_50_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Day-51_51_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-50_51_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt.bottomsheet_ReadReceiptBottomSheet_null_ReadReceiptBottomSheet-Night-51_52_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-49_49_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-50_50_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.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_3,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_3,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_3,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_4,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_4,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_4,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_5,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_5,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_5,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_6,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_6,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_6,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_null_7,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-49_50_null_7,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.receipt_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-50_51_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.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-51_51_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-52_52_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-51_51_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-52_52_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-51_51_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-52_52_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-51_51_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Day-52_52_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-51_52_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-52_53_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-51_52_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-52_53_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-51_52_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-52_53_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-51_52_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.retrysendmenu_RetrySendMessageMenu_null_RetrySendMessageMenu-Night-52_53_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-52_52_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Day-53_53_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_2,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-52_53_null_2,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_EncryptedHistoryBannerView_null_EncryptedHistoryBannerView-Night-53_54_null_2,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-53_53_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-54_54_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-53_53_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-54_54_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-53_53_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-54_54_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-53_53_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Day-54_54_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-53_54_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-54_55_null_0,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-53_54_null_0,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-54_55_null_0,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-53_54_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-54_55_null_1,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-53_54_null_1,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemDaySeparatorView_null_TimelineItemDaySeparatorView-Night-54_55_null_1,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Day-54_54_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Day-55_55_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Day-54_54_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Day-55_55_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Night-54_55_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Night-55_56_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Night-54_55_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemReadMarkerView_null_TimelineItemReadMarkerView-Night-55_56_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Day-55_55_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Day-56_56_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Day-55_55_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Day-56_56_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Night-55_56_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Night-56_57_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Night-55_56_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineItemRoomBeginningView_null_TimelineItemRoomBeginningView-Night-56_57_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Day-56_56_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Day-57_57_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Day-56_56_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Day-57_57_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Night-56_57_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Night-57_58_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Night-56_57_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.virtual_TimelineLoadingMoreIndicator_null_TimelineLoadingMoreIndicator-Night-57_58_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png index 497362a4c3..b36e6e0270 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00c5efab417077f1a6c0dfdbd6f63b0faa5e9ee3174f0b22aab1dc632330e6bb -size 165109 +oid sha256:36b8b5a7dd154dc69732320c35c8e0a8a77fdc03365b0ea311d03cdf3c7f71cc +size 150907 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..497362a4c3 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:00c5efab417077f1a6c0dfdbd6f63b0faa5e9ee3174f0b22aab1dc632330e6bb +size 165109 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png index 041a302f61..5ad8ec1489 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34da0e10f040d85752c06cb9af84ef02a3f93a64dfd56d4fcd9e10423e0729d5 -size 154430 +oid sha256:4536e2b04119145314c34eb0289ca2fa0028c72269fb235447f56cc6ebabb85e +size 152188 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png index b7e28156f4..041a302f61 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ab9006744fade5db0e20d5d5add106125a78a22c37c5643bb2c14a95923d901 -size 162320 +oid sha256:34da0e10f040d85752c06cb9af84ef02a3f93a64dfd56d4fcd9e10423e0729d5 +size 154430 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png index f0acb05e6e..b7e28156f4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6d9f8e62850eb1bd7cf1bf89436b18b70e976ef3c6a3c33d880d6ac2eccac29 -size 151678 +oid sha256:1ab9006744fade5db0e20d5d5add106125a78a22c37c5643bb2c14a95923d901 +size 162320 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png index b36e6e0270..f0acb05e6e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36b8b5a7dd154dc69732320c35c8e0a8a77fdc03365b0ea311d03cdf3c7f71cc -size 150907 +oid sha256:c6d9f8e62850eb1bd7cf1bf89436b18b70e976ef3c6a3c33d880d6ac2eccac29 +size 151678 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png index a5e691043b..9d17bf1483 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0937e4b1616c76b40ef2699577ce765ba7c01f5c22f12677b5c161a4899b2021 -size 163218 +oid sha256:ccbf09b9dd72f8bfd9ed0a9ea7af3990d513452614dc04ff13b0389ec097a2e5 +size 149329 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..a5e691043b --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0937e4b1616c76b40ef2699577ce765ba7c01f5c22f12677b5c161a4899b2021 +size 163218 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png index f8de679b64..c333334c6a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9071c32211b55d05947071631d2da06bb1b17f87fa087b478f92ca9faedda3c0 -size 153189 +oid sha256:fd3c1ca7b2ac2f73355b3ca71e354a2829008ced7494be0ea2212f35ede6e0cd +size 150566 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png index 0d853e581d..f8de679b64 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6e650e9054ed49ad539718843b36d6065954388cec1e41e362de5868d471398 -size 160496 +oid sha256:9071c32211b55d05947071631d2da06bb1b17f87fa087b478f92ca9faedda3c0 +size 153189 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png index b96562422a..0d853e581d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2cc8fb2604f10a423b39c75c0824632197b52304e06b5a33f3d8300ba3390327 -size 150050 +oid sha256:e6e650e9054ed49ad539718843b36d6065954388cec1e41e362de5868d471398 +size 160496 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png index 9d17bf1483..b96562422a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ccbf09b9dd72f8bfd9ed0a9ea7af3990d513452614dc04ff13b0389ec097a2e5 -size 149329 +oid sha256:2cc8fb2604f10a423b39c75c0824632197b52304e06b5a33f3d8300ba3390327 +size 150050 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Day-57_57_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Day-58_58_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Day-57_57_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Day-58_58_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Night-57_58_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Night-58_59_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Night-57_58_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.debug_EventDebugInfoView_null_EventDebugInfoView-Night-58_59_null,NEXUS_5,1.0,en].png From 4ca310f53bf5ca8dfb342bfd7efb1279fc8cf13f Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 2 Jan 2024 16:13:46 +0100 Subject: [PATCH 050/161] Fix room transition animation happens twice #2084 --- .../kotlin/io/element/android/appnav/room/RoomFlowNode.kt | 5 ++++- changelog.d/2084.bugfix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2084.bugfix diff --git a/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt index 8085494483..be9ca0ce4b 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt @@ -26,6 +26,7 @@ import androidx.compose.runtime.getValue import androidx.compose.ui.Modifier import androidx.lifecycle.lifecycleScope import com.bumble.appyx.core.modality.BuildContext +import com.bumble.appyx.core.navigation.transition.JumpToEndTransitionHandler import com.bumble.appyx.core.node.Node import com.bumble.appyx.core.node.node import com.bumble.appyx.core.plugin.Plugin @@ -130,7 +131,9 @@ class RoomFlowNode @AssistedInject constructor( @Composable override fun View(modifier: Modifier) { - BackstackView() + BackstackView( + transitionHandler = JumpToEndTransitionHandler(), + ) } } diff --git a/changelog.d/2084.bugfix b/changelog.d/2084.bugfix new file mode 100644 index 0000000000..8fb66aec73 --- /dev/null +++ b/changelog.d/2084.bugfix @@ -0,0 +1 @@ +Fix room transition animation happens twice. From 01c1ec0c038d2016de42cdc042ed6a532921e8ff Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 22:23:26 +0000 Subject: [PATCH 051/161] Update dependency app.cash.molecule:molecule-runtime to v1.3.2 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3c2fd9f51c..20c79830c3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -150,7 +150,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" } From d18d2b1dde5f8f8ea78c9829077bb62733a2e3fe Mon Sep 17 00:00:00 2001 From: ganfra Date: Wed, 3 Jan 2024 11:06:49 +0100 Subject: [PATCH 052/161] Revert compose.material3 to alpha11 as it leads to frozen timeline scrolling #2132 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3c2fd9f51c..d7867cf95f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -93,7 +93,7 @@ androidx_preference = "androidx.preference:preference:1.2.1" androidx_webkit = "androidx.webkit:webkit:1.9.0" androidx_compose_bom = { module = "androidx.compose:compose-bom", version.ref = "compose_bom" } -androidx_compose_material3 = "androidx.compose.material3:material3:1.2.0-beta01" +androidx_compose_material3 = "androidx.compose.material3:material3:1.2.0-alpha11" # Keep using alpha11 for now as it breaks timeline scrolling a bit. androidx_compose_ui = { module = "androidx.compose.ui:ui" } androidx_compose_ui_tooling = { module = "androidx.compose.ui:ui-tooling" } androidx_compose_ui_tooling_preview = { module = "androidx.compose.ui:ui-tooling-preview" } From 02cb2b4ba96dd5dc062b77ace1958e8cf9405a66 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Wed, 3 Jan 2024 12:26:46 +0100 Subject: [PATCH 053/161] Restore Github PAT in record screenshots, disable Maestro for forks (#2147) * Restore PAT for `recoverScreenshots.yml` flow. This is needed to trigger CI jobs automatically. In the case where this is not possible (forks) a message will be added to ask the user to add an empty commit to trigger the CI. * Add community PR notice * Disable Maestro steps for fork PRs --- .github/workflows/fork-pr-notice.yml | 30 +++++++++++++++++++++++++ .github/workflows/maestro.yml | 6 ++++- .github/workflows/recordScreenshots.yml | 3 ++- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/fork-pr-notice.yml diff --git a/.github/workflows/fork-pr-notice.yml b/.github/workflows/fork-pr-notice.yml new file mode 100644 index 0000000000..dd697915f7 --- /dev/null +++ b/.github/workflows/fork-pr-notice.yml @@ -0,0 +1,30 @@ +name: Community PR notice + +on: + workflow_dispatch: + pull_request_target: + types: + - opened + - reopened + +jobs: + welcome: + runs-on: ubuntu-latest + name: Welcome comment + steps: + - name: Add auto-generated commit warning + uses: actions/github-script@v6 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + 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).` + }) diff --git a/.github/workflows/maestro.yml b/.github/workflows/maestro.yml index a4bf0cc5ae..3b52235fb5 100644 --- a/.github/workflows/maestro.yml +++ b/.github/workflows/maestro.yml @@ -24,27 +24,31 @@ jobs: cancel-in-progress: true steps: - name: Remove Run-Maestro label - if: ${{ github.event.label.name == 'Run-Maestro' }} + if: ${{ !github.event.pull_request.fork && 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 }} 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 }} 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 }} 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 }} with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} # Doc says (https://github.com/mobile-dev-inc/action-maestro-cloud#android): diff --git a/.github/workflows/recordScreenshots.yml b/.github/workflows/recordScreenshots.yml index 8658fa2de7..11cd8e3352 100644 --- a/.github/workflows/recordScreenshots.yml +++ b/.github/workflows/recordScreenshots.yml @@ -43,7 +43,8 @@ jobs: with: cache-read-only: ${{ github.ref != 'refs/heads/develop' }} - name: Record screenshots + id: record run: ./.github/workflows/scripts/recordScreenshots.sh env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }} From c6d109c4241796c2f8b3f821a19473cabba283f5 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Wed, 3 Jan 2024 12:32:02 +0100 Subject: [PATCH 054/161] Implement ContentAvoidingLayout for timeline items (#2113) * Implement `ContentAvoidingLayout` for timeline items * Truncate long mention pills --------- Co-authored-by: Benoit Marty Co-authored-by: ElementBot --- .../components/TimelineEventTimestampView.kt | 8 +- .../components/TimelineItemEventRow.kt | 56 +++-- .../components/TimelineItemStateEventRow.kt | 2 - .../components/event/TimelineItemAudioView.kt | 18 +- .../event/TimelineItemEncryptedView.kt | 7 +- .../event/TimelineItemEventContentView.kt | 19 +- .../components/event/TimelineItemFileView.kt | 18 +- .../event/TimelineItemInformativeView.kt | 19 +- .../event/TimelineItemRedactedView.kt | 7 +- .../components/event/TimelineItemTextView.kt | 19 +- .../event/TimelineItemUnknownView.kt | 7 +- .../components/event/TimelineItemVoiceView.kt | 24 +- .../layout/ContentAvoidingLayout.kt | 209 ++++++++++++++++++ .../model/event/TimelineItemAudioContent.kt | 3 +- .../textcomposer/mentions/MentionSpan.kt | 76 ++++--- ...ectRoom-Day-17_17_null,NEXUS_5,1.0,en].png | 4 +- ...tRoom-Night-17_18_null,NEXUS_5,1.0,en].png | 4 +- ...wLongSenderName_0_null,NEXUS_5,1.0,en].png | 4 +- ...stamp-Day-18_18_null_0,NEXUS_5,1.0,en].png | 4 +- ...stamp-Day-18_18_null_1,NEXUS_5,1.0,en].png | 4 +- ...stamp-Day-18_18_null_2,NEXUS_5,1.0,en].png | 4 +- ...stamp-Day-18_18_null_3,NEXUS_5,1.0,en].png | 4 +- ...amp-Night-18_19_null_0,NEXUS_5,1.0,en].png | 4 +- ...amp-Night-18_19_null_1,NEXUS_5,1.0,en].png | 4 +- ...amp-Night-18_19_null_2,NEXUS_5,1.0,en].png | 4 +- ...amp-Night-18_19_null_3,NEXUS_5,1.0,en].png | 4 +- ...actions-Day-19_19_null,NEXUS_5,1.0,en].png | 4 +- ...tions-Night-19_20_null,NEXUS_5,1.0,en].png | 4 +- ...ithRR-Day-20_20_null_0,NEXUS_5,1.0,en].png | 4 +- ...ithRR-Day-20_20_null_1,NEXUS_5,1.0,en].png | 4 +- ...ithRR-Day-20_20_null_2,NEXUS_5,1.0,en].png | 4 +- ...hRR-Night-20_21_null_0,NEXUS_5,1.0,en].png | 4 +- ...hRR-Night-20_21_null_1,NEXUS_5,1.0,en].png | 4 +- ...hRR-Night-20_21_null_2,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_0,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_1,NEXUS_5,1.0,en].png | 4 +- ...eply-Day-21_21_null_10,NEXUS_5,1.0,en].png | 4 +- ...eply-Day-21_21_null_11,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_2,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_3,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_4,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_5,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_6,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_7,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_8,NEXUS_5,1.0,en].png | 4 +- ...Reply-Day-21_21_null_9,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_0,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_1,NEXUS_5,1.0,en].png | 4 +- ...ly-Night-21_22_null_10,NEXUS_5,1.0,en].png | 4 +- ...ly-Night-21_22_null_11,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_2,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_3,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_4,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_5,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_6,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_7,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_8,NEXUS_5,1.0,en].png | 4 +- ...ply-Night-21_22_null_9,NEXUS_5,1.0,en].png | 4 +- ...ventRow-Day-16_16_null,NEXUS_5,1.0,en].png | 4 +- ...ntRow-Night-16_17_null,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_0,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_1,NEXUS_5,1.0,en].png | 4 +- ...neView-Day-8_8_null_12,NEXUS_5,1.0,en].png | 4 +- ...neView-Day-8_8_null_13,NEXUS_5,1.0,en].png | 4 +- ...neView-Day-8_8_null_14,NEXUS_5,1.0,en].png | 4 +- ...neView-Day-8_8_null_15,NEXUS_5,1.0,en].png | 4 +- ...neView-Day-8_8_null_16,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_4,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_5,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_6,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_7,NEXUS_5,1.0,en].png | 4 +- ...ineView-Day-8_8_null_8,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_0,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_1,NEXUS_5,1.0,en].png | 4 +- ...View-Night-8_9_null_12,NEXUS_5,1.0,en].png | 4 +- ...View-Night-8_9_null_13,NEXUS_5,1.0,en].png | 4 +- ...View-Night-8_9_null_14,NEXUS_5,1.0,en].png | 4 +- ...View-Night-8_9_null_15,NEXUS_5,1.0,en].png | 4 +- ...View-Night-8_9_null_16,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_4,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_5,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_6,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_7,NEXUS_5,1.0,en].png | 4 +- ...eView-Night-8_9_null_8,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_0,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_1,NEXUS_5,1.0,en].png | 4 +- ...esView-Day-0_0_null_10,NEXUS_5,1.0,en].png | 4 +- ...esView-Day-0_0_null_11,NEXUS_5,1.0,en].png | 4 +- ...esView-Day-0_0_null_12,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_3,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_4,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_5,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_6,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_7,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_8,NEXUS_5,1.0,en].png | 4 +- ...gesView-Day-0_0_null_9,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_0,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_1,NEXUS_5,1.0,en].png | 4 +- ...View-Night-0_1_null_10,NEXUS_5,1.0,en].png | 4 +- ...View-Night-0_1_null_11,NEXUS_5,1.0,en].png | 4 +- ...View-Night-0_1_null_12,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_3,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_4,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_5,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_6,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_7,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_8,NEXUS_5,1.0,en].png | 4 +- ...sView-Night-0_1_null_9,NEXUS_5,1.0,en].png | 4 +- ...ionSpan-Day-18_19_null,NEXUS_5,1.0,en].png | 4 +- ...nSpan-Night-18_20_null,NEXUS_5,1.0,en].png | 4 +- 110 files changed, 573 insertions(+), 299 deletions(-) create mode 100644 features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineEventTimestampView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineEventTimestampView.kt index 3451c1590c..8283380655 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineEventTimestampView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineEventTimestampView.kt @@ -19,6 +19,7 @@ package io.element.android.features.messages.impl.timeline.components import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.combinedClickable import androidx.compose.foundation.interaction.MutableInteractionSource +import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.padding @@ -69,7 +70,8 @@ fun TimelineEventTimestampView( Row( modifier = Modifier .then(clickModifier) - .padding(start = 16.dp) // Add extra padding for touch target size + // Add extra padding for touch target size + .padding(PaddingValues(start = TimelineEventTimestampViewDefaults.spacing)) .then(modifier), verticalAlignment = Alignment.CenterVertically, ) { @@ -107,3 +109,7 @@ internal fun TimelineEventTimestampViewPreview(@PreviewParameter(TimelineItemEve onLongClick = {}, ) } + +object TimelineEventTimestampViewDefaults { + val spacing = 16.dp +} diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt index b5ce459a12..6a4095f07b 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt @@ -56,6 +56,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.IntOffset import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex @@ -67,7 +68,8 @@ import io.element.android.features.messages.impl.timeline.TimelineEvents import io.element.android.features.messages.impl.timeline.TimelineRoomInfo import io.element.android.features.messages.impl.timeline.aTimelineItemEvent import io.element.android.features.messages.impl.timeline.components.event.TimelineItemEventContentView -import io.element.android.features.messages.impl.timeline.components.event.toExtraPadding +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayout +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.components.receipt.ReadReceiptViewState import io.element.android.features.messages.impl.timeline.components.receipt.TimelineItemReadReceiptView import io.element.android.features.messages.impl.timeline.model.InReplyToDetails @@ -80,6 +82,7 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemPollContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStickerContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContent +import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVoiceContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemImageContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemTextContent import io.element.android.features.messages.impl.timeline.model.event.canBeRepliedTo @@ -448,12 +451,13 @@ private fun MessageEventBubbleContent( fun WithTimestampLayout( timestampPosition: TimestampPosition, modifier: Modifier = Modifier, - content: @Composable () -> Unit, + canShrinkContent: Boolean = false, + content: @Composable (onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit) -> Unit, ) { when (timestampPosition) { TimestampPosition.Overlay -> Box(modifier, contentAlignment = Alignment.Center) { - content() + content {} TimelineEventTimestampView( event = event, onClick = onTimestampClicked, @@ -466,20 +470,26 @@ private fun MessageEventBubbleContent( ) } TimestampPosition.Aligned -> - Box(modifier) { - content() - TimelineEventTimestampView( - event = event, - onClick = onTimestampClicked, - onLongClick = ::onTimestampLongClick, - modifier = Modifier - .align(Alignment.BottomEnd) - .padding(horizontal = 8.dp, vertical = 4.dp) - ) - } + ContentAvoidingLayout( + modifier = modifier, + // The spacing is negative to make the content overlap the empty space at the start of the timestamp + spacing = (-4).dp, + overlayOffset = DpOffset(0.dp, -1.dp), + shrinkContent = canShrinkContent, + content = { content(this::onContentLayoutChanged) }, + overlay = { + TimelineEventTimestampView( + event = event, + onClick = onTimestampClicked, + onLongClick = ::onTimestampLongClick, + modifier = Modifier + .padding(horizontal = 8.dp, vertical = 4.dp) + ) + } + ) TimestampPosition.Below -> Column(modifier) { - content() + content {} TimelineEventTimestampView( event = event, onClick = onTimestampClicked, @@ -498,7 +508,8 @@ private fun MessageEventBubbleContent( timestampPosition: TimestampPosition, showThreadDecoration: Boolean, inReplyToDetails: InReplyToDetails?, - modifier: Modifier = Modifier + modifier: Modifier = Modifier, + canShrinkContent: Boolean = false, ) { val context = LocalContext.current val timestampLayoutModifier: Modifier @@ -515,7 +526,8 @@ private fun MessageEventBubbleContent( } timestampPosition != TimestampPosition.Overlay -> { timestampLayoutModifier = Modifier - contentModifier = Modifier.padding(start = 12.dp, end = 12.dp, top = 8.dp, bottom = 8.dp) + contentModifier = Modifier + .padding(start = 12.dp, end = 12.dp, top = 8.dp, bottom = 8.dp) } else -> { timestampLayoutModifier = Modifier @@ -530,8 +542,9 @@ private fun MessageEventBubbleContent( val contentWithTimestamp = @Composable { WithTimestampLayout( timestampPosition = timestampPosition, + canShrinkContent = canShrinkContent, modifier = timestampLayoutModifier, - ) { + ) { onContentLayoutChanged -> TimelineItemEventContentView( content = event.content, onLinkClicked = { url -> @@ -548,9 +561,9 @@ private fun MessageEventBubbleContent( } } }, - extraPadding = event.toExtraPadding(), eventSink = eventSink, - modifier = contentModifier, + onContentLayoutChanged = onContentLayoutChanged, + modifier = contentModifier ) } } @@ -594,6 +607,7 @@ private fun MessageEventBubbleContent( showThreadDecoration = event.isThreaded, timestampPosition = timestampPosition, inReplyToDetails = event.inReplyTo, + canShrinkContent = event.content is TimelineItemVoiceContent, modifier = bubbleModifier ) } @@ -655,7 +669,7 @@ internal fun TimelineItemEventRowPreview() = ElementPreview { isMine = it, content = aTimelineItemTextContent().copy( body = "A long text which will be displayed on several lines and" + - " hopefully can be manually adjusted to test different behaviors." + " hopefully can be manually adjusted to test different behaviors." ), groupPosition = TimelineItemGroupPosition.First, ), diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemStateEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemStateEventRow.kt index b2557b378d..d126b3c2b2 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemStateEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemStateEventRow.kt @@ -32,7 +32,6 @@ import androidx.compose.ui.zIndex import io.element.android.features.messages.impl.timeline.TimelineEvents import io.element.android.features.messages.impl.timeline.aTimelineItemEvent import io.element.android.features.messages.impl.timeline.components.event.TimelineItemEventContentView -import io.element.android.features.messages.impl.timeline.components.event.noExtraPadding import io.element.android.features.messages.impl.timeline.components.receipt.ReadReceiptViewState import io.element.android.features.messages.impl.timeline.components.receipt.TimelineItemReadReceiptView import io.element.android.features.messages.impl.timeline.components.receipt.aReadReceiptData @@ -81,7 +80,6 @@ fun TimelineItemStateEventRow( TimelineItemEventContentView( content = event.content, onLinkClicked = {}, - extraPadding = noExtraPadding, eventSink = eventSink, modifier = Modifier.defaultTimelineContentPadding() ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt index 257edbe28c..d4a2dbabc9 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemAudioView.kt @@ -34,6 +34,8 @@ import androidx.compose.ui.text.style.TextOverflow 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.timeline.components.layout.ContentAvoidingLayout +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemAudioContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemAudioContentProvider import io.element.android.libraries.designsystem.preview.ElementPreview @@ -44,15 +46,17 @@ import io.element.android.libraries.designsystem.theme.components.Text @Composable fun TimelineItemAudioView( content: TimelineItemAudioContent, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier, ) { + val iconSize = 32.dp + val spacing = 8.dp Row( modifier = modifier, ) { Box( modifier = Modifier - .size(32.dp) + .size(iconSize) .clip(CircleShape) .background(ElementTheme.materialColors.background), contentAlignment = Alignment.Center, @@ -65,7 +69,7 @@ fun TimelineItemAudioView( .size(16.dp), ) } - Spacer(Modifier.width(8.dp)) + Spacer(Modifier.width(spacing)) Column { Text( text = content.body, @@ -75,11 +79,15 @@ fun TimelineItemAudioView( overflow = TextOverflow.Ellipsis ) Text( - text = content.fileExtensionAndSize + extraPadding.getStr(ElementTheme.typography.fontBodySmRegular), + text = content.fileExtensionAndSize, color = ElementTheme.materialColors.secondary, style = ElementTheme.typography.fontBodySmRegular, maxLines = 1, overflow = TextOverflow.Ellipsis, + onTextLayout = ContentAvoidingLayout.measureLastTextLine( + onContentLayoutChanged = onContentLayoutChanged, + extraWidth = iconSize + spacing + ) ) } } @@ -91,6 +99,6 @@ internal fun TimelineItemAudioViewPreview(@PreviewParameter(TimelineItemAudioCon ElementPreview { TimelineItemAudioView( content, - extraPadding = noExtraPadding, + onContentLayoutChanged = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt index d488d01ef4..26e5388c74 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEncryptedView.kt @@ -19,6 +19,7 @@ package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemEncryptedContent import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -29,14 +30,14 @@ import io.element.android.libraries.ui.strings.CommonStrings @Composable fun TimelineItemEncryptedView( @Suppress("UNUSED_PARAMETER") content: TimelineItemEncryptedContent, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier ) { TimelineItemInformativeView( text = stringResource(id = CommonStrings.common_waiting_for_decryption_key), iconDescription = stringResource(id = CommonStrings.dialog_title_warning), iconResourceId = CommonDrawables.ic_waiting_to_decrypt, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) } @@ -48,6 +49,6 @@ internal fun TimelineItemEncryptedViewPreview() = ElementPreview { content = TimelineItemEncryptedContent( data = UnableToDecryptContent.Data.Unknown ), - extraPadding = noExtraPadding + onContentLayoutChanged = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt index 175adf4d38..e7dbf678af 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemEventContentView.kt @@ -19,6 +19,7 @@ package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import io.element.android.features.messages.impl.timeline.TimelineEvents +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.di.LocalTimelineItemPresenterFactories import io.element.android.features.messages.impl.timeline.di.rememberPresenter import io.element.android.features.messages.impl.timeline.model.event.TimelineItemAudioContent @@ -41,32 +42,32 @@ import io.element.android.libraries.architecture.Presenter @Composable fun TimelineItemEventContentView( content: TimelineItemEventContent, - extraPadding: ExtraPadding, onLinkClicked: (url: String) -> Unit, eventSink: (TimelineEvents) -> Unit, - modifier: Modifier = Modifier + modifier: Modifier = Modifier, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit = {}, ) { val presenterFactories = LocalTimelineItemPresenterFactories.current when (content) { is TimelineItemEncryptedContent -> TimelineItemEncryptedView( content = content, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) is TimelineItemRedactedContent -> TimelineItemRedactedView( content = content, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) is TimelineItemTextBasedContent -> TimelineItemTextView( content = content, - extraPadding = extraPadding, modifier = modifier, onLinkClicked = onLinkClicked, + onContentLayoutChanged = onContentLayoutChanged ) is TimelineItemUnknownContent -> TimelineItemUnknownView( content = content, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) is TimelineItemLocationContent -> TimelineItemLocationView( @@ -87,12 +88,12 @@ fun TimelineItemEventContentView( ) is TimelineItemFileContent -> TimelineItemFileView( content = content, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) is TimelineItemAudioContent -> TimelineItemAudioView( content = content, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) is TimelineItemStateContent -> TimelineItemStateView( @@ -109,7 +110,7 @@ fun TimelineItemEventContentView( TimelineItemVoiceView( state = presenter.present(), content = content, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt index f0dd10763a..7058f143cf 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemFileView.kt @@ -33,6 +33,8 @@ import androidx.compose.ui.text.style.TextOverflow 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.timeline.components.layout.ContentAvoidingLayout +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemFileContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemFileContentProvider import io.element.android.libraries.designsystem.preview.ElementPreview @@ -44,15 +46,17 @@ import io.element.android.libraries.designsystem.utils.CommonDrawables @Composable fun TimelineItemFileView( content: TimelineItemFileContent, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier, ) { + val iconSize = 32.dp + val spacing = 8.dp Row( modifier = modifier, ) { Box( modifier = Modifier - .size(32.dp) + .size(iconSize) .clip(CircleShape) .background(ElementTheme.materialColors.background), contentAlignment = Alignment.Center, @@ -66,7 +70,7 @@ fun TimelineItemFileView( .rotate(-45f), ) } - Spacer(Modifier.width(8.dp)) + Spacer(Modifier.width(spacing)) Column { Text( text = content.body, @@ -76,11 +80,15 @@ fun TimelineItemFileView( overflow = TextOverflow.Ellipsis ) Text( - text = content.fileExtensionAndSize + extraPadding.getStr(textStyle = ElementTheme.typography.fontBodySmRegular), + text = content.fileExtensionAndSize, color = ElementTheme.materialColors.secondary, style = ElementTheme.typography.fontBodySmRegular, maxLines = 1, overflow = TextOverflow.Ellipsis, + onTextLayout = ContentAvoidingLayout.measureLastTextLine( + onContentLayoutChanged = onContentLayoutChanged, + extraWidth = iconSize + spacing + ) ) } } @@ -91,6 +99,6 @@ fun TimelineItemFileView( internal fun TimelineItemFileViewPreview(@PreviewParameter(TimelineItemFileContentProvider::class) content: TimelineItemFileContent) = ElementPreview { TimelineItemFileView( content, - extraPadding = noExtraPadding, + onContentLayoutChanged = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt index a81e928f18..384fd94ead 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt @@ -25,9 +25,11 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.text.font.FontStyle import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.libraries.designsystem.icons.CompoundDrawables import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -39,12 +41,19 @@ fun TimelineItemInformativeView( text: String, iconDescription: String, @DrawableRes iconResourceId: Int, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier ) { Row( - modifier = modifier, - verticalAlignment = Alignment.CenterVertically + modifier = modifier.onSizeChanged { size -> + onContentLayoutChanged( + ContentAvoidingLayoutData( + contentWidth = size.width, + contentHeight = size.height, + ) + ) + }, + verticalAlignment = Alignment.CenterVertically, ) { Icon( resourceId = iconResourceId, @@ -57,7 +66,7 @@ fun TimelineItemInformativeView( fontStyle = FontStyle.Italic, color = MaterialTheme.colorScheme.secondary, style = ElementTheme.typography.fontBodyMdRegular, - text = text + extraPadding.getStr(textStyle = ElementTheme.typography.fontBodyMdRegular) + text = text ) } } @@ -69,6 +78,6 @@ internal fun TimelineItemInformativeViewPreview() = ElementPreview { text = "Info", iconDescription = "", iconResourceId = CompoundDrawables.ic_delete, - extraPadding = noExtraPadding, + onContentLayoutChanged = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt index 7ff7a23e7e..ba57c7e2af 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemRedactedView.kt @@ -19,6 +19,7 @@ package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemRedactedContent import io.element.android.libraries.designsystem.icons.CompoundDrawables import io.element.android.libraries.designsystem.preview.ElementPreview @@ -28,14 +29,14 @@ import io.element.android.libraries.ui.strings.CommonStrings @Composable fun TimelineItemRedactedView( @Suppress("UNUSED_PARAMETER") content: TimelineItemRedactedContent, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier ) { TimelineItemInformativeView( text = stringResource(id = CommonStrings.common_message_removed), iconDescription = stringResource(id = CommonStrings.common_message_removed), iconResourceId = CompoundDrawables.ic_delete, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) } @@ -45,6 +46,6 @@ fun TimelineItemRedactedView( internal fun TimelineItemRedactedViewPreview() = ElementPreview { TimelineItemRedactedView( TimelineItemRedactedContent, - extraPadding = noExtraPadding + onContentLayoutChanged = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt index dfe46d09f9..dfa2ce92c6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt @@ -22,12 +22,11 @@ import androidx.compose.material3.LocalContentColor import androidx.compose.material3.LocalTextStyle import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider -import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.PreviewParameter -import androidx.compose.ui.unit.dp -import androidx.core.text.buildSpannedString import io.element.android.compound.theme.ElementTheme +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayout +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemTextBasedContentProvider import io.element.android.libraries.designsystem.preview.ElementPreview @@ -38,9 +37,9 @@ import io.element.android.wysiwyg.compose.EditorStyledText @Composable fun TimelineItemTextView( content: TimelineItemTextBasedContent, - extraPadding: ExtraPadding, onLinkClicked: (String) -> Unit, modifier: Modifier = Modifier, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit = {}, ) { CompositionLocalProvider( LocalContentColor provides ElementTheme.colors.textPrimary, @@ -49,19 +48,14 @@ fun TimelineItemTextView( val formattedBody = content.formattedBody val body = SpannableString(formattedBody ?: content.body) - val extraPaddingText = extraPadding.getStr() Box(modifier) { - val textWithPadding = remember(body) { - buildSpannedString { - append(body) - append(extraPaddingText) - } - } EditorStyledText( - text = textWithPadding, + text = body, onLinkClickedListener = onLinkClicked, style = ElementRichTextEditorStyle.textStyle(), + onTextLayout = ContentAvoidingLayout.measureLegacyLastTextLine(onContentLayoutChanged = onContentLayoutChanged), + releaseOnDetach = false, ) } } @@ -74,7 +68,6 @@ internal fun TimelineItemTextViewPreview( ) = ElementPreview { TimelineItemTextView( content = content, - extraPadding = ExtraPadding(extraWidth = 32.dp), onLinkClicked = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt index 63fc5fd00b..c14eefc1a2 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemUnknownView.kt @@ -19,6 +19,7 @@ package io.element.android.features.messages.impl.timeline.components.event import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemUnknownContent import io.element.android.libraries.designsystem.icons.CompoundDrawables import io.element.android.libraries.designsystem.preview.ElementPreview @@ -28,14 +29,14 @@ import io.element.android.libraries.ui.strings.CommonStrings @Composable fun TimelineItemUnknownView( @Suppress("UNUSED_PARAMETER") content: TimelineItemUnknownContent, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier ) { TimelineItemInformativeView( text = stringResource(id = CommonStrings.common_unsupported_event), iconDescription = stringResource(id = CommonStrings.dialog_title_warning), iconResourceId = CompoundDrawables.ic_info_solid, - extraPadding = extraPadding, + onContentLayoutChanged = onContentLayoutChanged, modifier = modifier ) } @@ -45,6 +46,6 @@ fun TimelineItemUnknownView( internal fun TimelineItemUnknownViewPreview() = ElementPreview { TimelineItemUnknownView( content = TimelineItemUnknownContent, - extraPadding = noExtraPadding + onContentLayoutChanged = {}, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt index ed7e031392..1b1976e908 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt @@ -34,6 +34,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import androidx.compose.ui.semantics.contentDescription @@ -43,6 +44,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.tooling.preview.PreviewParameterProvider import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme +import io.element.android.features.messages.impl.timeline.components.layout.ContentAvoidingLayoutData import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVoiceContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVoiceContentProvider import io.element.android.features.messages.impl.voicemessages.timeline.VoiceMessageEvents @@ -64,7 +66,7 @@ import kotlinx.coroutines.delay fun TimelineItemVoiceView( state: VoiceMessageState, content: TimelineItemVoiceContent, - extraPadding: ExtraPadding, + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, modifier: Modifier = Modifier, ) { fun playPause() { @@ -73,9 +75,18 @@ fun TimelineItemVoiceView( val a11y = stringResource(CommonStrings.common_voice_message) Row( - modifier = modifier.semantics { - contentDescription = a11y - }, + modifier = modifier + .semantics { + contentDescription = a11y + } + .onSizeChanged { + onContentLayoutChanged( + ContentAvoidingLayoutData( + contentWidth = it.width, + contentHeight = it.height, + ) + ) + }, verticalAlignment = Alignment.CenterVertically, ) { when (state.button) { @@ -105,7 +116,6 @@ fun TimelineItemVoiceView( seekEnabled = !context.isScreenReaderEnabled(), onSeek = { state.eventSink(VoiceMessageEvents.Seek(it)) }, ) - Spacer(Modifier.width(extraPadding.getDpSize())) } } @@ -237,7 +247,7 @@ internal fun TimelineItemVoiceViewPreview( TimelineItemVoiceView( state = timelineItemVoiceViewParameters.state, content = timelineItemVoiceViewParameters.content, - extraPadding = noExtraPadding, + onContentLayoutChanged = {}, ) } @@ -250,7 +260,7 @@ internal fun TimelineItemVoiceViewUnifiedPreview() = ElementPreview { TimelineItemVoiceView( state = it.state, content = it.content, - extraPadding = noExtraPadding, + onContentLayoutChanged = {}, ) } } 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 new file mode 100644 index 0000000000..c09221000f --- /dev/null +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/layout/ContentAvoidingLayout.kt @@ -0,0 +1,209 @@ +/* + * 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.features.messages.impl.timeline.components.layout + +import android.text.Layout +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.platform.LocalLayoutDirection +import androidx.compose.ui.text.TextLayoutResult +import androidx.compose.ui.unit.Constraints +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.DpOffset +import androidx.compose.ui.unit.LayoutDirection +import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.text.roundToPx +import io.element.android.wysiwyg.compose.EditorStyledText +import kotlin.math.max +import kotlin.math.min +import kotlin.math.roundToInt + +/** + * A layout with 2 children: the [content] and the [overlay]. + * + * It will try to place the [overlay] on top of the [content] if possible, avoiding the area of it that is non-overlapping. + * If the [overlay] can't be placed on top of the [content], it will be placed to the right of it, if it fits, otherwise, to its bottom in a new row. + * + * @param overlay The 'overlay' component of the layout, which will be positioned relative to the [content]. + * @param modifier The modifier for the layout. + * @param spacing The spacing between the [content] and the [overlay]. Defaults to `0.dp`. + * @param overlayOffset The offset of the [overlay] from the bottom right corner of the [content]. + * @param shrinkContent Whether the content should be shrunk to fit the available width or not. Defaults to `false`. + * @param content The 'content' component of the layout. + */ +@Composable +fun ContentAvoidingLayout( + overlay: @Composable () -> Unit, + modifier: Modifier = Modifier, + spacing: Dp = 0.dp, + overlayOffset: DpOffset = DpOffset.Zero, + shrinkContent: Boolean = false, + content: @Composable ContentAvoidingLayoutScope.() -> Unit, +) { + val scope = remember { ContentAvoidingLayoutScopeInstance() } + + Layout( + modifier = modifier, + content = { + scope.content() + overlay() + } + ) { measurables, constraints -> + assert(measurables.size == 2) { "ContentAvoidingLayout must have exactly 2 children" } + + // 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 contentConstraints = if (shrinkContent) { + Constraints(minWidth = 0, maxWidth = constraints.maxWidth - overlayPlaceable.width) + } else { + Constraints(minWidth = 0, maxWidth = constraints.maxWidth) + } + val contentPlaceable = measurables.first().measure(contentConstraints) + + var layoutWidth = contentPlaceable.width + var layoutHeight = contentPlaceable.height + + val data = scope.data + + // Free space = width of the whole component - width of its non overlapping contents + val freeSpace = max(contentPlaceable.width - data.nonOverlappingContentWidth, 0) + + when { + // When the content + the overlay don't fit in the available max width, we need to move the overlay to a new row + !shrinkContent && data.nonOverlappingContentWidth + overlayPlaceable.width > constraints.maxWidth -> { + layoutHeight += overlayPlaceable.height + overlayOffset.y.roundToPx() + } + // If the content is smaller than the available max width, we can move the overlay to the right of the content + contentPlaceable.width < constraints.maxWidth -> { + // If both the content and the overlay plus the padding can fit inside the current layoutWidth, there is no need to increase it + if (freeSpace < overlayPlaceable.width + spacing.roundToPx()) { + // Otherwise, we need to increase it by the width of the overlay + some padding adjustments + val calculatedWidth = max(data.nonOverlappingContentWidth + overlayPlaceable.width + spacing.roundToPx(), contentPlaceable.width) + layoutWidth = min(calculatedWidth, constraints.maxWidth) + } + } + else -> Unit + } + + layoutWidth = max(layoutWidth, constraints.minWidth) + layoutHeight = max(layoutHeight, constraints.minHeight) + + layout(layoutWidth, layoutHeight) { + contentPlaceable.placeRelative(0, 0) + overlayPlaceable.placeRelative(layoutWidth - overlayPlaceable.width, layoutHeight - overlayPlaceable.height + overlayOffset.y.roundToPx()) + } + } +} + +/** + * Data class to hold the content layout data. + * This is used to pass the data from the content to the [ContentAvoidingLayout]. + * + * @param contentWidth The full width of the content in pixels. + * @param contentHeight The full height of the content in pixels. + * @param nonOverlappingContentWidth The width of the part of the content that can't overlap with the timestamp. + * @param nonOverlappingContentHeight The height of the part of the content that can't overlap with the timestamp. + */ +@Suppress("DataClassShouldBeImmutable") +data class ContentAvoidingLayoutData( + var contentWidth: Int = 0, + var contentHeight: Int = 0, + var nonOverlappingContentWidth: Int = contentWidth, + var nonOverlappingContentHeight: Int = contentHeight, +) + +/** + * A scope for the [ContentAvoidingLayout]. + */ +interface ContentAvoidingLayoutScope { + + /** + * It should be called when the content layout changes, so it can update the [ContentAvoidingLayoutData] and measure and layout the content properly. + */ + fun onContentLayoutChanged(data: ContentAvoidingLayoutData) +} + +private class ContentAvoidingLayoutScopeInstance( + val data: ContentAvoidingLayoutData = ContentAvoidingLayoutData(), +) : ContentAvoidingLayoutScope { + override fun onContentLayoutChanged(data: ContentAvoidingLayoutData) { + this.data.contentWidth = data.contentWidth + this.data.contentHeight = data.contentHeight + this.data.nonOverlappingContentWidth = data.nonOverlappingContentWidth + this.data.nonOverlappingContentHeight = data.nonOverlappingContentHeight + } +} + +object ContentAvoidingLayout { + /** + * Measures the last line of a [TextLayoutResult] and calls [onContentLayoutChanged] with the [ContentAvoidingLayoutData]. + * + * This is supposed to be used in the `onTextLayout` parameter of a Text based component. + */ + @Composable + internal fun measureLastTextLine( + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, + extraWidth: Dp = 0.dp, + ): ((TextLayoutResult) -> Unit) { + val layoutDirection = LocalLayoutDirection.current + val extraWidthPx = extraWidth.roundToPx() + return { textLayout: TextLayoutResult -> + // We need to add the external extra width so it's not taken into account as 'free space' + val lastLineWidth = when (layoutDirection) { + LayoutDirection.Ltr -> textLayout.getLineRight(textLayout.lineCount - 1).roundToInt() + LayoutDirection.Rtl -> textLayout.getLineLeft(textLayout.lineCount - 1).roundToInt() + } + val lastLineHeight = textLayout.getLineBottom(textLayout.lineCount - 1).roundToInt() + onContentLayoutChanged( + ContentAvoidingLayoutData( + contentWidth = textLayout.size.width + extraWidthPx, + contentHeight = textLayout.size.height, + nonOverlappingContentWidth = lastLineWidth + extraWidthPx, + nonOverlappingContentHeight = lastLineHeight, + ) + ) + } + } + + /** + * Measures the last line of a [Layout] and calls [onContentLayoutChanged] with the [ContentAvoidingLayoutData]. + * + * This is supposed to be used in the `onTextLayout` parameter of an [EditorStyledText] component. + */ + @Composable + internal fun measureLegacyLastTextLine( + onContentLayoutChanged: (ContentAvoidingLayoutData) -> Unit, + extraWidth: Dp = 0.dp, + ): ((Layout) -> Unit) { + val extraWidthPx = extraWidth.roundToPx() + return { textLayout: Layout -> + // We need to add the external extra width so it's not taken into account as 'free space' + val lastLineWidth = textLayout.getLineWidth(textLayout.lineCount - 1).roundToInt() + val lastLineHeight = textLayout.getLineBottom(textLayout.lineCount - 1) + onContentLayoutChanged( + ContentAvoidingLayoutData( + contentWidth = textLayout.width + extraWidthPx, + contentHeight = textLayout.height, + nonOverlappingContentWidth = lastLineWidth + extraWidthPx, + nonOverlappingContentHeight = lastLineHeight, + ) + ) + } + } +} diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemAudioContent.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemAudioContent.kt index aa228efcbd..020e579aa4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemAudioContent.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemAudioContent.kt @@ -17,6 +17,7 @@ package io.element.android.features.messages.impl.timeline.model.event import io.element.android.libraries.matrix.api.media.MediaSource +import io.element.android.libraries.mediaviewer.api.helper.formatFileExtensionAndSize import kotlin.time.Duration data class TimelineItemAudioContent( @@ -29,7 +30,7 @@ data class TimelineItemAudioContent( ) : TimelineItemEventContent { val fileExtensionAndSize = - io.element.android.libraries.mediaviewer.api.helper.formatFileExtensionAndSize( + formatFileExtensionAndSize( fileExtension, formattedFileSize ) diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/mentions/MentionSpan.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/mentions/MentionSpan.kt index ff93bb754a..7e965d6b05 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/mentions/MentionSpan.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/mentions/MentionSpan.kt @@ -21,6 +21,8 @@ import android.graphics.Paint import android.graphics.RectF import android.graphics.Typeface import android.text.style.ReplacementSpan +import io.element.android.libraries.core.extensions.orEmpty +import kotlin.math.min import kotlin.math.roundToInt class MentionSpan( @@ -32,51 +34,63 @@ class MentionSpan( val typeface: Typeface = Typeface.DEFAULT, ) : ReplacementSpan() { + companion object { + private const val MAX_LENGTH = 20 + } + + private var actualText: CharSequence? = null + private var textWidth = 0 + private var cachedRect: RectF = RectF() + private val backgroundPaint = Paint().apply { + isAntiAlias = true + color = backgroundColor + } + override fun getSize(paint: Paint, text: CharSequence?, start: Int, end: Int, fm: Paint.FontMetricsInt?): Int { - val mentionText = getActualText(text, start) - var actualEnd = end - if (mentionText != text.toString()) { - actualEnd = end + 1 - } + val mentionText = getActualText(text, start, end) paint.typeface = typeface - return paint.measureText(mentionText, start, actualEnd).roundToInt() + startPadding + endPadding + textWidth = paint.measureText(mentionText, 0, mentionText.length).roundToInt() + return textWidth + startPadding + endPadding } override fun draw(canvas: Canvas, text: CharSequence?, start: Int, end: Int, x: Float, top: Int, y: Int, bottom: Int, paint: Paint) { - val mentionText = getActualText(text, start) - var actualEnd = end - if (mentionText != text.toString()) { - actualEnd = end + 1 - } - val textWidth = paint.measureText(mentionText, start, actualEnd) + val mentionText = getActualText(text, start, end) + // Extra vertical space to add below the baseline (y). This helps us center the span vertically val extraVerticalSpace = y + paint.ascent() + paint.descent() - top - val rect = RectF(x, top.toFloat(), x + textWidth + startPadding + endPadding, y.toFloat() + extraVerticalSpace) - paint.color = backgroundColor - canvas.drawRoundRect(rect, rect.height() / 2, rect.height() / 2, paint) + if (cachedRect.isEmpty) { + cachedRect = RectF(x, top.toFloat(), x + textWidth + startPadding + endPadding, y.toFloat() + extraVerticalSpace) + } + + val rect = cachedRect + val radius = rect.height() / 2 + canvas.drawRoundRect(rect, radius, radius, backgroundPaint) paint.color = textColor paint.typeface = typeface - canvas.drawText(mentionText, start, actualEnd, x + startPadding, y.toFloat(), paint) + canvas.drawText(mentionText, 0, mentionText.length, x + startPadding, y.toFloat(), paint) } - private fun getActualText(text: CharSequence?, start: Int): String { - return when (type) { - Type.USER -> { - val mentionText = text.toString() - if (start in mentionText.indices && mentionText[start] != '@') { - mentionText.replaceRange(start, start, "@") - } else { - mentionText + private fun getActualText(text: CharSequence?, start: Int, end: Int): CharSequence { + if (actualText != null) return actualText!! + return buildString { + val mentionText = text.orEmpty() + when (type) { + Type.USER -> { + if (start in mentionText.indices && mentionText[start] != '@') { + append("@") + } + } + Type.ROOM -> { + if (start in mentionText.indices && mentionText[start] != '#') { + append("#") + } } } - Type.ROOM -> { - val mentionText = text.toString() - if (start in mentionText.indices && mentionText[start] != '#') { - mentionText.replaceRange(start, start, "#") - } else { - mentionText - } + append(mentionText.substring(start, min(end, start + MAX_LENGTH))) + if (end - start > MAX_LENGTH) { + append("…") } + actualText = this } } diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png index 28d5541975..64fcfd1eaa 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bee7c8c0c233a2ef943e8804c77597f70672c2fe23f697295889ce06f8ba7a07 -size 139476 +oid sha256:fd8440df56bc810e9d01167580eca5409e1e0458c463f0e1d039d092ff35ed49 +size 139471 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png index 7f791c9f01..5b697f6788 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b780f7b6ade56b031f25829bbe313c1e71d53f3554ebdee61faa46b2f92c218f -size 135788 +oid sha256:eb450d60e438e212aeecb8e82771b54d1eeeeaf1063a0bb80c8f4c070e181ba7 +size 135783 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png index 120f3d26e1..badab1b02f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c691a70d0111d0b395e76e7ba94b382ffd470ea066e229bf182f8fbf631c899b -size 18242 +oid sha256:795ff3e304af3dbfb08dbe5f6baf866fce06301d722ea8044be609e89288ea82 +size 18245 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 0c606c1fbb..39dfb13f1f 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:851fc21681b724affa557d219b8e7be86b6058b788a5f2983f0db96f113f00eb -size 62632 +oid sha256:79b9fa345741c9ac7d0692d8a703366a956e65ec8de90ed56565de74792e0463 +size 62366 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 b4d9d57365..d02ad0ab57 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:d9a54f34c27eb88d05eeb6305e73d5e6b0d1c347601a2d3a3426520c2ab1703e -size 65272 +oid sha256:9c86dd7eab9b07bd226b5f05c0f50fde475118504be789659f1536cdccb3ec06 +size 65149 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 792ad04913..77cb0a1278 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:bd2f473ac5685ea4dfbb565204e3d3f1b608f0b44a06c382f562b97846b1d75e -size 69546 +oid sha256:8e266c57ad969e67ab24546573cf7e67b58734b3dc24f18ee872b043c6279f4f +size 69476 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 e2b256e651..eaffe6f4c8 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:bb97680e0e8a74be5369ce8d443f4dbde8c8db5b3b5c62c8f91795e913f70497 -size 72429 +oid sha256:db4dd5c7b1d012a52f0b20f8e94d1ec01d8615b4a4db40c831ea986c31cbd4ba +size 72370 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 b2d68c52b1..126d13b502 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:4c9cb9e39505d30bd562f26f61f30f68b037b1c3ac542e8499f7f602687d508a -size 62930 +oid sha256:7197e5e329c23f8647f9345d43ea4d90396fc7b98f55409f26ba286e202de2a1 +size 62958 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 0dfd3b1b29..01c8284453 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:2f26f5518b23013e254efea64ca3318cf390fe9af407b4ca29428df2dae15058 -size 64959 +oid sha256:9e91d3af4ac0adb02c9354388d6492807211cad7ed133593d71acc21608a260f +size 65309 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 4b47ba4b72..2e79de5da2 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:bf37662355ec12d52d2a8a88ef58fd9743b7fe278050d6d0a5504983c8844031 -size 69625 +oid sha256:928a380efa661ceb95cbb839339a142aa6c1fae747c1136f35e7545434d6876c +size 69676 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 5ac9ff019b..a5c1b5811e 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:b5be47550b5fcd0ffe3def6a4448e47c96641224100ed82acb977ee033527714 -size 71424 +oid sha256:971000889f1e354115f785865a609e822b2ef89f98020142be6a68ae06ce3feb +size 71775 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png index 4a664e9a92..f9e14e278a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9c4c522daf904898d38b32196dc43628697816381c210ba404321df0b409f2c -size 85265 +oid sha256:8fa46a02487955106780200ff91b13c3f2c8585f83fefc43358f0abab5a635fd +size 85229 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png index 183b28c2d1..8849ec7845 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9717496e144f7a27919723d037d61668289b5349f2885bd5fc1489606c726625 -size 81546 +oid sha256:7452b71faf637d017c3a29b3df7fdb0d37847111f88b31702170f51921e52bb9 +size 81520 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_0,NEXUS_5,1.0,en].png index 57b1bc23df..03893b766a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7f88ed6f4c84ebe5c9dd6c46474fac299b2b2e8edce0bfebe49064bcaab5fe7 -size 27226 +oid sha256:96b80b6e3570e64e8db04b6d166b649cc129490c14b5d83650a5bf8513dee611 +size 27243 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_1,NEXUS_5,1.0,en].png index 36f5b63929..b4dc2f2d99 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bd8ab01406157ba78a9923611a9d21d5afe6d1d433f3aa3cf263b1507fd7eee7 -size 26774 +oid sha256:b392be78f2186bce8a7bb53e3bf51d645630696a81695dee74cf6fa62c90a4c3 +size 26693 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_2,NEXUS_5,1.0,en].png index d6dd56d06b..a53904d568 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Day-20_20_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7aafa97412bf18c9820aa158d0e1c2917cc471fa1977bf2ef6cc68d3a5bbc42 -size 31933 +oid sha256:3ffb669d3a8c2d24a701fb11e0595db4bb60b97c537cf60a68e7214b62c024e3 +size 31735 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_0,NEXUS_5,1.0,en].png index 2f508265ea..76f10a1733 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a162bad1922fb62ab2da4fe396fed4192800e21b9bccff1c5b309a8cd482994a -size 26169 +oid sha256:77172e55f8d5407c83c0f307d17b2997f01f0033b523abbc9cb38b8a3acebca2 +size 26038 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_1,NEXUS_5,1.0,en].png index c7949415f4..bfd2e694b8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8198c156b3dcb61583d2543b3d2f4e62adbd54b9ac8579b9c2fbd9a8c6f8bc41 -size 25604 +oid sha256:f3bea7d555cb10a2b8884a1c6f0a7372ecf2fdcf3448780f60d4d3e1df8b2d09 +size 25531 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_2,NEXUS_5,1.0,en].png index f15612969a..836f7d2938 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithRR_null_TimelineItemEventRowWithRR-Night-20_21_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4beebf86fc936884447204fa81ef2104e25d60bde1581d077468d2ed6f3cc1ad -size 31052 +oid sha256:0eff0cb1de73346a3d988974c4f6c5aa5d4087e502d5a6f69c8314c5d24a414e +size 30944 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_0,NEXUS_5,1.0,en].png index 62e07660fa..ff5da1bb00 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7db830480ca028fc17f731b2f5e507b43697f908809ef496461b6974bdfb2706 -size 167384 +oid sha256:7a5eb70047242fc8d6405e5ad907fa80aafec03b6478a7fe699dce5fa314aeb0 +size 167383 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_1,NEXUS_5,1.0,en].png index 4ef99c01e9..a1d61abe88 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d63fd4fe914328f70880b3157f13bd48e583c5d57edc27dcdede82044514f699 -size 171789 +oid sha256:ecbbf370005e21fa05aca5221edc143e26bbdaf4b6190ecf0839c20a607d65e9 +size 171793 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png index b36e6e0270..c1d65add6e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36b8b5a7dd154dc69732320c35c8e0a8a77fdc03365b0ea311d03cdf3c7f71cc -size 150907 +oid sha256:bb7ec80a57bbdfb1d4038fb10b00b8ef16bf1900b9419087972f83b85a402bc8 +size 150784 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png index 497362a4c3..e2cdeccd05 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00c5efab417077f1a6c0dfdbd6f63b0faa5e9ee3174f0b22aab1dc632330e6bb -size 165109 +oid sha256:72ed717024a4996d8f4baca3e052346e9983f182b51d52ba33c4b20c631cf8e6 +size 165137 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_2,NEXUS_5,1.0,en].png index 61a86a4db4..e25dd74c34 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46a9fc41736c83b40c697beed7cbf3c14b3eeeb889d229e77d85cf68b93ac67e -size 154122 +oid sha256:f3da730f83e91c9f40d2f54a20257ec9093f88fb2862d4d5d92d346ff3fa1fe2 +size 154132 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_3,NEXUS_5,1.0,en].png index 7cde336299..82653fc721 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7b3b360caf897eaf402091d6ec0c9ae28683e6c94d9e9bdc44c2a5c06b5da04 -size 152475 +oid sha256:d5fd5fe7fc6cef7c18d424728b113f516f04f7e39acc5055e243710563f235d9 +size 152466 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_4,NEXUS_5,1.0,en].png index 1ae730d2ab..0babfc0dcd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:07843d212b755e8e4a19d270b06d3afcda0e5382f5ccc098c19e5268fba585c6 -size 161056 +oid sha256:a1a56e97ce7d7f06c34dc35c5038812b5c864f62b4714816a8f31bfe977152a5 +size 161077 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_5,NEXUS_5,1.0,en].png index 31d971f33b..7e86ccbcf8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28844b117cda36b3afdd7c791f52949d7a0095863d6c606090fa3e200fc6a125 -size 151427 +oid sha256:719e764612a2187f513b25c2ccf58d7345200bb16892f6476cab1c718dc626e8 +size 151422 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png index 5ad8ec1489..dc595e494d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4536e2b04119145314c34eb0289ca2fa0028c72269fb235447f56cc6ebabb85e -size 152188 +oid sha256:6b70b68ef3d1bf59272655b8492addff1186a9e43af208ca135cda310821c029 +size 151998 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png index 041a302f61..e087b3d7b9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34da0e10f040d85752c06cb9af84ef02a3f93a64dfd56d4fcd9e10423e0729d5 -size 154430 +oid sha256:cc899b2b8c5bb1ec64c8009ed452de7e3da7a82a696e13310a9efdeeb51f7b4f +size 154423 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png index b7e28156f4..819fb6f02d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ab9006744fade5db0e20d5d5add106125a78a22c37c5643bb2c14a95923d901 -size 162320 +oid sha256:d1d24cabd468fcf84ba3f66293a4d97f0848eb66f5e78eb336ad6e48f41f1c61 +size 162353 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png index f0acb05e6e..d90bbb1c1a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Day-21_21_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6d9f8e62850eb1bd7cf1bf89436b18b70e976ef3c6a3c33d880d6ac2eccac29 -size 151678 +oid sha256:3bbecc345837136e1248903612eeffae683e2f83e538732df0a881424075cff7 +size 151576 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_0,NEXUS_5,1.0,en].png index 9dfd9eb86d..9ace45f788 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99da12740d48a70bc54fb07ac4c765dd442d94883502fc1b6c07ef345ad56ad2 -size 165103 +oid sha256:c5a92dcc9e3e6ed3c0bb052269b52840a1cab7dde7fcdcb7ae5e761a27d5b768 +size 165082 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_1,NEXUS_5,1.0,en].png index 811eba2d4a..1e555348d7 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a59b0f1fb3a46bedf01520ec1167dd1d33d73d6da5a9b9ad690f13eaff11608d -size 169346 +oid sha256:ed0008be941b783f431746d31a656ae2b1e746adb3f5b3588b4409f4ecf37a83 +size 169369 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png index 9d17bf1483..fbf826e4fb 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ccbf09b9dd72f8bfd9ed0a9ea7af3990d513452614dc04ff13b0389ec097a2e5 -size 149329 +oid sha256:7ddf130451611b2cdc54612f75759fcd61decd351290636cbbec0a0b04b2f187 +size 149336 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png index a5e691043b..876a2ef08e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0937e4b1616c76b40ef2699577ce765ba7c01f5c22f12677b5c161a4899b2021 -size 163218 +oid sha256:e1fab858b3fdb75e534d53fcc8fab14a88253e3dfd160a5a862dbdd39e848a10 +size 163173 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_2,NEXUS_5,1.0,en].png index f56ef28131..0896f32793 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f41aeb0c842979624d2453e8c95974a2ed3971115f5ef56e6b90841d94e1a7e8 -size 152790 +oid sha256:531c7da7fdb2b99f479b3c7d0b2b6748f740b1aed46954e3bd93e50673cec196 +size 152780 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_3,NEXUS_5,1.0,en].png index 75020926a5..d07820b9ff 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0bfc14e7432e00bae59d44362034398eaaa5676bf591128870deebf622758eb -size 151065 +oid sha256:86939e8497a74b1e3ec1b15d620a782ca40779d1e3e9560d8071e7e96c8316d5 +size 151050 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_4,NEXUS_5,1.0,en].png index a4e36c2c9a..921106a87e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3fdb4183f704b8f1cda0712f2389f3b46e9e47a7ff59f954d2cc494928ecb381 -size 159382 +oid sha256:437d87586d7bbc77b14ba5d124bb1eee5b7de8efbf7ef93f164e627a22d70649 +size 159385 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_5,NEXUS_5,1.0,en].png index c1b187f0aa..9644ae59cd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41c59480defc44111dba7e9fb3ee020f55f20265cd24ee6045a52438ade062a4 -size 149840 +oid sha256:7d5a2866a3c25390472e08a4ca408b9efabe217c7ef2b86e58cfddb170493681 +size 149810 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png index c333334c6a..4978208a63 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd3c1ca7b2ac2f73355b3ca71e354a2829008ced7494be0ea2212f35ede6e0cd -size 150566 +oid sha256:98294c2aa6ee9b0beb059de3536e55577575fc3553d1063ba4e693c025bd2bd0 +size 150576 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png index f8de679b64..80b7a43aed 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9071c32211b55d05947071631d2da06bb1b17f87fa087b478f92ca9faedda3c0 -size 153189 +oid sha256:6051b34869f71b0c61b06a64dca325c12a28a838094175589866e2942d4c5683 +size 153168 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png index 0d853e581d..8629e1ad44 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6e650e9054ed49ad539718843b36d6065954388cec1e41e362de5868d471398 -size 160496 +oid sha256:66f58b1382098c5cbe88a6d9f0579eb0243101d9c357a85745465f15c2cb84fb +size 160479 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png index b96562422a..e33c36db44 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithReply_null_TimelineItemEventRowWithReply-Night-21_22_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2cc8fb2604f10a423b39c75c0824632197b52304e06b5a33f3d8300ba3390327 -size 150050 +oid sha256:3f274a32f53436c90d72846de43fdeb302ce925c96e6c21d0a901eb65add97e9 +size 150066 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png index f444bc217c..adec73a672 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4b726ff874141615824c929c22518245cd9ddcee331a2d1b1e953ce98940627 -size 190995 +oid sha256:94a87cc8a6b2efa1b2e4bee88f3a1ab8ee09b6a337c4ceb23247de7d18b9e41b +size 190944 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png index 7a2e26406f..4627076c06 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3a8db4dab06f907fd3a83de9c9dd81a9c6671a6e7e77d4af78e1ef1795336db -size 187116 +oid sha256:f8d72a4bcb587cde92f22203116711e215cba8ecd201e2813c6ce80ec94109b5 +size 187089 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png index 50a5bd575a..4c4e834ef4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94be80f7b3f2a4fb3cc7f89c5e013e1eb99154862a46420ab6d30cd18fb6587d -size 53018 +oid sha256:5b8180b725f14e4387edb1c25b64f82af3045252fdb7efb14afc11f2069da495 +size 52876 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png index 4b52d6dc00..e642836221 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:47bc7cc50be3b70e1441debf5e140fd637b457e237d09b421e0fc3a7a8181da2 -size 74753 +oid sha256:53c938a23d05cfac715c3885356859cbf0fcec9a881906fb6c7c5a8a10a72330 +size 74675 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png index 681a409209..b8ed8db07c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc02bbef3944a10d19d926107ae27e1ce5abb82aa8532ff3f49e16d4239ef638 -size 54649 +oid sha256:552103a87a25523828740b180acb7a96682605a7b581c2797b0d1ffded92ad72 +size 54389 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png index 9dab8c15c7..8c38194474 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:68bbb20edcec05fc3675ef998a90058c5cb9ea831656676c7f316be4c7ce03a6 -size 66909 +oid sha256:6a8a2abb329249a48ea9f994d713516ee3d9d91c5f5fe10e638627e795687e27 +size 66869 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png index 4584d2f98f..87ff678cbe 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3f9b93c292973432b32c53e33a621e7d7626fe838653550738a6a9dd3925cc82 -size 50687 +oid sha256:4f9d9dc90365878723c750535619d63c3c69e069870efef8b0e245ec24ab9602 +size 50658 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png index 9423f23085..8691656593 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7b1f9f6f91e2b4824270af423cfa637822462c21b2aa1660d61a64821084d28 -size 67754 +oid sha256:b8b4b26cdca3cc7384195046837ccd29dd59eefba94c2cafd4187dd5da6d2607 +size 67739 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png index 791f741b0b..3c17060090 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8c841112673d692b508315a9b73132ec38abe9a2b3f0aea43859d5cebcdb970 -size 57976 +oid sha256:4c93f5e3f77c4a68031244d282e24efec61ab28e6fe89bd5aeefd99f6a5d0c07 +size 58095 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png index 8f303114c3..86003d7f7e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b0304f8178f2c1812f4ba9495597f2671a19c8c06864269557458e5b952a89c -size 72699 +oid sha256:2e0072e4c5b6d93ac23e7dbeddffb980c833fe5ace55e3610823ced7e808b17d +size 72625 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png index d42f3117b6..83842589cc 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc9394387d75232efad1f6a571c40d1fba5f5d5de1c85a0f004c4a52e8ef2428 -size 88489 +oid sha256:93db3209fe5b97c0e214291f032b9d34f9eafb55775633f9c30cf923c05ee450 +size 88488 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png index ef20a18aab..1db13a7b4a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e6d3d23219a9cae2a751e4f279fd2537bb6d90147d010bb60ecd0eabccf93af9 -size 74378 +oid sha256:bf7c20343e19f454e55b027f2e9d674d086db22e9f70ce223888cc1626d935cc +size 74884 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png index bbd87958ec..61632a1f52 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2723ba9980e32cc50b2850f2656ef4cc206328cd53dfeb98618eae3fced13a1 -size 106852 +oid sha256:d2a691bd1ec488bcc8cf40c490a30c1e3221dedadd887293a772db9758f47992 +size 106813 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png index 53c399f2a6..d26b6961a0 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aaf8182f15a45208c2559cc40225d3c48bb3517446f4a3521864fbac2a2b5458 -size 57621 +oid sha256:1508e297ab3c955b9784dda60b4e88db9e0a6d5c82f971b9144b8016e4a254fc +size 56597 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png index 836592bd65..55ff911d20 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77c5f301bdff94528b1153318838a84bb85032cad0bc2ecfdd90fe0e7fb869bc -size 51266 +oid sha256:5ff448008a5dc0f3c640be53436d3197630ebe761fb046fa5c3510bf9e2a2de8 +size 50999 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png index 1e3b03dccf..526ac4f984 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b41f17e7a2b5a167defabf689ec260f0efe44307d2a422f8c543897f7fea14c8 -size 71634 +oid sha256:3287968c74c01d2c4781da7d1ff958ccc3fddb51f84f2cbe74bb7921c7f65a19 +size 71627 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png index f8a5078c2c..d742cf1c1e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2193a11873fdf07b1d6fe990154c8506153b0beef7d971dcefe78d1e1b63a0a7 -size 52888 +oid sha256:8af811dc353b9bcf90838d7524ab6fd365f352e8d4372dc8125635b0bda6b9a0 +size 52659 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png index 754e549690..768061aecd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:54d20d4100b8ba70d76c236abd0be7ccf9dfb2bd432fe552b8a18bfce1ef5b84 -size 64244 +oid sha256:d8185fae5199f413dc912727c21501de821c586b0e0b899410587d5eb53e80e8 +size 64190 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png index 02f1c64ba4..8f8c2b58ac 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1680c3164c780dafd46462d6770a6a84c29ea46e5a7adb6d834164cbc2bd14b1 -size 48945 +oid sha256:b9b465d0fef08eff7ced732123cfec8dab1f19acb4be7733f8661afa05ef65af +size 48927 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png index 01c63b0509..0c710d0139 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da410a09335165b25ee3ce4fe6b7f03a5bc67dc546a85ab45c06ce78a7adf56c -size 65011 +oid sha256:d49b01d32e276ce9213605418e8ea494363edf3c76338fb0b4b24bfd1ffc1bb6 +size 64925 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png index f660b35a10..983fb61cb8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c94aab9ca99a3cc6b04ce1041251c2f666619728c6421c3dd12e691cfb3bb365 -size 55787 +oid sha256:d7c475add38b97b849970d22e39137fa8e8a2f0bf7c14ce957828fe56adc5b92 +size 55867 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png index 7891502c89..16a314d9fe 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bae3ea763fdf8d118909f2c22d4eafda5ad4ceda3b24c846002e10e6032c196e -size 69826 +oid sha256:de84923f8ed54914c8ab30b17823ddfd43ac845a3e349e597931b2735a6ce424 +size 69696 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png index 6cc4d25d99..12fed32ded 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1b12ee386b4cd9601fae1b1c4ed1779defd7a10ca929bb5cd683f7039cf9fc1 -size 83922 +oid sha256:d6b01a2966ee15c1305454ab0f33a0b333864a941dbcaf6059e1479ff6e50555 +size 83899 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png index b81b3e7599..3fb5944ebf 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:12642b59eb842993428ae31724cf885647e243eb36e37778350879bac9571b0e -size 72187 +oid sha256:0b5012f37f6dd279b35ef15b56d4b6bca7d8b16b387a2c5e8f57351dd0ef862b +size 72166 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png index b30b840c3a..3dc396e129 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7200a3147b8b0dab653bf225e8b3e1d93963b79852d02d3948194d50ffafb6ab -size 100870 +oid sha256:a558964dd3e41908761ba945a1e9715b3ed1396257380e990c8a5a2839955173 +size 100821 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png index f57d2fb933..ccc20778f2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:09280f50fb09e766b03aef83f267f91f24688b435321de29f797fa10a4e3fe72 -size 56093 +oid sha256:cafb964b37fc82c3179d8abd0ec2ad7f66e2fa2e47a09e563608a9b7a46f0946 +size 55177 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png index c291649ec9..b0fa561ae6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d0752f68d9ab404f2669f631df280a4f48bcec3565b85f9876cd8bddf030530c -size 57041 +oid sha256:067292421d6bf51a7858de98270d6671564aa5d42428210ae0c4e9afb7361027 +size 57090 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png index 0376a8a8c4..5b100f62c2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ceeaad4f95c818f1e16995e7d5bd4e1cc5ea82e7a6a7560d88b30cce33b779de -size 55971 +oid sha256:ce476cb344a6cc208afc81c6e7824e02371ea98b8ca0913945adf646892a119d +size 56007 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png index e9dd36bd4b..f93a453873 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a9cfb621dd9ae156f53d9f8ec0a2b06e9fb5c6955139494e42badd2b0e9d224 -size 58717 +oid sha256:d393a30845d9054279cee7024323da2b683ded73ac1cd631a7be61dac5679710 +size 58763 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png index d2a3d6aad9..4337a19830 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2472128fa67e6b12600779b438fd04c4a54a300b9b67231fab8bd70dc5c9e399 -size 52787 +oid sha256:19b9eafcb993e59955e0aece53067c9fb291515769f562bdaa361338cb04e352 +size 52730 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png index cee3274b7d..6c9f0886c4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:66349c80a6788cebaf782bbf47d05612f0bf18bac1ce4ae8b4cf0feaf682aa0f -size 57056 +oid sha256:7732293593581afdc475d04611513b397dedd3d90d8e4f421bd8fa494dbdc05c +size 57107 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png index ee9a0d2b06..f3d0b5713f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0264c1fe5cc506dc79177056fa0d3ffc13d772ecbfda0dd78a4c15283bc98a6 -size 58937 +oid sha256:f3d72f6b56bbf584c764d8b7c9264296d2e376d4fa78b849e17a97b3587ccb4c +size 58951 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png index a97e712c2e..ff6f97fd9a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c4a0a5eff3cdafd895069be1eba53929d9ce90e2b6e3f0766ce14d85e38544a -size 57545 +oid sha256:e2fbf447d1a40417c856dd48c7262d4326f6537db9271f5796adc3bc0a0c2cbe +size 57516 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png index 71e8578bcd..ed62bc4bb3 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f146264ed00c4537970fc3e8722de8a0e378faed86b4436b8c666a70b9d08b6 -size 54838 +oid sha256:4036f63f388553365b52c030cd66e1064bb47afac2284794590c10c8bee7b48b +size 54888 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png index 8c75a45b99..3387c0c69a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f734a28b795e80593b5aa661468c190d816d3f91e47cdc7a0e59a0b5d2f3b7d -size 54685 +oid sha256:7e882c35861c4856b58bd2729253896ab2451a40d76f36a05edb7fa223e77fe3 +size 54713 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png index f4770a9254..5dab459583 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d635a43a26b042918890f33d3b520a17dd66a26c56816db35104690e39e00241 -size 61803 +oid sha256:c527021fe0b5d92db91c8551599fccbae012196fc4006acf5873e4eb5cfbb5ed +size 61775 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png index 67c2fbbcd9..3d513091a9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:42b443f7e333c3c9aa21bca80e6423e324e9371b3d95057691b8ac6a4afa7a89 -size 42919 +oid sha256:d8ee2bc4943fed6ae1d7d0a66261c6e1b92d02312d7635fea254104c0ebf5b5a +size 42948 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png index 4d99bce2cf..7a1615e786 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:34b376b868b36ca264f40fa2df6bf188c48b47fb0721d40a3723721c7c7006b3 -size 42079 +oid sha256:57c4c864d6fd2e4d39b21187b6d3f64db339e7c191ff4bba17f35d1fa8744fc5 +size 42118 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png index a1e95f5cd1..56b226da71 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b1d8a3d517a76f8f31797cea326f910498fb01d58936099a8ac108f05047d5c1 -size 55090 +oid sha256:2bce95c37798213f515946bebe1880dc41079781f56b0f6d719b72d7d56ed1ed +size 55161 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png index 240f3f24e9..dd07b80e85 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:15d87200255f29af6fe4b2bc96230398e651ad000eb9c787080fd2796e910a4c -size 54019 +oid sha256:51f40086adfeae6ec8c3d168ced6fcf8543af2f8bacfb5e99f3a0b4ed22efafd +size 54097 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png index cf2c7ca123..2f6ce4ab90 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:766090cf3f25c0204f545a641e9b0f2c6f286ab9bc657ec4414874627d6ee9d8 -size 56528 +oid sha256:51813755ea691aae411e8e92841f7e27414c86b3d265c3efb64eb975e0396f8c +size 56588 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png index 03ed03d378..c1788df8e6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1e1d7f48513465f04747e69fcf28c479e69be8423f25cae0d34698ccdc80371f -size 47408 +oid sha256:b4f827de075241e12bf3c4259d288e5f9fd78aa3c45c43985fa14dc481048ebb +size 47311 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png index df78dd8f75..a974fff1b6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b7119057bd9d33557587abbb568ecd763da97eca129ce3379119cb1c37784de -size 55121 +oid sha256:3210235a7fbe33b3aed80f9de2e01a836a171c62991a87876b6446f446e86fa4 +size 55189 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png index 6cdda51b60..c6c0934c78 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a29fe9421500a439dcaae256a52c245c4ff67433afee143b98d26eb867c7ad33 -size 57188 +oid sha256:0b79801ffa9827840749462a204bb7b22eea9a7816fad3a93a7b9cd436c29a61 +size 57186 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png index 82ebda2cfe..41371c2c1f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:46cb86b858e96ef96c5bf6f89a77d486d34481114b16f8413a433d609ce3c58e -size 52555 +oid sha256:de1cb189fafc316ba001c9257d0435ef8dcd02fa03f4308a1dc03bfccdc2e613 +size 52455 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png index e5e2dabe70..3847c5b2f8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f7955d6751dead5e8b44b65c1cf1e5b5102aac713e6d692b94d8b548e028a0a3 -size 52730 +oid sha256:0b22b124bc4f56a15cd39ccacd4252af7613fe07e71b989ce67eec02e0e535ec +size 52799 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png index 34dbef58d8..8c4734e118 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f29d21042d83de1c24b2e612c3a3daae68ea96906002296b08bd1af821b42660 -size 52647 +oid sha256:b1821cab0325f3bb59993fcc2f4c44333faa0161fdfd486202176f0d58e2b71c +size 52723 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png index 90a991e1ab..cdf3ed41a8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6890d76b297c174795fcd3f36c053633592bd8f331cba8c9db89857917ee1419 -size 56552 +oid sha256:45eeb2ee2f8453cc094c3b999e702097189e070fc9f1dbbeb9e76f40bdad0ba3 +size 56463 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png index 8a2721e721..70f9e7890a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:806c01a585b7aa1525638f0bf6dfccd170ff7e82b320fe08d0da2041820e3846 -size 39619 +oid sha256:2280febc8e962f986c8539b8011e8ab524d9a62d2cabafcd7002ae0e86562ffd +size 39593 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png index 5d907d77f8..cf2e640d31 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28cf0498aa9b15ba869a0f7b9595ab8f6c6f7a4c071db3af1b0ee336390be94f -size 38829 +oid sha256:0f78a9b97a4238bc1b24df9c32d8272ec15ef55ec0870e9c354d986a4e3401f4 +size 38805 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Day-18_19_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Day-18_19_null,NEXUS_5,1.0,en].png index c152a6cc4b..077598db00 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Day-18_19_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Day-18_19_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e541cfb32e9d3095d6499c4c25e4bb4158c10886d59accf6006290bda344e8b2 -size 43927 +oid sha256:c17bc39b80bbed42378b2df6ad2332b8da78b315a177f56a7eca0a7b595a3036 +size 43943 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Night-18_20_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Night-18_20_null,NEXUS_5,1.0,en].png index 17f88d03b3..08ca64ce83 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Night-18_20_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.mentions_MentionSpan_null_MentionSpan-Night-18_20_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06cd8d611bf8149d3c86b8d9a4aa5613dc9f32f89156081472f98d6410e98c4d -size 37107 +oid sha256:0464a6fc68efe26f6233d993a06024c88ec1936a108f33829e7b474042199fb6 +size 37110 From a6020e0441416562fcd9d6494d0bbafc60c2e297 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 15:45:07 +0000 Subject: [PATCH 055/161] Update dependency com.posthog:posthog-android to v3.0.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d7867cf95f..9214afff43 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -172,7 +172,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" From 467ccf65a2c89c3f185c10257217ab9afd179001 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Wed, 3 Jan 2024 23:30:14 +0100 Subject: [PATCH 056/161] Implement MSC4027 (Custom Images in Reactions) Signed-off-by: Marco Antonio Alvarez --- .../components/MessagesReactionButton.kt | 35 +++++++++++++----- .../reactionsummary/ReactionSummaryView.kt | 36 ++++++++++++++----- 2 files changed, 53 insertions(+), 18 deletions(-) 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..10b100c6bc 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,10 +43,12 @@ 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 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 import io.element.android.features.messages.impl.timeline.model.aTimelineItemReactions +import io.element.android.libraries.designsystem.components.BlurHashAsyncImage import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.text.toDp @@ -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,7 +119,8 @@ sealed interface MessagesReactionsButtonContent { val isHighlighted get() = this is Reaction && reaction.isHighlighted } -private val reactionEmojiLineHeight = 20.sp +internal val reactionEmojiLineHeight = 20.sp +internal val reactionImageAspectRatio = 1.33f private val addEmojiSize = 16.dp @Composable @@ -150,13 +156,24 @@ private fun ReactionContent( verticalAlignment = Alignment.CenterVertically, modifier = modifier, ) { - Text( - text = reaction.displayKey, - style = ElementTheme.typography.fontBodyMdRegular.copy( - fontSize = 15.sp, - lineHeight = reactionEmojiLineHeight, - ), - ) + if (reaction.key.startsWith("mxc://")) { + BlurHashAsyncImage( + modifier = modifier + .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) + .aspectRatio(reactionImageAspectRatio, false), + model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), + blurHash = null + ) + } + else { + Text( + text = reaction.displayKey, + style = ElementTheme.typography.fontBodyMdRegular.copy( + fontSize = 15.sp, + lineHeight = reactionEmojiLineHeight, + ), + ) + } 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/reactionsummary/ReactionSummaryView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryView.kt index 3e6568d880..baacde409a 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,18 +58,24 @@ 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 io.element.android.compound.theme.ElementTheme +import io.element.android.features.messages.impl.timeline.components.reactionEmojiLineHeight +import io.element.android.features.messages.impl.timeline.components.reactionImageAspectRatio import io.element.android.features.messages.impl.timeline.model.AggregatedReaction +import io.element.android.libraries.designsystem.components.BlurHashAsyncImage 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 @OptIn(ExperimentalMaterial3Api::class) @@ -192,13 +199,24 @@ private fun AggregatedReactionButton( verticalAlignment = Alignment.CenterVertically, modifier = Modifier, ) { - Text( - text = reaction.displayKey, - style = ElementTheme.typography.fontBodyMdRegular.copy( - fontSize = 20.sp, - lineHeight = 25.sp - ), - ) + if (reaction.key.startsWith("mxc://")) { + BlurHashAsyncImage( + modifier = modifier + .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) + .aspectRatio(reactionImageAspectRatio, false), + model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), + blurHash = null + ) + } + else { + Text( + text = reaction.displayKey, + style = ElementTheme.typography.fontBodyMdRegular.copy( + fontSize = 20.sp, + lineHeight = 25.sp + ), + ) + } if (reaction.count > 1) { Spacer(modifier = Modifier.width(4.dp)) Text( From 1fe8361487cde195c49b112417cf6b1aeea48d71 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 08:28:17 +0100 Subject: [PATCH 057/161] add changelog Signed-off-by: Marco Antonio Alvarez --- changelog.d/2159.feature | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2159.feature 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) From 6c06ec423576f48922f2f1a02f66ea4f97880b07 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 08:50:58 +0100 Subject: [PATCH 058/161] fix Modifier forbidden pattern and missing const Signed-off-by: Marco Antonio Alvarez --- .../messages/impl/timeline/components/MessagesReactionButton.kt | 2 +- .../timeline/components/reactionsummary/ReactionSummaryView.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 10b100c6bc..7535fa5cd3 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 @@ -120,7 +120,7 @@ sealed interface MessagesReactionsButtonContent { } internal val reactionEmojiLineHeight = 20.sp -internal val reactionImageAspectRatio = 1.33f +internal const val reactionImageAspectRatio = 1.33f private val addEmojiSize = 16.dp @Composable 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 baacde409a..3fcbb7c03c 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 @@ -201,7 +201,7 @@ private fun AggregatedReactionButton( ) { if (reaction.key.startsWith("mxc://")) { BlurHashAsyncImage( - modifier = modifier + modifier = Modifier .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) .aspectRatio(reactionImageAspectRatio, false), model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), From e62cfa8fef9782d5baac259acfa46a0352cfcca1 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 09:01:29 +0100 Subject: [PATCH 059/161] fix top level property naming Signed-off-by: Marco Antonio Alvarez --- .../components/MessagesReactionButton.kt | 16 ++++++++-------- .../reactionsummary/ReactionSummaryView.kt | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) 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 7535fa5cd3..cd3d1cef66 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 @@ -119,9 +119,9 @@ sealed interface MessagesReactionsButtonContent { val isHighlighted get() = this is Reaction && reaction.isHighlighted } -internal val reactionEmojiLineHeight = 20.sp -internal const val reactionImageAspectRatio = 1.33f -private val addEmojiSize = 16.dp +internal val REACTION_EMOJI_LINE_HEIGHT = 20.sp +internal const val REACTION_IMAGE_ASPECT_RATIO = 1.33f +private val ADD_EMOJI_SIZE = 16.dp @Composable private fun TextContent( @@ -129,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 @@ -144,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) ) @@ -159,8 +159,8 @@ private fun ReactionContent( if (reaction.key.startsWith("mxc://")) { BlurHashAsyncImage( modifier = modifier - .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) - .aspectRatio(reactionImageAspectRatio, false), + .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), blurHash = null ) @@ -170,7 +170,7 @@ private fun ReactionContent( text = reaction.displayKey, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 15.sp, - lineHeight = reactionEmojiLineHeight, + lineHeight = REACTION_EMOJI_LINE_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 3fcbb7c03c..ed9d79ed97 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 @@ -59,8 +59,8 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.element.android.compound.theme.ElementTheme -import io.element.android.features.messages.impl.timeline.components.reactionEmojiLineHeight -import io.element.android.features.messages.impl.timeline.components.reactionImageAspectRatio +import io.element.android.features.messages.impl.timeline.components.REACTION_EMOJI_LINE_HEIGHT +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.BlurHashAsyncImage import io.element.android.libraries.designsystem.components.avatar.Avatar @@ -202,8 +202,8 @@ private fun AggregatedReactionButton( if (reaction.key.startsWith("mxc://")) { BlurHashAsyncImage( modifier = Modifier - .heightIn(min = reactionEmojiLineHeight.toDp(), max = reactionEmojiLineHeight.toDp()) - .aspectRatio(reactionImageAspectRatio, false), + .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), blurHash = null ) From 83e4af52b99d113ce1644e04042206387497ad8c Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 09:06:30 +0100 Subject: [PATCH 060/161] [Technical] Open stickers using the thumbnail url if the main url is empty (#2157) * Explicitely use the thumbnail url to show stickers if the content's url is an empty string --------- Signed-off-by: Marco Antonio Alvarez --- changelog.d/1949.bugfix | 1 + .../messages/impl/MessagesFlowNode.kt | 26 +++++++++++-------- .../model/event/TimelineItemStickerContent.kt | 9 +++---- 3 files changed, 19 insertions(+), 17 deletions(-) create mode 100644 changelog.d/1949.bugfix 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/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/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 } From 4dcc08116ad03f5c9adea2173b907ab84902532a Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 09:20:21 +0100 Subject: [PATCH 061/161] use AsyncImage instead of BlurHashAsyncImage move emoji line height to a private value Signed-off-by: Marco Antonio Alvarez --- .../timeline/components/MessagesReactionButton.kt | 11 ++++++----- .../components/reactionsummary/ReactionSummaryView.kt | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) 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 cd3d1cef66..b136dd94bf 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 @@ -43,12 +43,12 @@ 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 import io.element.android.features.messages.impl.timeline.model.aTimelineItemReactions -import io.element.android.libraries.designsystem.components.BlurHashAsyncImage import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.text.toDp @@ -119,8 +119,8 @@ sealed interface MessagesReactionsButtonContent { val isHighlighted get() = this is Reaction && reaction.isHighlighted } -internal val REACTION_EMOJI_LINE_HEIGHT = 20.sp -internal const val REACTION_IMAGE_ASPECT_RATIO = 1.33f +internal val REACTION_EMOJI_LINE_HEIGHT = 25.sp +internal const val REACTION_IMAGE_ASPECT_RATIO = 1.0f private val ADD_EMOJI_SIZE = 16.dp @Composable @@ -156,13 +156,14 @@ private fun ReactionContent( verticalAlignment = Alignment.CenterVertically, modifier = modifier, ) { + // Check if this is a custom reaction (MSC4027) if (reaction.key.startsWith("mxc://")) { - BlurHashAsyncImage( + 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), - blurHash = null + contentDescription = null ) } else { 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 ed9d79ed97..5ab974fcca 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 @@ -58,11 +58,11 @@ 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_EMOJI_LINE_HEIGHT 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.BlurHashAsyncImage 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 @@ -199,13 +199,14 @@ private fun AggregatedReactionButton( verticalAlignment = Alignment.CenterVertically, modifier = Modifier, ) { + // Check if this is a custom reaction (MSC4027) if (reaction.key.startsWith("mxc://")) { - BlurHashAsyncImage( + 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), - blurHash = null + contentDescription = null ) } else { @@ -213,7 +214,7 @@ private fun AggregatedReactionButton( text = reaction.displayKey, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 20.sp, - lineHeight = 25.sp + lineHeight = REACTION_EMOJI_LINE_HEIGHT ), ) } @@ -224,7 +225,7 @@ private fun AggregatedReactionButton( color = textColor, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 20.sp, - lineHeight = 25.sp + lineHeight = REACTION_EMOJI_LINE_HEIGHT ) ) } From 87213a30165b72696f9a50eb8dad9fba95314efa Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 09:36:40 +0100 Subject: [PATCH 062/161] Update actions/github-script action to v7 (#2152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update actions/github-script action to v7 * Fix issues with both the PR from fork welcome comment and skipping Maestro for PRs coming from forks. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jorge Martín --- .github/workflows/fork-pr-notice.yml | 13 +++++++------ .github/workflows/maestro.yml | 10 +++++----- 2 files changed, 12 insertions(+), 11 deletions(-) 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): From 2c1fd32dc80172e24d4e6203519a0dd0a99fd5b6 Mon Sep 17 00:00:00 2001 From: ElementBot Date: Thu, 4 Jan 2024 09:14:33 +0000 Subject: [PATCH 063/161] Update screenshots --- ...essagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...essagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...essagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...essagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...gesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png | 4 ++-- ...sReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png | 4 ++-- ...emEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png | 4 ++-- ...EventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png | 4 ++-- ...elineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png | 4 ++-- ...entRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png | 4 ++-- ...tRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png | 4 ++-- ...ll_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png | 4 ++-- ..._TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png | 4 ++-- ...TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png | 4 ++-- ...lineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png | 4 ++-- ...neItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png | 4 ++-- ...ineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png | 4 ++-- ...eItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png | 4 ++-- ...emReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png | 4 ++-- ...ReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png | 4 ++-- ...emReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png | 4 ++-- ...ReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png | 4 ++-- ...melineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png | 4 ++-- ...lineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png | 4 ++-- 86 files changed, 172 insertions(+), 172 deletions(-) diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png index 8304142f53..4f09235eec 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53ae9ca05b387ac3fb5e057c50552c325bea9680d22bd49197f90abef639a580 -size 6353 +oid sha256:b7bcac7647aea3564a49731741d52062fb02cda69bc9a4836af23e8ddfaeed79 +size 6397 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png index e18eec4a31..bfb1707cc8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2b285ac42701164b889173a47e8937b72ee2c46a6e9d076b22b009b71a9c11ed -size 7205 +oid sha256:ff612a2b9f8f7b52b4e01affbd415759f8323b11405f4708e8b4d9f76dca8530 +size 7256 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png index bdbf93d8a3..97ee8cae6d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5558a601b4c13cfb9e6052ecdf959b247b65d1d9bbbe22798f33303b88676783 -size 7176 +oid sha256:ad0aa74f795712af5e868e685471af07aedb543438859eb9bc34de69df3df76d +size 7200 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png index 7beaa17c41..1a79f5224d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8409366bbebd5ffff45a5f367d1f45d17dcee507530e54beee4b1cc0cfe540a7 -size 8152 +oid sha256:440bf3933b43feef7a93b6250c963e36158e00787243f5fab6ea70e3e4485785 +size 8149 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png index 705825990f..54456bf1d6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd1ab6edbc7099020fa9b06802d67cd25b2fd76c3e16e517c954f44fcb3b0109 -size 6348 +oid sha256:747383cd19d84ed3a06a48342d9f5750cf993883cf77ce39288e3027614cecda +size 6370 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png index 0eac30b9ce..37005abf8a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1fcc61f847daf9adbb2de5dba0aa1a7a44c6e6cb577c96ff8131829a323a5d56 -size 7224 +oid sha256:90e0620239c15202c8b7adef3ab5b2b8a2a68e7a5469eed84da5faf78a90ce1d +size 7197 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png index 0e83b1c1ed..057d069bfa 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f20e8eabe5c83c04238f786528896724030e09261e6bccbea4b994f20857c934 -size 7134 +oid sha256:8db24ffca1b63fbe83f9d4e082b8b99f4b5edf047f233732979fbb7f8efd18c8 +size 7152 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png index 78c15c4d8f..9a742a6841 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:607d39ae946b273ba4b3e29aee9a072cec914658052b0570cff181f9f0398fc6 -size 8037 +oid sha256:4be5363971ddcc1bf05e66daff4dd2a5d7f95576e006d2c6e97c9d6f40a28a95 +size 8029 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png index 2d948c7f22..5ccd98834f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:762c29e795dc3e37428f0ab42a38899c8859d55ea5cf64b4d726cec99a857911 -size 10296 +oid sha256:a4ac75abf13ddec0b94bebc2124046e5a9c065c143de0d2a5977bc90bf630e50 +size 10387 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png index ec605b89bd..7010059035 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:af4fbde1c1cdc06700538cac4d11ef6480c39f24d7806a71da0e43740056f892 -size 9995 +oid sha256:c6db68ebf7594ef6f835b2fed020006fdaa0533770e97e437bb6c9d649435292 +size 10077 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png index 64fcfd1eaa..4b3afaa6f6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd8440df56bc810e9d01167580eca5409e1e0458c463f0e1d039d092ff35ed49 -size 139471 +oid sha256:a5da4af80a057337ae0761929b2b5051130b8f43386ce4b03f35a3f8bad3c023 +size 139892 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png index 5b697f6788..2aebaa163a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eb450d60e438e212aeecb8e82771b54d1eeeeaf1063a0bb80c8f4c070e181ba7 -size 135783 +oid sha256:36d51bf5443aabe64503f7abe6f9053a55979013cad8e90216442e1b126161b8 +size 136276 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png index badab1b02f..a0f9840021 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:795ff3e304af3dbfb08dbe5f6baf866fce06301d722ea8044be609e89288ea82 -size 18245 +oid sha256:226ba03547d8e62a35fca230c70697ef7e192c5e9d9073806b0c1d312a30dbe5 +size 18304 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png index f9e14e278a..8d71312952 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8fa46a02487955106780200ff91b13c3f2c8585f83fefc43358f0abab5a635fd -size 85229 +oid sha256:36eaef5e53d9d80867b4795d8860ef1bb86ba1d0e4269a56f2b66fe3c23eb7e5 +size 85791 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png index 8849ec7845..f43ace536f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7452b71faf637d017c3a29b3df7fdb0d37847111f88b31702170f51921e52bb9 -size 81520 +oid sha256:a43179afd02fe9fbd09acc522c5723aed1d2562843350c80f70aef73a510c20e +size 82291 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png index adec73a672..a81d526130 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94a87cc8a6b2efa1b2e4bee88f3a1ab8ee09b6a337c4ceb23247de7d18b9e41b -size 190944 +oid sha256:17c9c94e788aa012666dbb8b64da725ba2633f68ff395ea0ed276d659507489f +size 191809 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png index 4627076c06..7149b06c08 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8d72a4bcb587cde92f22203116711e215cba8ecd201e2813c6ce80ec94109b5 -size 187089 +oid sha256:56c0434894410ed6f185f9d3a76554fceff53f5948e4ad61c4724f1aa392a9f2 +size 188007 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png index bc50eb63f4..2bc5716675 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d261ba035401e1624a48911f1f9072a07e134e5d3b870fe488e8bfdb681c092c -size 56591 +oid sha256:3085b4fb73adea7858a3d73d1f5b73a0c167c2c8efb3de6236998c935d3ff390 +size 56740 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png index 844661cdf0..20f4766af2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e4189c4f765657b0b73c66988b199878982107a02b3f7affbcd36c9909595b6 -size 26494 +oid sha256:a0cb0900a5037e537e2192680d1381dde794c8c4b71025824e7fe9d66a6919fe +size 26783 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png index d0a0b540a2..94278c4c80 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27b0d2e120793a6e1a8f20c85c0981a280f1bc95a15c67f1e13e81bec8e06fdb -size 26069 +oid sha256:d7b08f307a298e0044bc023a02653b68a3ce83bfdfd3c5fb3b7559847f03a192 +size 26483 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png index fea7e1b4ff..9e49dbe381 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5fdf959ae01598ccd77444794313f72706164e4edcfefc2a31cd3e2da50196a -size 12258 +oid sha256:1df81fbf1a912bc52b89fb33fc8cc7555ac1551ca14f7e24fd0e193780780aca +size 12488 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png index 9ec88d801f..2b9eb5730d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb30aa04fe5d61342ee6176bc74d7aac5ef87d15c4f5b2cff3c20109b88c2c18 -size 12084 +oid sha256:6a8b83d057caa87467c59bf4f692473d2199a3722697a30dd27177b95017ae0f +size 12317 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png index 0c6d736b90..c5977ded1b 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:63438f54ce85471ac8ff85dbea686d58d941de3c59fd3ba5abc90bd66ef85bf1 -size 25791 +oid sha256:82035a024e22f48c04749e7d5baff820c44e5e79c8fa41e5d2548d8021a2232c +size 26104 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png index 4b2206f375..36cc9a2128 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:073124a176fbf79b4cc785025655a21b75aa3faabe472910a71314768d028a13 -size 25532 +oid sha256:7e81e401e31d2df4b769ccd37c98129cce050f0b6eeb87a06b0bff979f09977d +size 25912 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png index 0730b3d211..2275e5e5cd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0e1696f096efd5d8533437cc62d67f208703bf16686cff829e3401a222f5fd90 -size 25860 +oid sha256:19f12b34d744a9339a9d189ece343053dd134eb8b1c1a5c53c3866c52eb0caa7 +size 26194 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png index 6f7d1cde82..73ceec75f5 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4b85dbeeeeda0e3aa6f90e2d7702758f41163bb0c7c3b06174bdb59125ac0288 -size 25638 +oid sha256:2dcf7c0e4ebab3404e75963c8bad0851c59ea8ac62927d9ef5544fb5f6a84e21 +size 26069 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png index e57050c297..8bb48306a7 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c3ffbc86b2acfe1b4a57af729c813f65ef232154193469f1442cc263c0965535 -size 7626 +oid sha256:19894dc365e8fd1c3e9e498dd8279aab65dfad43f17855d4347890faedc33e68 +size 7741 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png index 3bb5b846cd..b89fe5f447 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0cfd9575e2ae9118a0ed187c7a2117b14e3b277771a00a9e3e032a3ef65667b7 -size 7602 +oid sha256:d26a3c369f3170b91a97dbc6ccc24590f2f23e98756996f9dc1dacb3b8e17100 +size 7708 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png index 4c4e834ef4..13a8342a67 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5b8180b725f14e4387edb1c25b64f82af3045252fdb7efb14afc11f2069da495 -size 52876 +oid sha256:ec2b9d065d9bb0626fe2cda52f95ce56194cc16dd32596f7641cfacd37236edb +size 52524 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png index e642836221..99a3bfe04e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53c938a23d05cfac715c3885356859cbf0fcec9a881906fb6c7c5a8a10a72330 -size 74675 +oid sha256:6ee17aa75497e48aeecaf26f8e5061e088e1e9909564473956bcfbd207c0a85b +size 74333 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png index 15ddbd88c6..8ac45cbf39 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5d434fca6c31c1048f9e9c1beccb70e13ed444a3fd08d82202774183f3574d25 -size 347891 +oid sha256:0dd014c712e21970315e43bf02ea9c586c659f1cf40916637c77eb9ac6423960 +size 334800 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png index 9693e36f12..41368a03c9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:254cef5f8a455f62f334fa396b86b81d46459eb9b0e54355cb051214cc76b70e -size 80188 +oid sha256:88ff0dbc1b54f2207958aef3a4888f1d42122cc82ffe88f130107b03bed44695 +size 80320 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png index b8ed8db07c..8fe792f8af 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:552103a87a25523828740b180acb7a96682605a7b581c2797b0d1ffded92ad72 -size 54389 +oid sha256:3276f7713f70cfb99c1241e6d8780e0b2920e5de01ae59b76c76936424979208 +size 54122 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png index 8c38194474..4a5a3aa73c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a8a2abb329249a48ea9f994d713516ee3d9d91c5f5fe10e638627e795687e27 -size 66869 +oid sha256:1a8a74b1a595ab640d2bc61706e105ff1d83ef83b9d04669797ff9b0356e7c77 +size 66582 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png index 87ff678cbe..cc3f337ca6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4f9d9dc90365878723c750535619d63c3c69e069870efef8b0e245ec24ab9602 -size 50658 +oid sha256:186bdc43d2c993d47ec19f8512a8aaaa3d1a83c851ac8bb307902ac923032086 +size 50207 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png index 8691656593..1c0334203a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b8b4b26cdca3cc7384195046837ccd29dd59eefba94c2cafd4187dd5da6d2607 -size 67739 +oid sha256:f4df7de04a8e99e94d619bf9e6156213640397e46e71a3a242bfb88748bbc6ec +size 67464 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png index 3c17060090..48bb6e3361 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4c93f5e3f77c4a68031244d282e24efec61ab28e6fe89bd5aeefd99f6a5d0c07 -size 58095 +oid sha256:9a4d84a934a71641b45bf6d6432f96dc6910f051bb859cc99cbc2db534c14575 +size 57812 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png index 15e23a7d03..4221852cdb 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf97bbee3772485bb2abf707bccc29693c478a5f723dfb3bbf9f35aa9d3e0cc2 -size 208907 +oid sha256:6a74708e9bfeb048c4fd1c71999138fd9ead9a616430e47e4bcd40de1a69c3f8 +size 206025 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png index 5f759a4d32..b34e4b9300 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f25388c4d203cee75790b473bcb46c49ea5bdf97f10b8a11a278e889dfb2fc49 -size 209768 +oid sha256:1bc0e4594213ce3ca2b3fc9e1fdacc4dbbd42cd3b286724ef53abab703be35b8 +size 206768 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png index 86003d7f7e..ee0a3cdcb9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2e0072e4c5b6d93ac23e7dbeddffb980c833fe5ace55e3610823ced7e808b17d -size 72625 +oid sha256:b1304d6e89e3a4da29e718d009a80431d008e07a634ae52468d5f41d2145c659 +size 70220 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png index 83842589cc..ce55cc22cd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:93db3209fe5b97c0e214291f032b9d34f9eafb55775633f9c30cf923c05ee450 -size 88488 +oid sha256:57088d6995bde33e3dbc66fe4e72242ae5379036e23e3302d3ae66b7861c4fcc +size 86994 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png index 1db13a7b4a..5b7745d014 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf7c20343e19f454e55b027f2e9d674d086db22e9f70ce223888cc1626d935cc -size 74884 +oid sha256:53b2e26d3fe82b735e6bc1793721443da460e8f03b63b1d805506310c742db15 +size 72662 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png index 61632a1f52..8dc14725c2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d2a691bd1ec488bcc8cf40c490a30c1e3221dedadd887293a772db9758f47992 -size 106813 +oid sha256:59d0a5de1f3c76bbaaf3bf75cb8fc3eb1ebf41b80084ab233cb4e79cfe272fc1 +size 105346 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png index d26b6961a0..bdbeb98ddd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1508e297ab3c955b9784dda60b4e88db9e0a6d5c82f971b9144b8016e4a254fc -size 56597 +oid sha256:cb94bc79c36e43a0f22a4366d40e18ff9be2f434ebc95f88443945bb429f6c34 +size 54229 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png index 8ba69aa893..50e7a65a62 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6bf57830c8e8766e8209eec18cd245fb3a49f2698dfffb60ec5475c95fc4bea -size 393334 +oid sha256:1228278029177b8a0dc4c192b6f2784c56117ffe10971f4c844bd79018b07c08 +size 382861 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png index 55ff911d20..2cee6bdeef 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5ff448008a5dc0f3c640be53436d3197630ebe761fb046fa5c3510bf9e2a2de8 -size 50999 +oid sha256:1dac04cf1e22cf3daf930e1e1972562c8b1460d6c36b6da9832c080c7f34d456 +size 50751 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png index 526ac4f984..d242468337 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3287968c74c01d2c4781da7d1ff958ccc3fddb51f84f2cbe74bb7921c7f65a19 -size 71627 +oid sha256:4225e626c83444cc1c2c38273b9a8c822261e010cdee7e2cc1775b7a8d57b636 +size 71138 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png index 0ce3acec5c..85f3bd1234 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9c6e037d1085366ca0212bdb7570c6c5d1c161e92d8929257699c12f3329846c -size 178233 +oid sha256:a023866feff98d7ac1520eb5257316c63c19dc3fb3fdb563e57371c182266d87 +size 174515 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png index d356dfec54..fcd73db5ac 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d22db0588d9a6a355246cad3f94fa3a425b80b2624081e976977990c331b3a6 -size 79274 +oid sha256:52959b052abdd19eedb959c818e01f1710a465154e82ab5509fb11e6d1f91f79 +size 79321 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png index d742cf1c1e..8c872efd4c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8af811dc353b9bcf90838d7524ab6fd365f352e8d4372dc8125635b0bda6b9a0 -size 52659 +oid sha256:597578e76db8fded2c98cd5030959a2beaf400821be423b2e112b52fb4bf30a9 +size 52380 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png index 768061aecd..e8a4afd625 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8185fae5199f413dc912727c21501de821c586b0e0b899410587d5eb53e80e8 -size 64190 +oid sha256:4503ba863f6307ee222d38ce1cf38a808d87b808bf411247a22172ddb9bbc297 +size 63866 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png index 8f8c2b58ac..8a58d49a3d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b9b465d0fef08eff7ced732123cfec8dab1f19acb4be7733f8661afa05ef65af -size 48927 +oid sha256:7eef2e3042d44d7b5b5d668a06c42d0e1a054b1b0f57ce85c94053684664e09d +size 48685 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png index 0c710d0139..eef2182633 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d49b01d32e276ce9213605418e8ea494363edf3c76338fb0b4b24bfd1ffc1bb6 -size 64925 +oid sha256:26ff423281964cc315eb1a2a9b6e53b629d2425284413a45051632be2769abe5 +size 64777 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png index 983fb61cb8..7783751544 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7c475add38b97b849970d22e39137fa8e8a2f0bf7c14ce957828fe56adc5b92 -size 55867 +oid sha256:06809ec71fe6cb30a95d9d088162194ec94b5afd14095ef3d9351fea4d07e31a +size 55594 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png index b00b2a56b5..57792de542 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a5fa5cda7c17fd99d1e8ab27c37bc9e53ef9ef42288f140ee438d03bdda45de -size 208480 +oid sha256:95f6fc43d8140a0c3eecddfe164e13d9c81dfef610eab4b42287120739b6d2a4 +size 205458 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png index b1b5c57204..3e7a0ae5c4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:55392b7f740c5074750fb4b807f1e1e4ca6dea9b2601742596251bd52bd098d1 -size 209337 +oid sha256:4523f57e9318fc27be4c4e2149dd8de0ca2778f2648f7f0cd625a010d69c4fe0 +size 206271 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png index 16a314d9fe..74f9e41f86 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de84923f8ed54914c8ab30b17823ddfd43ac845a3e349e597931b2735a6ce424 -size 69696 +oid sha256:2f5de208511eb0358273899dc6cba82d5be1c7102e28ee3d66879e244150bee7 +size 67546 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png index 12fed32ded..dd1aa606e6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6b01a2966ee15c1305454ab0f33a0b333864a941dbcaf6059e1479ff6e50555 -size 83899 +oid sha256:edb82a6ef6264e2c1e3ea395c121ae2ab586a34c2936e4d47b829d74149d4584 +size 82271 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png index 3fb5944ebf..bf2637e2a7 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b5012f37f6dd279b35ef15b56d4b6bca7d8b16b387a2c5e8f57351dd0ef862b -size 72166 +oid sha256:8e2d00d2b1937f4c7d11d34a548b605c976635ea70409d1748f77cf49aeb3713 +size 70213 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png index 3dc396e129..f2d5fdf66d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a558964dd3e41908761ba945a1e9715b3ed1396257380e990c8a5a2839955173 -size 100821 +oid sha256:cd75c46e86300b57a945dbed154cc90cea7138f0a09d4fa1aa23f9656265d3ef +size 98962 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png index ccc20778f2..b0b732c7da 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cafb964b37fc82c3179d8abd0ec2ad7f66e2fa2e47a09e563608a9b7a46f0946 -size 55177 +oid sha256:38b03934d0e45f3e854861320090d552c98c98ccbd5c2d0f355d33173953de61 +size 52971 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png index 50d7c9607a..0dba9cad42 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45c8a459dc025a00345b34b41fb3051722f9fd6875ec77afe301c653ee905fd8 -size 189462 +oid sha256:8cb384de4691d52541434e872c2ef310a6d09443af1e71841d670ba0a6015b6e +size 185712 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png index b0fa561ae6..48caa5ab69 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:067292421d6bf51a7858de98270d6671564aa5d42428210ae0c4e9afb7361027 -size 57090 +oid sha256:da15d073f026cfd1fa721e1e00a0aa229da0db4b6d987c015d97e5304ef2fbd6 +size 54535 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png index 5b100f62c2..9644c0884e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce476cb344a6cc208afc81c6e7824e02371ea98b8ca0913945adf646892a119d -size 56007 +oid sha256:38b5d57104a70035419821a8c568dba13f0117ffb7cc1f7cba88c8427449d97f +size 55244 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png index f93a453873..96b194ae37 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d393a30845d9054279cee7024323da2b683ded73ac1cd631a7be61dac5679710 -size 58763 +oid sha256:0394af55a9a5cba93fd1d301a50c271451481b94946dedbc66219c9e627542af +size 56212 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png index 4337a19830..2fd4e41b08 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19b9eafcb993e59955e0aece53067c9fb291515769f562bdaa361338cb04e352 -size 52730 +oid sha256:e7545200b4cc99d9cc8253a6eb07ec4beca62b61be6464e94129e48747310b5d +size 50860 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png index 6c9f0886c4..7d426fae4d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7732293593581afdc475d04611513b397dedd3d90d8e4f421bd8fa494dbdc05c -size 57107 +oid sha256:381c9e4601464b9962d32a9eadcb09cc9f492e6c02c4f5ad00bafec01a586945 +size 54549 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png index f3d0b5713f..a29cd5182f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f3d72f6b56bbf584c764d8b7c9264296d2e376d4fa78b849e17a97b3587ccb4c -size 58951 +oid sha256:dd62e7d988bb03c1bb95bc176ebcc4250f897c132522e6089a2ecaba61d7e2fb +size 56311 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png index ff6f97fd9a..9363195e81 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e2fbf447d1a40417c856dd48c7262d4326f6537db9271f5796adc3bc0a0c2cbe -size 57516 +oid sha256:382a232059429b5595b98eef2c6a13f81db3ca3075545613417b066074b8a63e +size 55716 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png index ed62bc4bb3..b41fa25a9c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4036f63f388553365b52c030cd66e1064bb47afac2284794590c10c8bee7b48b -size 54888 +oid sha256:f8337e1cfa93565514509a6b215184fde4ae1f5bee5c998374c78b1b876b4287 +size 52204 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png index 3387c0c69a..763e9b9e45 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e882c35861c4856b58bd2729253896ab2451a40d76f36a05edb7fa223e77fe3 -size 54713 +oid sha256:7c964f807d0a05454c2f7c7083a46adbd027e9b867a60e1d34f51b415147aaaf +size 52402 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png index 5dab459583..96d2f44103 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c527021fe0b5d92db91c8551599fccbae012196fc4006acf5873e4eb5cfbb5ed -size 61775 +oid sha256:d1b6899db7a81309d4b8ff9e0e24a8be2f1e65641aeb269cf9ca51ce0dffcff5 +size 60144 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png index 3d513091a9..9cb4c23483 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d8ee2bc4943fed6ae1d7d0a66261c6e1b92d02312d7635fea254104c0ebf5b5a -size 42948 +oid sha256:4fe4e7dd898e97e802ecfaeb5621cccef042e7ddd9312d3d0bc6cae5f021f323 +size 42096 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png index 7a1615e786..621b68448e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57c4c864d6fd2e4d39b21187b6d3f64db339e7c191ff4bba17f35d1fa8744fc5 -size 42118 +oid sha256:2cbed623795b279dc0bbda23be859f13cae73dc2f9dbdd2f87c1b2b33e816f2d +size 41247 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png index 56b226da71..3c778daaa9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2bce95c37798213f515946bebe1880dc41079781f56b0f6d719b72d7d56ed1ed -size 55161 +oid sha256:5484225f7458e76564069904b9108b5178304ba5bd3cab2c3ecb57f70f83b517 +size 52906 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png index dd07b80e85..10b641bd33 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51f40086adfeae6ec8c3d168ced6fcf8543af2f8bacfb5e99f3a0b4ed22efafd -size 54097 +oid sha256:0437800ad7ee754d50c2747f5eb5b40571bd7d97627987d2018fba134eb72d5d +size 53563 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png index 2f6ce4ab90..41776266a3 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:51813755ea691aae411e8e92841f7e27414c86b3d265c3efb64eb975e0396f8c -size 56588 +oid sha256:33214398530e90f8261c62961316063efd227bbd2558b3206607b744cc7cccca +size 54374 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png index c1788df8e6..d1f789fb51 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b4f827de075241e12bf3c4259d288e5f9fd78aa3c45c43985fa14dc481048ebb -size 47311 +oid sha256:2f93b7f8fb59a1450ccb39fcb3d9c3c7bd056378b8a6615b919798329aba0428 +size 45637 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png index a974fff1b6..17a1dceaf4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3210235a7fbe33b3aed80f9de2e01a836a171c62991a87876b6446f446e86fa4 -size 55189 +oid sha256:c32553ab8a536e0dbdd905e1d3b8dd01b981277c1a03d694a5a4af04d3458739 +size 52931 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png index c6c0934c78..f86bc3402c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b79801ffa9827840749462a204bb7b22eea9a7816fad3a93a7b9cd436c29a61 -size 57186 +oid sha256:5e3d624ca7754e16d0f85694d3f2ca53f056c229552f528dd0c5e8fbcdc9633c +size 54617 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png index 41371c2c1f..980d7b5e7c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:de1cb189fafc316ba001c9257d0435ef8dcd02fa03f4308a1dc03bfccdc2e613 -size 52455 +oid sha256:2decdee158a25f7e2da4a5721db975c8f9f3d9968643bb9cd36722154d911da2 +size 50862 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png index 3847c5b2f8..405a163b82 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b22b124bc4f56a15cd39ccacd4252af7613fe07e71b989ce67eec02e0e535ec -size 52799 +oid sha256:27f3a4537c102e965a42cc1fce06a6f1bc8e34e3998802f10dc14de49129eef1 +size 50543 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png index 8c4734e118..d18de0e6e7 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b1821cab0325f3bb59993fcc2f4c44333faa0161fdfd486202176f0d58e2b71c -size 52723 +oid sha256:acfa66e8b1d537154e8785c31b59954da0eed7c4d2e3ea8600272055e2fea80a +size 50607 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png index cdf3ed41a8..3bbeb32159 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:45eeb2ee2f8453cc094c3b999e702097189e070fc9f1dbbeb9e76f40bdad0ba3 -size 56463 +oid sha256:9d5c222ecff94f91854a9a3cf196337466d53c2009806d4629516a095fac1da5 +size 54859 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png index 70f9e7890a..89105aa64f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2280febc8e962f986c8539b8011e8ab524d9a62d2cabafcd7002ae0e86562ffd -size 39593 +oid sha256:fce953883fe7fc1b481b0571e1f4e4eb407480126d8e1aeed0321d4bf191c29d +size 38856 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png index cf2e640d31..4785460a90 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0f78a9b97a4238bc1b24df9c32d8272ec15ef55ec0870e9c354d986a4e3401f4 -size 38805 +oid sha256:cf290b962433c5ea42b869487955f569494a051fbd4c1761683f206f07c1a65d +size 38069 From 5eceab15b68b32adf134b6f61fa89339ba4370d2 Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 10:53:53 +0100 Subject: [PATCH 064/161] use different heights for reaction summary view and reaction buttons Signed-off-by: Marco Antonio Alvarez --- .../impl/timeline/components/MessagesReactionButton.kt | 2 +- .../components/reactionsummary/ReactionSummaryView.kt | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) 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 b136dd94bf..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 @@ -119,7 +119,7 @@ sealed interface MessagesReactionsButtonContent { val isHighlighted get() = this is Reaction && reaction.isHighlighted } -internal val REACTION_EMOJI_LINE_HEIGHT = 25.sp +internal val REACTION_EMOJI_LINE_HEIGHT = 20.sp internal const val REACTION_IMAGE_ASPECT_RATIO = 1.0f private val ADD_EMOJI_SIZE = 16.dp 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 5ab974fcca..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 @@ -60,7 +60,6 @@ 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_EMOJI_LINE_HEIGHT 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 @@ -78,6 +77,8 @@ import io.element.android.libraries.matrix.ui.media.MediaRequestData import io.element.android.libraries.matrix.ui.model.getAvatarData import kotlinx.coroutines.launch +internal val REACTION_SUMMARY_LINE_HEIGHT = 25.sp + @OptIn(ExperimentalMaterial3Api::class) @Composable fun ReactionSummaryView( @@ -203,7 +204,7 @@ private fun AggregatedReactionButton( if (reaction.key.startsWith("mxc://")) { AsyncImage( modifier = Modifier - .heightIn(min = REACTION_EMOJI_LINE_HEIGHT.toDp(), max = REACTION_EMOJI_LINE_HEIGHT.toDp()) + .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 @@ -214,7 +215,7 @@ private fun AggregatedReactionButton( text = reaction.displayKey, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 20.sp, - lineHeight = REACTION_EMOJI_LINE_HEIGHT + lineHeight = REACTION_SUMMARY_LINE_HEIGHT ), ) } @@ -225,7 +226,7 @@ private fun AggregatedReactionButton( color = textColor, style = ElementTheme.typography.fontBodyMdRegular.copy( fontSize = 20.sp, - lineHeight = REACTION_EMOJI_LINE_HEIGHT + lineHeight = REACTION_SUMMARY_LINE_HEIGHT ) ) } From 6eac788a44168bb5ee889a0b6bbc9e7b5d6f4571 Mon Sep 17 00:00:00 2001 From: ElementBot Date: Thu, 4 Jan 2024 10:27:17 +0000 Subject: [PATCH 065/161] Update screenshots --- ...essagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...essagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...essagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...essagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...sagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...gesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png | 4 ++-- ...sReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png | 4 ++-- ...emEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png | 4 ++-- ...EventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png | 4 ++-- ...elineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png | 4 ++-- ...entRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png | 4 ++-- ...tRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png | 4 ++-- ...ll_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png | 4 ++-- ..._TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png | 4 ++-- ...TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png | 4 ++-- ...lineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png | 4 ++-- ...neItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png | 4 ++-- ...ineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png | 4 ++-- ...eItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png | 4 ++-- ...emReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png | 4 ++-- ...ReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png | 4 ++-- ...emReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png | 4 ++-- ...ReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png | 4 ++-- ...melineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png | 4 ++-- ...lineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...eView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...View_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...sView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png | 4 ++-- ...ew_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png | 4 ++-- ...iew_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png | 4 ++-- 86 files changed, 172 insertions(+), 172 deletions(-) diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png index 4f09235eec..8304142f53 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b7bcac7647aea3564a49731741d52062fb02cda69bc9a4836af23e8ddfaeed79 -size 6397 +oid sha256:53ae9ca05b387ac3fb5e057c50552c325bea9680d22bd49197f90abef639a580 +size 6353 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png index bfb1707cc8..e18eec4a31 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ff612a2b9f8f7b52b4e01affbd415759f8323b11405f4708e8b4d9f76dca8530 -size 7256 +oid sha256:2b285ac42701164b889173a47e8937b72ee2c46a6e9d076b22b009b71a9c11ed +size 7205 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png index 97ee8cae6d..bdbf93d8a3 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad0aa74f795712af5e868e685471af07aedb543438859eb9bc34de69df3df76d -size 7200 +oid sha256:5558a601b4c13cfb9e6052ecdf959b247b65d1d9bbbe22798f33303b88676783 +size 7176 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png index 1a79f5224d..7beaa17c41 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Day-11_11_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:440bf3933b43feef7a93b6250c963e36158e00787243f5fab6ea70e3e4485785 -size 8149 +oid sha256:8409366bbebd5ffff45a5f367d1f45d17dcee507530e54beee4b1cc0cfe540a7 +size 8152 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png index 54456bf1d6..705825990f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:747383cd19d84ed3a06a48342d9f5750cf993883cf77ce39288e3027614cecda -size 6370 +oid sha256:cd1ab6edbc7099020fa9b06802d67cd25b2fd76c3e16e517c954f44fcb3b0109 +size 6348 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png index 37005abf8a..0eac30b9ce 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:90e0620239c15202c8b7adef3ab5b2b8a2a68e7a5469eed84da5faf78a90ce1d -size 7197 +oid sha256:1fcc61f847daf9adbb2de5dba0aa1a7a44c6e6cb577c96ff8131829a323a5d56 +size 7224 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png index 057d069bfa..0e83b1c1ed 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8db24ffca1b63fbe83f9d4e082b8b99f4b5edf047f233732979fbb7f8efd18c8 -size 7152 +oid sha256:f20e8eabe5c83c04238f786528896724030e09261e6bccbea4b994f20857c934 +size 7134 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png index 9a742a6841..78c15c4d8f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionButton_null_MessagesReactionButton-Night-11_12_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4be5363971ddcc1bf05e66daff4dd2a5d7f95576e006d2c6e97c9d6f40a28a95 -size 8029 +oid sha256:607d39ae946b273ba4b3e29aee9a072cec914658052b0570cff181f9f0398fc6 +size 8037 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png index 5ccd98834f..2d948c7f22 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Day-13_13_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a4ac75abf13ddec0b94bebc2124046e5a9c065c143de0d2a5977bc90bf630e50 -size 10387 +oid sha256:762c29e795dc3e37428f0ab42a38899c8859d55ea5cf64b4d726cec99a857911 +size 10296 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png index 7010059035..ec605b89bd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_MessagesReactionExtraButtons_null_MessagesReactionExtraButtons-Night-13_14_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c6db68ebf7594ef6f835b2fed020006fdaa0533770e97e437bb6c9d649435292 -size 10077 +oid sha256:af4fbde1c1cdc06700538cac4d11ef6480c39f24d7806a71da0e43740056f892 +size 9995 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png index 4b3afaa6f6..64fcfd1eaa 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Day-17_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a5da4af80a057337ae0761929b2b5051130b8f43386ce4b03f35a3f8bad3c023 -size 139892 +oid sha256:fd8440df56bc810e9d01167580eca5409e1e0458c463f0e1d039d092ff35ed49 +size 139471 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png index 2aebaa163a..5b697f6788 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowForDirectRoom_null_TimelineItemEventRowForDirectRoom-Night-17_18_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36d51bf5443aabe64503f7abe6f9053a55979013cad8e90216442e1b126161b8 -size 136276 +oid sha256:eb450d60e438e212aeecb8e82771b54d1eeeeaf1063a0bb80c8f4c070e181ba7 +size 135783 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png index a0f9840021..badab1b02f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowLongSenderName_null_TimelineItemEventRowLongSenderName_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:226ba03547d8e62a35fca230c70697ef7e192c5e9d9073806b0c1d312a30dbe5 -size 18304 +oid sha256:795ff3e304af3dbfb08dbe5f6baf866fce06301d722ea8044be609e89288ea82 +size 18245 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png index 8d71312952..f9e14e278a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Day-19_19_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36eaef5e53d9d80867b4795d8860ef1bb86ba1d0e4269a56f2b66fe3c23eb7e5 -size 85791 +oid sha256:8fa46a02487955106780200ff91b13c3f2c8585f83fefc43358f0abab5a635fd +size 85229 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png index f43ace536f..8849ec7845 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRowWithManyReactions_null_TimelineItemEventRowWithManyReactions-Night-19_20_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a43179afd02fe9fbd09acc522c5723aed1d2562843350c80f70aef73a510c20e -size 82291 +oid sha256:7452b71faf637d017c3a29b3df7fdb0d37847111f88b31702170f51921e52bb9 +size 81520 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png index a81d526130..adec73a672 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Day-16_16_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:17c9c94e788aa012666dbb8b64da725ba2633f68ff395ea0ed276d659507489f -size 191809 +oid sha256:94a87cc8a6b2efa1b2e4bee88f3a1ab8ee09b6a337c4ceb23247de7d18b9e41b +size 190944 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png index 7149b06c08..4627076c06 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventRow_null_TimelineItemEventRow-Night-16_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56c0434894410ed6f185f9d3a76554fceff53f5948e4ad61c4724f1aa392a9f2 -size 188007 +oid sha256:f8d72a4bcb587cde92f22203116711e215cba8ecd201e2813c6ce80ec94109b5 +size 187089 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png index 2bc5716675..bc50eb63f4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemEventTimestampBelow_null_TimelineItemEventTimestampBelow_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3085b4fb73adea7858a3d73d1f5b73a0c167c2c8efb3de6236998c935d3ff390 -size 56740 +oid sha256:d261ba035401e1624a48911f1f9072a07e134e5d3b870fe488e8bfdb681c092c +size 56591 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png index 20f4766af2..844661cdf0 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Day-24_24_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0cb0900a5037e537e2192680d1381dde794c8c4b71025824e7fe9d66a6919fe -size 26783 +oid sha256:8e4189c4f765657b0b73c66988b199878982107a02b3f7affbcd36c9909595b6 +size 26494 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png index 94278c4c80..d0a0b540a2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsLayout_null_TimelineItemReactionsLayout-Night-24_25_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d7b08f307a298e0044bc023a02653b68a3ce83bfdfd3c5fb3b7559847f03a192 -size 26483 +oid sha256:27b0d2e120793a6e1a8f20c85c0981a280f1bc95a15c67f1e13e81bec8e06fdb +size 26069 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png index 9e49dbe381..fea7e1b4ff 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Day-26_26_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1df81fbf1a912bc52b89fb33fc8cc7555ac1551ca14f7e24fd0e193780780aca -size 12488 +oid sha256:c5fdf959ae01598ccd77444794313f72706164e4edcfefc2a31cd3e2da50196a +size 12258 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png index 2b9eb5730d..9ec88d801f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewFew_null_TimelineItemReactionsViewFew-Night-26_27_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a8b83d057caa87467c59bf4f692473d2199a3722697a30dd27177b95017ae0f -size 12317 +oid sha256:bb30aa04fe5d61342ee6176bc74d7aac5ef87d15c4f5b2cff3c20109b88c2c18 +size 12084 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png index c5977ded1b..0c6d736b90 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Day-27_27_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:82035a024e22f48c04749e7d5baff820c44e5e79c8fa41e5d2548d8021a2232c -size 26104 +oid sha256:63438f54ce85471ac8ff85dbea686d58d941de3c59fd3ba5abc90bd66ef85bf1 +size 25791 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png index 36cc9a2128..4b2206f375 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewIncoming_null_TimelineItemReactionsViewIncoming-Night-27_28_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7e81e401e31d2df4b769ccd37c98129cce050f0b6eeb87a06b0bff979f09977d -size 25912 +oid sha256:073124a176fbf79b4cc785025655a21b75aa3faabe472910a71314768d028a13 +size 25532 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png index 2275e5e5cd..0730b3d211 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Day-28_28_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19f12b34d744a9339a9d189ece343053dd134eb8b1c1a5c53c3866c52eb0caa7 -size 26194 +oid sha256:0e1696f096efd5d8533437cc62d67f208703bf16686cff829e3401a222f5fd90 +size 25860 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png index 73ceec75f5..6f7d1cde82 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsViewOutgoing_null_TimelineItemReactionsViewOutgoing-Night-28_29_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2dcf7c0e4ebab3404e75963c8bad0851c59ea8ac62927d9ef5544fb5f6a84e21 -size 26069 +oid sha256:4b85dbeeeeda0e3aa6f90e2d7702758f41163bb0c7c3b06174bdb59125ac0288 +size 25638 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png index 8bb48306a7..e57050c297 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Day-25_25_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19894dc365e8fd1c3e9e498dd8279aab65dfad43f17855d4347890faedc33e68 -size 7741 +oid sha256:c3ffbc86b2acfe1b4a57af729c813f65ef232154193469f1442cc263c0965535 +size 7626 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png index b89fe5f447..3bb5b846cd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components_TimelineItemReactionsView_null_TimelineItemReactionsView-Night-25_26_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d26a3c369f3170b91a97dbc6ccc24590f2f23e98756996f9dc1dacb3b8e17100 -size 7708 +oid sha256:0cfd9575e2ae9118a0ed187c7a2117b14e3b277771a00a9e3e032a3ef65667b7 +size 7602 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png index 13a8342a67..4c4e834ef4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec2b9d065d9bb0626fe2cda52f95ce56194cc16dd32596f7641cfacd37236edb -size 52524 +oid sha256:5b8180b725f14e4387edb1c25b64f82af3045252fdb7efb14afc11f2069da495 +size 52876 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png index 99a3bfe04e..e642836221 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ee17aa75497e48aeecaf26f8e5061e088e1e9909564473956bcfbd207c0a85b -size 74333 +oid sha256:53c938a23d05cfac715c3885356859cbf0fcec9a881906fb6c7c5a8a10a72330 +size 74675 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png index 8ac45cbf39..15ddbd88c6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0dd014c712e21970315e43bf02ea9c586c659f1cf40916637c77eb9ac6423960 -size 334800 +oid sha256:5d434fca6c31c1048f9e9c1beccb70e13ed444a3fd08d82202774183f3574d25 +size 347891 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png index 41368a03c9..9693e36f12 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:88ff0dbc1b54f2207958aef3a4888f1d42122cc82ffe88f130107b03bed44695 -size 80320 +oid sha256:254cef5f8a455f62f334fa396b86b81d46459eb9b0e54355cb051214cc76b70e +size 80188 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png index 8fe792f8af..b8ed8db07c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3276f7713f70cfb99c1241e6d8780e0b2920e5de01ae59b76c76936424979208 -size 54122 +oid sha256:552103a87a25523828740b180acb7a96682605a7b581c2797b0d1ffded92ad72 +size 54389 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png index 4a5a3aa73c..8c38194474 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a8a74b1a595ab640d2bc61706e105ff1d83ef83b9d04669797ff9b0356e7c77 -size 66582 +oid sha256:6a8a2abb329249a48ea9f994d713516ee3d9d91c5f5fe10e638627e795687e27 +size 66869 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png index cc3f337ca6..87ff678cbe 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_14,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:186bdc43d2c993d47ec19f8512a8aaaa3d1a83c851ac8bb307902ac923032086 -size 50207 +oid sha256:4f9d9dc90365878723c750535619d63c3c69e069870efef8b0e245ec24ab9602 +size 50658 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png index 1c0334203a..8691656593 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_15,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4df7de04a8e99e94d619bf9e6156213640397e46e71a3a242bfb88748bbc6ec -size 67464 +oid sha256:b8b4b26cdca3cc7384195046837ccd29dd59eefba94c2cafd4187dd5da6d2607 +size 67739 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png index 48bb6e3361..3c17060090 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_16,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a4d84a934a71641b45bf6d6432f96dc6910f051bb859cc99cbc2db534c14575 -size 57812 +oid sha256:4c93f5e3f77c4a68031244d282e24efec61ab28e6fe89bd5aeefd99f6a5d0c07 +size 58095 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png index 4221852cdb..15e23a7d03 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a74708e9bfeb048c4fd1c71999138fd9ead9a616430e47e4bcd40de1a69c3f8 -size 206025 +oid sha256:cf97bbee3772485bb2abf707bccc29693c478a5f723dfb3bbf9f35aa9d3e0cc2 +size 208907 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png index b34e4b9300..5f759a4d32 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1bc0e4594213ce3ca2b3fc9e1fdacc4dbbd42cd3b286724ef53abab703be35b8 -size 206768 +oid sha256:f25388c4d203cee75790b473bcb46c49ea5bdf97f10b8a11a278e889dfb2fc49 +size 209768 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png index ee0a3cdcb9..86003d7f7e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b1304d6e89e3a4da29e718d009a80431d008e07a634ae52468d5f41d2145c659 -size 70220 +oid sha256:2e0072e4c5b6d93ac23e7dbeddffb980c833fe5ace55e3610823ced7e808b17d +size 72625 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png index ce55cc22cd..83842589cc 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57088d6995bde33e3dbc66fe4e72242ae5379036e23e3302d3ae66b7861c4fcc -size 86994 +oid sha256:93db3209fe5b97c0e214291f032b9d34f9eafb55775633f9c30cf923c05ee450 +size 88488 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png index 5b7745d014..1db13a7b4a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53b2e26d3fe82b735e6bc1793721443da460e8f03b63b1d805506310c742db15 -size 72662 +oid sha256:bf7c20343e19f454e55b027f2e9d674d086db22e9f70ce223888cc1626d935cc +size 74884 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png index 8dc14725c2..61632a1f52 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:59d0a5de1f3c76bbaaf3bf75cb8fc3eb1ebf41b80084ab233cb4e79cfe272fc1 -size 105346 +oid sha256:d2a691bd1ec488bcc8cf40c490a30c1e3221dedadd887293a772db9758f47992 +size 106813 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png index bdbeb98ddd..d26b6961a0 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb94bc79c36e43a0f22a4366d40e18ff9be2f434ebc95f88443945bb429f6c34 -size 54229 +oid sha256:1508e297ab3c955b9784dda60b4e88db9e0a6d5c82f971b9144b8016e4a254fc +size 56597 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png index 50e7a65a62..8ba69aa893 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Day-8_8_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1228278029177b8a0dc4c192b6f2784c56117ffe10971f4c844bd79018b07c08 -size 382861 +oid sha256:c6bf57830c8e8766e8209eec18cd245fb3a49f2698dfffb60ec5475c95fc4bea +size 393334 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png index 2cee6bdeef..55ff911d20 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dac04cf1e22cf3daf930e1e1972562c8b1460d6c36b6da9832c080c7f34d456 -size 50751 +oid sha256:5ff448008a5dc0f3c640be53436d3197630ebe761fb046fa5c3510bf9e2a2de8 +size 50999 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png index d242468337..526ac4f984 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4225e626c83444cc1c2c38273b9a8c822261e010cdee7e2cc1775b7a8d57b636 -size 71138 +oid sha256:3287968c74c01d2c4781da7d1ff958ccc3fddb51f84f2cbe74bb7921c7f65a19 +size 71627 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png index 85f3bd1234..0ce3acec5c 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a023866feff98d7ac1520eb5257316c63c19dc3fb3fdb563e57371c182266d87 -size 174515 +oid sha256:9c6e037d1085366ca0212bdb7570c6c5d1c161e92d8929257699c12f3329846c +size 178233 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png index fcd73db5ac..d356dfec54 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52959b052abdd19eedb959c818e01f1710a465154e82ab5509fb11e6d1f91f79 -size 79321 +oid sha256:9d22db0588d9a6a355246cad3f94fa3a425b80b2624081e976977990c331b3a6 +size 79274 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png index 8c872efd4c..d742cf1c1e 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:597578e76db8fded2c98cd5030959a2beaf400821be423b2e112b52fb4bf30a9 -size 52380 +oid sha256:8af811dc353b9bcf90838d7524ab6fd365f352e8d4372dc8125635b0bda6b9a0 +size 52659 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png index e8a4afd625..768061aecd 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4503ba863f6307ee222d38ce1cf38a808d87b808bf411247a22172ddb9bbc297 -size 63866 +oid sha256:d8185fae5199f413dc912727c21501de821c586b0e0b899410587d5eb53e80e8 +size 64190 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png index 8a58d49a3d..8f8c2b58ac 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_14,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7eef2e3042d44d7b5b5d668a06c42d0e1a054b1b0f57ce85c94053684664e09d -size 48685 +oid sha256:b9b465d0fef08eff7ced732123cfec8dab1f19acb4be7733f8661afa05ef65af +size 48927 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png index eef2182633..0c710d0139 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_15,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:26ff423281964cc315eb1a2a9b6e53b629d2425284413a45051632be2769abe5 -size 64777 +oid sha256:d49b01d32e276ce9213605418e8ea494363edf3c76338fb0b4b24bfd1ffc1bb6 +size 64925 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png index 7783751544..983fb61cb8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_16,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:06809ec71fe6cb30a95d9d088162194ec94b5afd14095ef3d9351fea4d07e31a -size 55594 +oid sha256:d7c475add38b97b849970d22e39137fa8e8a2f0bf7c14ce957828fe56adc5b92 +size 55867 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png index 57792de542..b00b2a56b5 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:95f6fc43d8140a0c3eecddfe164e13d9c81dfef610eab4b42287120739b6d2a4 -size 205458 +oid sha256:8a5fa5cda7c17fd99d1e8ab27c37bc9e53ef9ef42288f140ee438d03bdda45de +size 208480 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png index 3e7a0ae5c4..b1b5c57204 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4523f57e9318fc27be4c4e2149dd8de0ca2778f2648f7f0cd625a010d69c4fe0 -size 206271 +oid sha256:55392b7f740c5074750fb4b807f1e1e4ca6dea9b2601742596251bd52bd098d1 +size 209337 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png index 74f9e41f86..16a314d9fe 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f5de208511eb0358273899dc6cba82d5be1c7102e28ee3d66879e244150bee7 -size 67546 +oid sha256:de84923f8ed54914c8ab30b17823ddfd43ac845a3e349e597931b2735a6ce424 +size 69696 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png index dd1aa606e6..12fed32ded 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edb82a6ef6264e2c1e3ea395c121ae2ab586a34c2936e4d47b829d74149d4584 -size 82271 +oid sha256:d6b01a2966ee15c1305454ab0f33a0b333864a941dbcaf6059e1479ff6e50555 +size 83899 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png index bf2637e2a7..3fb5944ebf 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8e2d00d2b1937f4c7d11d34a548b605c976635ea70409d1748f77cf49aeb3713 -size 70213 +oid sha256:0b5012f37f6dd279b35ef15b56d4b6bca7d8b16b387a2c5e8f57351dd0ef862b +size 72166 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png index f2d5fdf66d..3dc396e129 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd75c46e86300b57a945dbed154cc90cea7138f0a09d4fa1aa23f9656265d3ef -size 98962 +oid sha256:a558964dd3e41908761ba945a1e9715b3ed1396257380e990c8a5a2839955173 +size 100821 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png index b0b732c7da..ccc20778f2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38b03934d0e45f3e854861320090d552c98c98ccbd5c2d0f355d33173953de61 -size 52971 +oid sha256:cafb964b37fc82c3179d8abd0ec2ad7f66e2fa2e47a09e563608a9b7a46f0946 +size 55177 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png index 0dba9cad42..50d7c9607a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline_TimelineView_null_TimelineView-Night-8_9_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8cb384de4691d52541434e872c2ef310a6d09443af1e71841d670ba0a6015b6e -size 185712 +oid sha256:45c8a459dc025a00345b34b41fb3051722f9fd6875ec77afe301c653ee905fd8 +size 189462 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png index 48caa5ab69..b0fa561ae6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:da15d073f026cfd1fa721e1e00a0aa229da0db4b6d987c015d97e5304ef2fbd6 -size 54535 +oid sha256:067292421d6bf51a7858de98270d6671564aa5d42428210ae0c4e9afb7361027 +size 57090 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png index 9644c0884e..5b100f62c2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38b5d57104a70035419821a8c568dba13f0117ffb7cc1f7cba88c8427449d97f -size 55244 +oid sha256:ce476cb344a6cc208afc81c6e7824e02371ea98b8ca0913945adf646892a119d +size 56007 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png index 96b194ae37..f93a453873 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0394af55a9a5cba93fd1d301a50c271451481b94946dedbc66219c9e627542af -size 56212 +oid sha256:d393a30845d9054279cee7024323da2b683ded73ac1cd631a7be61dac5679710 +size 58763 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png index 2fd4e41b08..4337a19830 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7545200b4cc99d9cc8253a6eb07ec4beca62b61be6464e94129e48747310b5d -size 50860 +oid sha256:19b9eafcb993e59955e0aece53067c9fb291515769f562bdaa361338cb04e352 +size 52730 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png index 7d426fae4d..6c9f0886c4 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:381c9e4601464b9962d32a9eadcb09cc9f492e6c02c4f5ad00bafec01a586945 -size 54549 +oid sha256:7732293593581afdc475d04611513b397dedd3d90d8e4f421bd8fa494dbdc05c +size 57107 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png index a29cd5182f..f3d0b5713f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd62e7d988bb03c1bb95bc176ebcc4250f897c132522e6089a2ecaba61d7e2fb -size 56311 +oid sha256:f3d72f6b56bbf584c764d8b7c9264296d2e376d4fa78b849e17a97b3587ccb4c +size 58951 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png index 9363195e81..ff6f97fd9a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:382a232059429b5595b98eef2c6a13f81db3ca3075545613417b066074b8a63e -size 55716 +oid sha256:e2fbf447d1a40417c856dd48c7262d4326f6537db9271f5796adc3bc0a0c2cbe +size 57516 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png index b41fa25a9c..ed62bc4bb3 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8337e1cfa93565514509a6b215184fde4ae1f5bee5c998374c78b1b876b4287 -size 52204 +oid sha256:4036f63f388553365b52c030cd66e1064bb47afac2284794590c10c8bee7b48b +size 54888 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png index 763e9b9e45..3387c0c69a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7c964f807d0a05454c2f7c7083a46adbd027e9b867a60e1d34f51b415147aaaf -size 52402 +oid sha256:7e882c35861c4856b58bd2729253896ab2451a40d76f36a05edb7fa223e77fe3 +size 54713 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png index 96d2f44103..5dab459583 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d1b6899db7a81309d4b8ff9e0e24a8be2f1e65641aeb269cf9ca51ce0dffcff5 -size 60144 +oid sha256:c527021fe0b5d92db91c8551599fccbae012196fc4006acf5873e4eb5cfbb5ed +size 61775 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png index 9cb4c23483..3d513091a9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fe4e7dd898e97e802ecfaeb5621cccef042e7ddd9312d3d0bc6cae5f021f323 -size 42096 +oid sha256:d8ee2bc4943fed6ae1d7d0a66261c6e1b92d02312d7635fea254104c0ebf5b5a +size 42948 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png index 621b68448e..7a1615e786 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Day-0_0_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2cbed623795b279dc0bbda23be859f13cae73dc2f9dbdd2f87c1b2b33e816f2d -size 41247 +oid sha256:57c4c864d6fd2e4d39b21187b6d3f64db339e7c191ff4bba17f35d1fa8744fc5 +size 42118 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png index 3c778daaa9..56b226da71 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_0,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5484225f7458e76564069904b9108b5178304ba5bd3cab2c3ecb57f70f83b517 -size 52906 +oid sha256:2bce95c37798213f515946bebe1880dc41079781f56b0f6d719b72d7d56ed1ed +size 55161 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png index 10b641bd33..dd07b80e85 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_1,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0437800ad7ee754d50c2747f5eb5b40571bd7d97627987d2018fba134eb72d5d -size 53563 +oid sha256:51f40086adfeae6ec8c3d168ced6fcf8543af2f8bacfb5e99f3a0b4ed22efafd +size 54097 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png index 41776266a3..2f6ce4ab90 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_10,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33214398530e90f8261c62961316063efd227bbd2558b3206607b744cc7cccca -size 54374 +oid sha256:51813755ea691aae411e8e92841f7e27414c86b3d265c3efb64eb975e0396f8c +size 56588 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png index d1f789fb51..c1788df8e6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f93b7f8fb59a1450ccb39fcb3d9c3c7bd056378b8a6615b919798329aba0428 -size 45637 +oid sha256:b4f827de075241e12bf3c4259d288e5f9fd78aa3c45c43985fa14dc481048ebb +size 47311 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png index 17a1dceaf4..a974fff1b6 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c32553ab8a536e0dbdd905e1d3b8dd01b981277c1a03d694a5a4af04d3458739 -size 52931 +oid sha256:3210235a7fbe33b3aed80f9de2e01a836a171c62991a87876b6446f446e86fa4 +size 55189 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png index f86bc3402c..c6c0934c78 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e3d624ca7754e16d0f85694d3f2ca53f056c229552f528dd0c5e8fbcdc9633c -size 54617 +oid sha256:0b79801ffa9827840749462a204bb7b22eea9a7816fad3a93a7b9cd436c29a61 +size 57186 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png index 980d7b5e7c..41371c2c1f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_4,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2decdee158a25f7e2da4a5721db975c8f9f3d9968643bb9cd36722154d911da2 -size 50862 +oid sha256:de1cb189fafc316ba001c9257d0435ef8dcd02fa03f4308a1dc03bfccdc2e613 +size 52455 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png index 405a163b82..3847c5b2f8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_5,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:27f3a4537c102e965a42cc1fce06a6f1bc8e34e3998802f10dc14de49129eef1 -size 50543 +oid sha256:0b22b124bc4f56a15cd39ccacd4252af7613fe07e71b989ce67eec02e0e535ec +size 52799 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png index d18de0e6e7..8c4734e118 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:acfa66e8b1d537154e8785c31b59954da0eed7c4d2e3ea8600272055e2fea80a -size 50607 +oid sha256:b1821cab0325f3bb59993fcc2f4c44333faa0161fdfd486202176f0d58e2b71c +size 52723 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png index 3bbeb32159..cdf3ed41a8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9d5c222ecff94f91854a9a3cf196337466d53c2009806d4629516a095fac1da5 -size 54859 +oid sha256:45eeb2ee2f8453cc094c3b999e702097189e070fc9f1dbbeb9e76f40bdad0ba3 +size 56463 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png index 89105aa64f..70f9e7890a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fce953883fe7fc1b481b0571e1f4e4eb407480126d8e1aeed0321d4bf191c29d -size 38856 +oid sha256:2280febc8e962f986c8539b8011e8ab524d9a62d2cabafcd7002ae0e86562ffd +size 39593 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png index 4785460a90..cf2e640d31 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl_MessagesView_null_MessagesView-Night-0_1_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cf290b962433c5ea42b869487955f569494a051fbd4c1761683f206f07c1a65d -size 38069 +oid sha256:0f78a9b97a4238bc1b24df9c32d8272ec15ef55ec0870e9c354d986a4e3401f4 +size 38805 From 8b02e43781d1fa82553f3b3220363bb801a345fd Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 11:35:00 +0100 Subject: [PATCH 066/161] empty commit From b7cf2989346f6d40fd05da433e02e82f9b25f0a0 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Thu, 4 Jan 2024 12:09:46 +0100 Subject: [PATCH 067/161] Upgrade to AGP 8.2.0 (#2142) * Upgrade to AGP 8.2.0 Add proguard rule for the problematic TagSoup library. For some reason, adding this in the consumer proguard rules of the RTE library doesn't seem to work. --------- Co-authored-by: ElementBot --- app/proguard-rules.pro | 3 +++ changelog.d/2142.misc | 1 + gradle/libs.versions.toml | 4 +--- ...iew_null_AddPeopleView-Day-0_1_null_0,NEXUS_5,1.0,en].png} | 0 ...iew_null_AddPeopleView-Day-0_1_null_1,NEXUS_5,1.0,en].png} | 0 ...iew_null_AddPeopleView-Day-0_1_null_2,NEXUS_5,1.0,en].png} | 0 ...w_null_AddPeopleView-Night-0_2_null_0,NEXUS_5,1.0,en].png} | 0 ...w_null_AddPeopleView-Night-0_2_null_1,NEXUS_5,1.0,en].png} | 0 ...w_null_AddPeopleView-Night-0_2_null_2,NEXUS_5,1.0,en].png} | 0 ...n_null_RoomPrivacyOption-Day-1_2_null,NEXUS_5,1.0,en].png} | 0 ...null_RoomPrivacyOption-Night-1_3_null,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_0,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_1,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_2,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_3,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_4,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_5,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_6,NEXUS_5,1.0,en].png} | 0 ...View_null_UserListView-Day-2_3_null_7,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_0,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_1,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_2,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_3,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_4,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_5,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_6,NEXUS_5,1.0,en].png} | 0 ...ew_null_UserListView-Night-2_4_null_7,NEXUS_5,1.0,en].png} | 0 ...null_ConfigureRoomView-Day-3_4_null_0,NEXUS_5,1.0,en].png} | 0 ...null_ConfigureRoomView-Day-3_4_null_1,NEXUS_5,1.0,en].png} | 0 ...ll_ConfigureRoomView-Night-3_5_null_0,NEXUS_5,1.0,en].png} | 0 ...ll_ConfigureRoomView-Night-3_5_null_1,NEXUS_5,1.0,en].png} | 0 ...ull_CreateRoomRootView-Day-4_5_null_0,NEXUS_5,1.0,en].png} | 0 ...ull_CreateRoomRootView-Day-4_5_null_1,NEXUS_5,1.0,en].png} | 0 ...ull_CreateRoomRootView-Day-4_5_null_2,NEXUS_5,1.0,en].png} | 0 ...l_CreateRoomRootView-Night-4_6_null_0,NEXUS_5,1.0,en].png} | 0 ...l_CreateRoomRootView-Night-4_6_null_1,NEXUS_5,1.0,en].png} | 0 ...l_CreateRoomRootView-Night-4_6_null_2,NEXUS_5,1.0,en].png} | 0 ...nView_null_MigrationView-Day-0_1_null,NEXUS_5,1.0,en].png} | 0 ...iew_null_MigrationView-Night-0_2_null,NEXUS_5,1.0,en].png} | 0 ...NotificationsOptInView-Day-1_2_null_0,NEXUS_5,1.0,en].png} | 0 ...tificationsOptInView-Night-1_3_null_0,NEXUS_5,1.0,en].png} | 0 ...omeView_null_WelcomeView-Day-2_3_null,NEXUS_5,1.0,en].png} | 0 ...eView_null_WelcomeView-Night-2_4_null,NEXUS_5,1.0,en].png} | 0 ..._null_SendLocationView-Day-0_1_null_0,NEXUS_5,1.0,en].png} | 0 ..._null_SendLocationView-Day-0_1_null_1,NEXUS_5,1.0,en].png} | 0 ..._null_SendLocationView-Day-0_1_null_2,NEXUS_5,1.0,en].png} | 0 ..._null_SendLocationView-Day-0_1_null_3,NEXUS_5,1.0,en].png} | 0 ..._null_SendLocationView-Day-0_1_null_4,NEXUS_5,1.0,en].png} | 0 ...ull_SendLocationView-Night-0_2_null_0,NEXUS_5,1.0,en].png} | 0 ...ull_SendLocationView-Night-0_2_null_1,NEXUS_5,1.0,en].png} | 0 ...ull_SendLocationView-Night-0_2_null_2,NEXUS_5,1.0,en].png} | 0 ...ull_SendLocationView-Night-0_2_null_3,NEXUS_5,1.0,en].png} | 0 ...ull_SendLocationView-Night-0_2_null_4,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_0,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_1,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_2,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_3,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_4,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_5,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_6,NEXUS_5,1.0,en].png} | 0 ..._null_ShowLocationView-Day-1_2_null_7,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_0,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_1,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_2,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_3,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_4,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_5,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_6,NEXUS_5,1.0,en].png} | 0 ...ull_ShowLocationView-Night-1_3_null_7,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_0,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_1,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_2,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_3,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_4,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_5,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_6,NEXUS_5,1.0,en].png} | 0 ...ew_null_CreatePollView-Day-0_1_null_7,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_0,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_1,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_2,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_3,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_4,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_5,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_6,NEXUS_5,1.0,en].png} | 0 ..._null_CreatePollView-Night-0_2_null_7,NEXUS_5,1.0,en].png} | 0 ...w_null_PollHistoryView-Day-1_2_null_0,NEXUS_5,1.0,en].png} | 0 ...w_null_PollHistoryView-Day-1_2_null_1,NEXUS_5,1.0,en].png} | 0 ...null_PollHistoryView-Night-1_3_null_0,NEXUS_5,1.0,en].png} | 0 ...null_PollHistoryView-Night-1_3_null_1,NEXUS_5,1.0,en].png} | 0 ...outView_null_AboutView-Day-0_1_null_0,NEXUS_5,1.0,en].png} | 0 ...tView_null_AboutView-Night-0_2_null_0,NEXUS_5,1.0,en].png} | 0 ...l_AdvancedSettingsView-Day-1_2_null_0,NEXUS_5,1.0,en].png} | 0 ...l_AdvancedSettingsView-Day-1_2_null_1,NEXUS_5,1.0,en].png} | 0 ...l_AdvancedSettingsView-Day-1_2_null_2,NEXUS_5,1.0,en].png} | 0 ...l_AdvancedSettingsView-Day-1_2_null_3,NEXUS_5,1.0,en].png} | 0 ...AdvancedSettingsView-Night-1_3_null_0,NEXUS_5,1.0,en].png} | 0 ...AdvancedSettingsView-Night-1_3_null_1,NEXUS_5,1.0,en].png} | 0 ...AdvancedSettingsView-Night-1_3_null_2,NEXUS_5,1.0,en].png} | 0 ...AdvancedSettingsView-Night-1_3_null_3,NEXUS_5,1.0,en].png} | 0 ..._AnalyticsSettingsView-Day-2_3_null_0,NEXUS_5,1.0,en].png} | 0 ...nalyticsSettingsView-Night-2_4_null_0,NEXUS_5,1.0,en].png} | 0 ...l_ConfigureTracingView-Day-4_5_null_0,NEXUS_5,1.0,en].png} | 0 ...ConfigureTracingView-Night-4_6_null_0,NEXUS_5,1.0,en].png} | 0 ..._DeveloperSettingsView-Day-3_4_null_0,NEXUS_5,1.0,en].png} | 0 ..._DeveloperSettingsView-Day-3_4_null_1,NEXUS_5,1.0,en].png} | 0 ..._DeveloperSettingsView-Day-3_4_null_2,NEXUS_5,1.0,en].png} | 0 ...eveloperSettingsView-Night-3_5_null_0,NEXUS_5,1.0,en].png} | 0 ...eveloperSettingsView-Night-3_5_null_1,NEXUS_5,1.0,en].png} | 0 ...eveloperSettingsView-Night-3_5_null_2,NEXUS_5,1.0,en].png} | 0 ...otificationSettingOption-Day-7_8_null,NEXUS_5,1.0,en].png} | 0 ...ificationSettingOption-Night-7_9_null,NEXUS_5,1.0,en].png} | 0 ...otificationSettingView-Day-8_9_null_0,NEXUS_5,1.0,en].png} | 0 ...otificationSettingView-Day-8_9_null_1,NEXUS_5,1.0,en].png} | 0 ...otificationSettingView-Day-8_9_null_2,NEXUS_5,1.0,en].png} | 0 ...otificationSettingView-Day-8_9_null_3,NEXUS_5,1.0,en].png} | 0 ...otificationSettingView-Day-8_9_null_4,NEXUS_5,1.0,en].png} | 0 ...ficationSettingView-Night-8_10_null_0,NEXUS_5,1.0,en].png} | 0 ...ficationSettingView-Night-8_10_null_1,NEXUS_5,1.0,en].png} | 0 ...ficationSettingView-Night-8_10_null_2,NEXUS_5,1.0,en].png} | 0 ...ficationSettingView-Night-8_10_null_3,NEXUS_5,1.0,en].png} | 0 ...ficationSettingView-Night-8_10_null_4,NEXUS_5,1.0,en].png} | 0 ...NotificationSettingsView-Day-6_7_null,NEXUS_5,1.0,en].png} | 0 ...tificationSettingsView-Night-6_8_null,NEXUS_5,1.0,en].png} | 0 ...tificationSettingsView-Day-5_6_null_0,NEXUS_5,1.0,en].png} | 0 ...tificationSettingsView-Day-5_6_null_1,NEXUS_5,1.0,en].png} | 0 ...tificationSettingsView-Day-5_6_null_2,NEXUS_5,1.0,en].png} | 0 ...ficationSettingsView-Night-5_7_null_0,NEXUS_5,1.0,en].png} | 0 ...ficationSettingsView-Night-5_7_null_1,NEXUS_5,1.0,en].png} | 0 ...ficationSettingsView-Night-5_7_null_2,NEXUS_5,1.0,en].png} | 0 ...l_PreferencesRootViewDark--1_1_null_0,NEXUS_5,1.0,en].png} | 0 ...l_PreferencesRootViewDark--1_1_null_1,NEXUS_5,1.0,en].png} | 0 ..._PreferencesRootViewLight--0_0_null_0,NEXUS_5,1.0,en].png} | 0 ..._PreferencesRootViewLight--0_0_null_1,NEXUS_5,1.0,en].png} | 0 ..._EditUserProfileView-Day-10_11_null_0,NEXUS_5,1.0,en].png} | 0 ...ditUserProfileView-Night-10_12_null_0,NEXUS_5,1.0,en].png} | 0 ..._null_UserPreferences-Day-9_10_null_0,NEXUS_5,1.0,en].png} | 0 ..._null_UserPreferences-Day-9_10_null_1,NEXUS_5,1.0,en].png} | 0 ..._null_UserPreferences-Day-9_10_null_2,NEXUS_5,1.0,en].png} | 0 ...ull_UserPreferences-Night-9_11_null_0,NEXUS_5,1.0,en].png} | 0 ...ull_UserPreferences-Night-9_11_null_1,NEXUS_5,1.0,en].png} | 0 ...ull_UserPreferences-Night-9_11_null_2,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_0,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_1,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_2,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_3,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_4,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_5,NEXUS_5,1.0,en].png} | 0 ...ll_RoomDetailsEditView-Day-0_1_null_6,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_0,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_1,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_2,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_3,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_4,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_5,NEXUS_5,1.0,en].png} | 0 ..._RoomDetailsEditView-Night-0_2_null_6,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_0,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_1,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_2,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_3,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_4,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_5,NEXUS_5,1.0,en].png} | 0 ...null_RoomInviteMembers-Day-1_2_null_6,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_0,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_1,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_2,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_3,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_4,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_5,NEXUS_5,1.0,en].png} | 0 ...ll_RoomInviteMembers-Night-1_3_null_6,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_0,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_1,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_2,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_3,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_4,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_5,NEXUS_5,1.0,en].png} | 0 ...RoomMemberDetailsViewDark--3_3_null_6,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_0,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_1,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_2,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_3,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_4,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_5,NEXUS_5,1.0,en].png} | 0 ...oomMemberDetailsViewLight--2_2_null_6,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_0,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_1,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_2,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_3,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_4,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_5,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_6,NEXUS_5,1.0,en].png} | 0 ...st_null_RoomMemberList-Day-2_3_null_7,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_0,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_1,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_2,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_3,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_4,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_5,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_6,NEXUS_5,1.0,en].png} | 0 ..._null_RoomMemberList-Night-2_4_null_7,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_0,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_1,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_2,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_3,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_4,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_5,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-4_5_null_6,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_0,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_1,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_2,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_3,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_4,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_5,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-4_6_null_6,NEXUS_5,1.0,en].png} | 0 ...n_null_RoomPrivacyOption-Day-3_4_null,NEXUS_5,1.0,en].png} | 0 ...null_RoomPrivacyOption-Night-3_5_null,NEXUS_5,1.0,en].png} | 0 ...omNotificationSettings-Day-5_6_null_0,NEXUS_5,1.0,en].png} | 0 ...NotificationSettings-Night-5_7_null_0,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_0,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_1,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_2,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_3,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_4,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_5,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_6,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_7,NEXUS_5,1.0,en].png} | 0 ...Dark_null_RoomDetailsDark--1_1_null_8,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_0,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_1,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_2,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_3,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_4,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_5,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_6,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_7,NEXUS_5,1.0,en].png} | 0 ...mDetails_null_RoomDetails--0_0_null_8,NEXUS_5,1.0,en].png} | 0 ...ConfirmRecoveryKeyBanner-Day-3_4_null,NEXUS_5,1.0,en].png} | 0 ...nfirmRecoveryKeyBanner-Night-3_5_null,NEXUS_5,1.0,en].png} | 0 ...mListTopBarWithIndicator-Day-6_7_null,NEXUS_5,1.0,en].png} | 0 ...istTopBarWithIndicator-Night-6_8_null,NEXUS_5,1.0,en].png} | 0 ...ll_DefaultRoomListTopBar-Day-5_6_null,NEXUS_5,1.0,en].png} | 0 ..._DefaultRoomListTopBar-Night-5_7_null,NEXUS_5,1.0,en].png} | 0 ...equestVerificationHeader-Day-4_5_null,NEXUS_5,1.0,en].png} | 0 ...uestVerificationHeader-Night-4_6_null,NEXUS_5,1.0,en].png} | 0 ...oomSummaryPlaceholderRow-Day-7_8_null,NEXUS_5,1.0,en].png} | 0 ...mSummaryPlaceholderRow-Night-7_9_null,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_0,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_1,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_2,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_3,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_4,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_5,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_6,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_7,NEXUS_5,1.0,en].png} | 0 ...ow_null_RoomSummaryRow-Day-8_9_null_8,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_0,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_1,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_2,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_3,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_4,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_5,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_6,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_7,NEXUS_5,1.0,en].png} | 0 ...null_RoomSummaryRow-Night-8_10_null_8,NEXUS_5,1.0,en].png} | 0 ...ListSearchResultContent-Day-9_10_null,NEXUS_5,1.0,en].png} | 0 ...stSearchResultContent-Night-9_11_null,NEXUS_5,1.0,en].png} | 0 ..._InvitesEntryPointView-Day-0_1_null_0,NEXUS_5,1.0,en].png} | 0 ..._InvitesEntryPointView-Day-0_1_null_1,NEXUS_5,1.0,en].png} | 0 ...nvitesEntryPointView-Night-0_2_null_0,NEXUS_5,1.0,en].png} | 0 ...nvitesEntryPointView-Night-0_2_null_1,NEXUS_5,1.0,en].png} | 0 ...tModalBottomSheetContent-Day-1_2_null,NEXUS_5,1.0,en].png} | 0 ...odalBottomSheetContent-Night-1_3_null,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_0,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_1,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_2,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_3,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_4,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_5,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_6,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_7,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_8,NEXUS_5,1.0,en].png} | 0 ...View_null_RoomListView-Day-2_3_null_9,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_0,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_1,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_2,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_3,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_4,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_5,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_6,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_7,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_8,NEXUS_5,1.0,en].png} | 0 ...ew_null_RoomListView-Night-2_4_null_9,NEXUS_5,1.0,en].png} | 0 291 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 changelog.d/2142.misc rename 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 => ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Day-0_1_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.addpeople_AddPeopleView_null_AddPeopleView-Night-0_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Day-1_2_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_RoomPrivacyOption_null_RoomPrivacyOption-Night-1_3_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Day-3_4_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_5_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.configureroom_ConfigureRoomView_null_ConfigureRoomView-Night-3_5_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Day-4_5_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.createroom.impl.root_CreateRoomRootView_null_CreateRoomRootView-Night-4_6_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Day-0_1_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.ftue.impl.migration_MigrationView_null_MigrationView-Night-0_2_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Day-1_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.ftue.impl.notifications_NotificationsOptInView_null_NotificationsOptInView-Night-1_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Day-2_3_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.ftue.impl.welcome_WelcomeView_null_WelcomeView-Night-2_4_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Day-0_1_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.send_SendLocationView_null_SendLocationView-Night-0_2_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Day-1_2_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.location.impl.show_ShowLocationView_null_ShowLocationView-Night-1_3_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Day-0_1_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.create_CreatePollView_null_CreatePollView-Night-0_2_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Day-1_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.poll.impl.history_PollHistoryView_null_PollHistoryView-Night-1_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Day-0_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.about_AboutView_null_AboutView-Night-0_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Day-1_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.advanced_AdvancedSettingsView_null_AdvancedSettingsView-Night-1_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Day-2_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.analytics_AnalyticsSettingsView_null_AnalyticsSettingsView-Night-2_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Day-4_5_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer.tracing_ConfigureTracingView_null_ConfigureTracingView-Night-4_6_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Day-3_4_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.developer_DeveloperSettingsView_null_DeveloperSettingsView-Night-3_5_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Day-7_8_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_DefaultNotificationSettingOption_null_DefaultNotificationSettingOption-Night-7_9_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Day-8_9_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications.edit_EditDefaultNotificationSettingView_null_EditDefaultNotificationSettingView-Night-8_10_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Day-6_7_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_InvalidNotificationSettingsView_null_InvalidNotificationSettingsView-Night-6_8_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Day-5_6_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.notifications_NotificationSettingsView_null_NotificationSettingsView-Night-5_7_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.root_PreferencesRootViewDark_null_PreferencesRootViewDark--1_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_0_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.root_PreferencesRootViewLight_null_PreferencesRootViewLight--0_0_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Day-10_11_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user.editprofile_EditUserProfileView_null_EditUserProfileView-Night-10_12_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Day-9_10_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.preferences.impl.user_UserPreferences_null_UserPreferences-Night-9_11_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Day-0_1_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.edit_RoomDetailsEditView_null_RoomDetailsEditView-Night-0_2_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewDark_null_RoomMemberDetailsViewDark--3_3_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members.details_RoomMemberDetailsViewLight_null_RoomMemberDetailsViewLight--2_2_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Day-2_3_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.members_RoomMemberList_null_RoomMemberList-Night-2_4_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Day-4_5_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomNotificationSettings_null_RoomNotificationSettings-Night-4_6_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Day-3_4_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_RoomPrivacyOption_null_RoomPrivacyOption-Night-3_5_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Day-5_6_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl.notificationsettings_UserDefinedRoomNotificationSettings_null_UserDefinedRoomNotificationSettings-Night-5_7_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetailsDark_null_RoomDetailsDark--1_1_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomdetails.impl_RoomDetails_null_RoomDetails--0_0_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-3_4_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_5_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-6_7_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_8_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-5_6_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_7_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Day-4_5_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_6_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-7_8_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-7_9_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-8_9_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Day-9_10_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Night-9_11_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_1_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Day-0_1_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_2_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_InvitesEntryPointView_null_InvitesEntryPointView-Night-0_2_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Day-1_2_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContent_null_RoomListModalBottomSheetContent-Night-1_3_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-2_3_null_9,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_null_9,NEXUS_5,1.0,en].png} (100%) 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/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/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6d52dfc75f..35744f803d 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.0" kotlin = "1.9.21" ksp = "1.9.21-1.0.16" firebaseAppDistribution = "4.0.1" 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.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 From bd779627ad2aec88afaf4179b34c7797edaa6439 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 4 Jan 2024 11:11:03 +0000 Subject: [PATCH 068/161] Update android.gradle.plugin to v8.2.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 35744f803d..a145e4dd96 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -3,7 +3,7 @@ [versions] # Project -android_gradle_plugin = "8.2.0" +android_gradle_plugin = "8.2.1" kotlin = "1.9.21" ksp = "1.9.21-1.0.16" firebaseAppDistribution = "4.0.1" From 42d0bf033993540f310a562116e2f7fab7a86aad Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 13:04:56 +0100 Subject: [PATCH 069/161] Disable forwarding for stickers (until it can be properly fixed) Signed-off-by: Marco Antonio Alvarez --- .../features/messages/impl/actionlist/ActionListPresenter.kt | 4 +++- .../features/messages/impl/timeline/model/TimelineItem.kt | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) 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..b4e9bdb88f 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,9 @@ class ActionListPresenter @Inject constructor( add(TimelineItemAction.Reply) } } - add(TimelineItemAction.Forward) + 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/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 } From fb743a98a352fa553d701fbc8ea7bb93f1560cdb Mon Sep 17 00:00:00 2001 From: Marco Antonio Alvarez Date: Thu, 4 Jan 2024 13:57:16 +0100 Subject: [PATCH 070/161] add comment about sticker forwarding being disabled Signed-off-by: Marco Antonio Alvarez --- .../features/messages/impl/actionlist/ActionListPresenter.kt | 2 ++ 1 file changed, 2 insertions(+) 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 b4e9bdb88f..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,6 +152,8 @@ class ActionListPresenter @Inject constructor( add(TimelineItemAction.Reply) } } + // 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) } From 1e2fc6ad2727d9fdbc59ceaa34585c982576f81e Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Thu, 4 Jan 2024 15:22:09 +0100 Subject: [PATCH 071/161] Remove 'document' case for message with timestamp preview (#2164) * Remove 'document' case for message with timestamp preview --------- Co-authored-by: ElementBot --- changelog.d/2127.misc | 1 + .../TimelineItemEventRowTimestampPreview.kt | 20 ++++++++----------- ...stamp-Day-18_18_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...stamp-Day-18_18_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...stamp-Day-18_18_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...stamp-Day-18_18_null_3,NEXUS_5,1.0,en].png | 4 ++-- ...amp-Night-18_19_null_0,NEXUS_5,1.0,en].png | 4 ++-- ...amp-Night-18_19_null_1,NEXUS_5,1.0,en].png | 4 ++-- ...amp-Night-18_19_null_2,NEXUS_5,1.0,en].png | 4 ++-- ...amp-Night-18_19_null_3,NEXUS_5,1.0,en].png | 4 ++-- 10 files changed, 25 insertions(+), 28 deletions(-) create mode 100644 changelog.d/2127.misc 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/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/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 From da23628c8a6f05ee10bb56a829ef7ebc883ea377 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 15:51:12 +0100 Subject: [PATCH 072/161] Introduce AsyncAction with a Confirmation state and use it for logout action. --- .../logout/api/direct/DirectLogoutState.kt | 5 +- .../features/logout/impl/LogoutPresenter.kt | 17 +- .../features/logout/impl/LogoutState.kt | 5 +- .../logout/impl/LogoutStateProvider.kt | 12 +- .../features/logout/impl/LogoutView.kt | 22 +-- .../direct/DefaultDirectLogoutPresenter.kt | 18 +- .../impl/direct/DefaultDirectLogoutView.kt | 16 +- .../logout/impl/ui/LogoutActionDialog.kt | 22 ++- .../logout/impl/LogoutPresenterTest.kt | 46 ++--- .../DefaultDirectLogoutPresenterTest.kt | 47 ++--- .../impl/root/PreferencesRootStateProvider.kt | 5 +- .../libraries/architecture/AsyncAction.kt | 162 ++++++++++++++++++ 12 files changed, 246 insertions(+), 131 deletions(-) create mode 100644 libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/AsyncAction.kt 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..e6a372397c 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 @@ -26,6 +26,7 @@ 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.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 @@ -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,7 +106,6 @@ class LogoutPresenter @Inject constructor( doesBackupExistOnServer = doesBackupExistOnServerAction.value.dataOrNull().orTrue(), recoveryState = recoveryState, backupUploadState = backupUploadState, - showConfirmationDialog = showLogoutDialog, logoutAction = logoutAction.value, eventSink = ::handleEvents ) @@ -121,7 +118,7 @@ class LogoutPresenter @Inject constructor( } 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..89db94cf1d 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 @@ -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.featureflag.api.FeatureFlags import io.element.android.libraries.featureflag.test.FakeFeatureFlagService import io.element.android.libraries.matrix.api.MatrixClient @@ -56,8 +56,7 @@ class LogoutPresenterTest { 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) @@ -123,10 +120,10 @@ class LogoutPresenterTest { val initialState = awaitLastSequentialItem() 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) } } @@ -139,14 +136,12 @@ class LogoutPresenterTest { val initialState = awaitLastSequentialItem() 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) } } @@ -165,18 +160,16 @@ class LogoutPresenterTest { val initialState = awaitItem() 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) skipItems(1) 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) } } @@ -195,21 +188,18 @@ class LogoutPresenterTest { val initialState = awaitItem() 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) skipItems(1) 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) } } 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..b2cef2f28d 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 @@ -21,8 +21,7 @@ import app.cash.molecule.moleculeFlow 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 @@ -51,8 +50,7 @@ class DefaultDirectLogoutPresenterTest { }.test { val initialState = awaitLastSequentialItem() 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) } } @@ -105,10 +101,10 @@ class DefaultDirectLogoutPresenterTest { val initialState = awaitLastSequentialItem() 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) } } @@ -121,14 +117,12 @@ class DefaultDirectLogoutPresenterTest { val initialState = awaitLastSequentialItem() 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) } } @@ -147,17 +141,15 @@ class DefaultDirectLogoutPresenterTest { val initialState = awaitItem() 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) } } @@ -176,20 +168,17 @@ class DefaultDirectLogoutPresenterTest { val initialState = awaitItem() 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) } } 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/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) + } + ) +} From 0e4cb679e16247c9dada30efd76b5d8cb2509ee1 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 16:07:56 +0100 Subject: [PATCH 073/161] Fix test compilation --- .../preferences/impl/root/PreferencesRootPresenterTest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 = {}, ) From bd91dd64e21922dd337e502fca59e9d87e906836 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 16:30:56 +0100 Subject: [PATCH 074/161] Rename Async to AsyncData --- .../features/call/ui/CallScreenPresenter.kt | 6 +-- .../features/call/ui/CallScreenState.kt | 4 +- .../features/call/ui/CallScreenView.kt | 8 ++-- .../call/ui/CallScreenPresenterTest.kt | 6 +-- .../features/createroom/api/StartDMAction.kt | 4 +- .../createroom/impl/DefaultStartDMAction.kt | 10 ++--- .../configureroom/ConfigureRoomPresenter.kt | 10 ++--- .../impl/configureroom/ConfigureRoomState.kt | 4 +- .../ConfigureRoomStateProvider.kt | 4 +- .../impl/root/CreateRoomRootPresenter.kt | 6 +-- .../impl/root/CreateRoomRootState.kt | 4 +- .../impl/root/CreateRoomRootStateProvider.kt | 8 ++-- .../impl/DefaultStartDMActionTests.kt | 14 +++--- .../ConfigureRoomPresenterTests.kt | 32 +++++++------- .../impl/root/CreateRoomRootPresenterTests.kt | 14 +++--- .../createroom/test/FakeStartDMAction.kt | 10 ++--- .../invitelist/impl/InviteListPresenter.kt | 18 ++++---- .../invitelist/impl/InviteListState.kt | 6 +-- .../impl/InviteListStateProvider.kt | 10 ++--- .../invitelist/impl/InviteListView.kt | 8 ++-- .../impl/InviteListPresenterTests.kt | 12 ++--- .../impl/unlock/PinUnlockPresenter.kt | 32 +++++++------- .../lockscreen/impl/unlock/PinUnlockState.kt | 10 ++--- .../impl/unlock/PinUnlockStateProvider.kt | 10 ++--- .../lockscreen/impl/unlock/PinUnlockView.kt | 6 +-- .../impl/unlock/PinUnlockPresenterTest.kt | 18 ++++---- .../changeserver/ChangeServerPresenter.kt | 10 ++--- .../impl/changeserver/ChangeServerState.kt | 4 +- .../changeserver/ChangeServerStateProvider.kt | 4 +- .../impl/changeserver/ChangeServerView.kt | 10 ++--- .../login/impl/oidc/webview/OidcPresenter.kt | 18 ++++---- .../login/impl/oidc/webview/OidcState.kt | 4 +- .../impl/oidc/webview/OidcStateProvider.kt | 6 +-- .../ConfirmAccountProviderPresenter.kt | 20 ++++----- .../ConfirmAccountProviderState.kt | 6 +-- .../ConfirmAccountProviderStateProvider.kt | 4 +- .../ConfirmAccountProviderView.kt | 12 ++--- .../loginpassword/LoginPasswordPresenter.kt | 16 +++---- .../loginpassword/LoginPasswordState.kt | 6 +-- .../LoginPasswordStateProvider.kt | 8 ++-- .../loginpassword/LoginPasswordView.kt | 8 ++-- .../SearchAccountProviderPresenter.kt | 18 ++++---- .../SearchAccountProviderState.kt | 4 +- .../SearchAccountProviderStateProvider.kt | 6 +-- .../SearchAccountProviderView.kt | 10 ++--- .../waitlistscreen/WaitListPresenter.kt | 16 +++---- .../screens/waitlistscreen/WaitListState.kt | 4 +- .../waitlistscreen/WaitListStateProvider.kt | 14 +++--- .../screens/waitlistscreen/WaitListView.kt | 10 ++--- .../changeserver/ChangeServerPresenterTest.kt | 18 ++++---- .../impl/oidc/webview/OidcPresenterTest.kt | 24 +++++----- .../ConfirmAccountProviderPresenterTest.kt | 44 +++++++++---------- .../LoginPasswordPresenterTest.kt | 18 ++++---- .../SearchAccountProviderPresenterTest.kt | 28 ++++++------ .../waitlistscreen/WaitListPresenterTest.kt | 14 +++--- .../features/logout/impl/LogoutPresenter.kt | 8 ++-- .../messages/impl/MessagesPresenter.kt | 20 ++++----- .../features/messages/impl/MessagesState.kt | 8 ++-- .../messages/impl/MessagesStateProvider.kt | 12 ++--- .../impl/forward/ForwardMessagesPresenter.kt | 16 +++---- .../impl/report/ReportMessagePresenter.kt | 8 ++-- .../impl/report/ReportMessageState.kt | 4 +- .../impl/report/ReportMessageStateProvider.kt | 10 ++--- .../messages/impl/report/ReportMessageView.kt | 4 +- .../timeline/VoiceMessagePresenter.kt | 8 ++-- .../messages/impl/MessagesPresenterTest.kt | 8 ++-- .../report/ReportMessagePresenterTests.kt | 18 ++++---- .../developer/DeveloperSettingsPresenter.kt | 10 ++--- .../impl/developer/DeveloperSettingsState.kt | 6 +-- .../DeveloperSettingsStateProvider.kt | 8 ++-- .../NotificationSettingsPresenter.kt | 12 ++--- .../NotificationSettingsState.kt | 4 +- .../NotificationSettingsStateProvider.kt | 8 ++-- ...EditDefaultNotificationSettingPresenter.kt | 8 ++-- .../EditDefaultNotificationSettingState.kt | 4 +- ...DefaultNotificationSettingStateProvider.kt | 8 ++-- .../editprofile/EditUserProfilePresenter.kt | 10 ++--- .../user/editprofile/EditUserProfileState.kt | 4 +- .../EditUserProfileStateProvider.kt | 4 +- .../DeveloperSettingsPresenterTest.kt | 10 ++--- .../EditUserProfilePresenterTest.kt | 14 +++--- .../impl/bugreport/BugReportPresenter.kt | 18 ++++---- .../impl/bugreport/BugReportState.kt | 6 +-- .../impl/bugreport/BugReportStateProvider.kt | 8 ++-- .../rageshake/impl/bugreport/BugReportView.kt | 4 +- .../impl/bugreport/BugReportPresenterTest.kt | 18 ++++---- .../impl/blockuser/BlockUserSection.kt | 12 ++--- .../impl/edit/RoomDetailsEditPresenter.kt | 8 ++-- .../impl/edit/RoomDetailsEditState.kt | 4 +- .../impl/edit/RoomDetailsEditStateProvider.kt | 8 ++-- .../impl/invite/RoomInviteMembersPresenter.kt | 8 ++-- .../impl/members/RoomMemberListPresenter.kt | 6 +-- .../impl/members/RoomMemberListState.kt | 4 +- .../members/RoomMemberListStateProvider.kt | 8 ++-- .../impl/members/RoomMemberListView.kt | 4 +- .../members/details/RoomMemberDetailsNode.kt | 4 +- .../details/RoomMemberDetailsPresenter.kt | 30 ++++++------- .../members/details/RoomMemberDetailsState.kt | 6 +-- .../details/RoomMemberDetailsStateProvider.kt | 12 ++--- .../RoomNotificationSettingsPresenter.kt | 22 +++++----- .../RoomNotificationSettingsState.kt | 8 ++-- .../RoomNotificationSettingsStateProvider.kt | 16 +++---- ...edRoomNotificationSettingsStateProvider.kt | 8 ++-- .../edit/RoomDetailsEditPresenterTest.kt | 14 +++--- .../members/RoomMemberListPresenterTests.kt | 10 ++--- .../RoomMemberDetailsPresenterTests.kt | 18 ++++---- .../disable/SecureBackupDisablePresenter.kt | 8 ++-- .../impl/disable/SecureBackupDisableState.kt | 4 +- .../SecureBackupDisableStateProvider.kt | 8 ++-- .../impl/disable/SecureBackupDisableView.kt | 6 +-- .../enable/SecureBackupEnablePresenter.kt | 8 ++-- .../impl/enable/SecureBackupEnableState.kt | 4 +- .../enable/SecureBackupEnableStateProvider.kt | 8 ++-- .../impl/enable/SecureBackupEnableView.kt | 6 +-- .../SecureBackupEnterRecoveryKeyPresenter.kt | 8 ++-- .../SecureBackupEnterRecoveryKeyState.kt | 4 +- ...cureBackupEnterRecoveryKeyStateProvider.kt | 8 ++-- .../impl/root/SecureBackupRootPresenter.kt | 6 +-- .../impl/root/SecureBackupRootState.kt | 4 +- .../root/SecureBackupRootStateProvider.kt | 12 ++--- .../impl/root/SecureBackupRootView.kt | 10 ++--- .../SecureBackupDisablePresenterTest.kt | 14 +++--- .../enable/SecureBackupEnablePresenterTest.kt | 14 +++--- ...cureBackupEnterRecoveryKeyPresenterTest.kt | 14 +++--- .../root/SecureBackupRootPresenterTest.kt | 10 ++--- .../impl/VerifySelfSessionPresenter.kt | 6 +-- .../impl/VerifySelfSessionState.kt | 4 +- .../impl/VerifySelfSessionStateProvider.kt | 8 ++-- .../impl/VerifySelfSessionView.kt | 4 +- .../impl/VerifySelfSessionPresenterTests.kt | 6 +-- .../architecture/{Async.kt => AsyncData.kt} | 26 +++++------ .../{AsyncKtTest.kt => AsyncDataKtTest.kt} | 26 +++++------ .../components/async/AsyncProvider.kt | 14 +++--- .../components/async/AsyncView.kt | 16 +++---- .../api/viewer/MediaViewerPresenter.kt | 28 ++++++------ .../api/viewer/MediaViewerState.kt | 4 +- .../api/viewer/MediaViewerStateProvider.kt | 24 +++++----- .../mediaviewer/api/viewer/MediaViewerView.kt | 8 ++-- .../mediaviewer/MediaViewerPresenterTest.kt | 24 +++++----- 139 files changed, 745 insertions(+), 745 deletions(-) rename libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/{Async.kt => AsyncData.kt} (88%) rename libraries/architecture/src/test/kotlin/io/element/android/libraries/architecture/{AsyncKtTest.kt => AsyncDataKtTest.kt} (74%) 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..4e20cea5d1 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.AsyncData 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..f129071824 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.AsyncData 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 = AsyncData.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 = AsyncData.Success(result.roomId) } is StartDMResult.Failure -> { - actionState.value = Async.Failure(result.throwable) + actionState.value = AsyncData.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..46f6113780 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.AsyncData 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(AsyncData.Uninitialized) } fun createRoom(config: CreateRoomConfig) { - createRoomAction.value = Async.Uninitialized + createRoomAction.value = AsyncData.Uninitialized localCoroutineScope.createRoom(config, createRoomAction) } @@ -118,7 +118,7 @@ class ConfigureRoomPresenter @Inject constructor( } } - ConfigureRoomEvents.CancelCreateRoom -> createRoomAction.value = Async.Uninitialized + ConfigureRoomEvents.CancelCreateRoom -> createRoomAction.value = AsyncData.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..7b932db9b6 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 @@ -18,7 +18,7 @@ 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.AsyncData import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.permissions.api.PermissionsState import kotlinx.collections.immutable.ImmutableList @@ -26,7 +26,7 @@ import kotlinx.collections.immutable.ImmutableList data class ConfigureRoomState( val config: CreateRoomConfig, val avatarActions: ImmutableList, - val createRoomAction: Async, + val createRoomAction: AsyncData, 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..f5a665f25e 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.AsyncData 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(AsyncData.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 = AsyncData.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..ad583e2cbf 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.AsyncData import io.element.android.libraries.matrix.api.core.RoomId data class CreateRoomRootState( val applicationName: String, val userListState: UserListState, - val startDmAction: Async, + val startDmAction: AsyncData, 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..ceef8daa73 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 @@ -19,7 +19,7 @@ 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.Async +import io.element.android.libraries.architecture.AsyncData 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>(AsyncData.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(Async.Success(A_ROOM_ID)) + assertThat(state.value).isEqualTo(AsyncData.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>(AsyncData.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(Async.Success(A_ROOM_ID)) + assertThat(state.value).isEqualTo(AsyncData.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>(AsyncData.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(state.value).isEqualTo(AsyncData.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..e0be429790 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.AsyncData 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(AsyncData.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(Async.Success::class.java) + assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(Async.Failure::class.java) + assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Uninitialized::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.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(AsyncData.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(AsyncData.Failure::class.java) + assertThat((stateAfterCreateRoom.createRoomAction as? AsyncData.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(AsyncData.Uninitialized::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Failure::class.java) + assertThat((stateAfterRetry.createRoomAction as? AsyncData.Failure)?.error).isEqualTo(createRoomResult.exceptionOrNull()) // Cancel stateAfterRetry.eventSink(ConfigureRoomEvents.CancelCreateRoom) - assertThat(awaitItem().createRoomAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.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..4446f1f3a9 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,7 +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.architecture.AsyncData import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.user.MatrixUser @@ -52,20 +52,20 @@ class CreateRoomRootPresenterTests { }.test { val initialState = awaitItem() - assertThat(initialState.startDmAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(initialState.startDmAction).isInstanceOf(AsyncData.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 = AsyncData.Success(A_ROOM_ID) + val startDMFailureResult = AsyncData.Failure(A_THROWABLE) // Failure startDMAction.givenExecuteResult(startDMFailureResult) initialState.eventSink(CreateRoomRootEvents.StartDM(matrixUser)) - assertThat(awaitItem().startDmAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmAction).isInstanceOf(AsyncData.Loading::class.java) awaitItem().also { state -> assertThat(state.startDmAction).isEqualTo(startDMFailureResult) state.eventSink(CreateRoomRootEvents.CancelStartDM) @@ -74,10 +74,10 @@ class CreateRoomRootPresenterTests { // Success startDMAction.givenExecuteResult(startDMSuccessResult) awaitItem().also { state -> - assertThat(state.startDmAction).isEqualTo(Async.Uninitialized) + assertThat(state.startDmAction).isEqualTo(AsyncData.Uninitialized) state.eventSink(CreateRoomRootEvents.StartDM(matrixUser)) } - assertThat(awaitItem().startDmAction).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmAction).isInstanceOf(AsyncData.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..f3e17ee79a 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.AsyncData 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: AsyncData = AsyncData.Success(A_ROOM_ID) - fun givenExecuteResult(result: Async) { + fun givenExecuteResult(result: AsyncData) { executeResult = result } - override suspend fun execute(userId: UserId, actionState: MutableState>) { - actionState.value = Async.Loading() + override suspend fun execute(userId: UserId, actionState: MutableState>) { + actionState.value = AsyncData.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..74a5f58494 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.AsyncData 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: AsyncData by remember { + mutableStateOf(AsyncData.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() fun handleCancel() { - requestState = Async.Loading() + requestState = AsyncData.Loading() localCoroutineScope.launch { authenticationService.cancelOidcLogin() .fold( onSuccess = { // Then go back - requestState = Async.Success(Unit) + requestState = AsyncData.Success(Unit) }, onFailure = { - requestState = Async.Failure(it) + requestState = AsyncData.Failure(it) } ) } } fun handleSuccess(url: String) { - requestState = Async.Loading() + requestState = AsyncData.Loading() localCoroutineScope.launch { authenticationService.loginWithOidc(url) .onFailure { - requestState = Async.Failure(it) + requestState = AsyncData.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 = AsyncData.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..2571f01f0c 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.AsyncData import io.element.android.libraries.matrix.api.auth.OidcDetails data class OidcState( val oidcDetails: OidcDetails, - val requestState: Async, + val requestState: AsyncData, 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..f0b9dac200 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.AsyncData 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 = AsyncData.Loading()), ) } fun aOidcState() = OidcState( oidcDetails = aOidcDetails(), - requestState = Async.Uninitialized, + requestState = AsyncData.Uninitialized, eventSink = {} ) 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..2627bc384d 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.AsyncData 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(AsyncData.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(AsyncData.Loading()) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Success(Unit)) + assertThat(finalState.requestState).isEqualTo(AsyncData.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(AsyncData.Loading()) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(finalState.requestState).isEqualTo(AsyncData.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(AsyncData.Loading()) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Success(Unit)) + assertThat(finalState.requestState).isEqualTo(AsyncData.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(AsyncData.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(AsyncData.Loading()) val errorState = awaitItem() - assertThat(errorState.requestState).isEqualTo(Async.Failure(A_THROWABLE)) + assertThat(errorState.requestState).isEqualTo(AsyncData.Failure(A_THROWABLE)) errorState.eventSink.invoke(OidcEvents.ClearError) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(Async.Uninitialized) + assertThat(finalState.requestState).isEqualTo(AsyncData.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/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 e6a372397c..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,7 @@ 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 @@ -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) { @@ -111,7 +111,7 @@ class LogoutPresenter @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/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/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..902c82aa0c 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.AsyncData 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(AsyncData.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 = AsyncData.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..f1255c18a0 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.AsyncData data class ReportMessageState( val reason: String, val blockUser: Boolean, - val result: Async, + val result: AsyncData, 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..a5847cef4a 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.AsyncData open class ReportMessageStateProvider : PreviewParameterProvider { override val values: Sequence @@ -25,9 +25,9 @@ open class ReportMessageStateProvider : PreviewParameterProvider = Async.Uninitialized, + result: AsyncData = AsyncData.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..d393619c72 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,7 +41,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.messages.impl.R -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.async.AsyncView import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview @@ -62,7 +62,7 @@ fun ReportMessageView( modifier: Modifier = Modifier, ) { val focusManager = LocalFocusManager.current - val isSending = state.result is Async.Loading + val isSending = state.result is AsyncData.Loading AsyncView( async = state.result, showProgressDialog = false, 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..9bc85a241e 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.AsyncData 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(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) val resultState = awaitItem() - assertThat(resultState.result).isInstanceOf(Async.Failure::class.java) + assertThat(resultState.result).isInstanceOf(AsyncData.Failure::class.java) assertThat(room.reportedContentCount).isEqualTo(1) resultState.eventSink(ReportMessageEvents.ClearError) - assertThat(awaitItem().result).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncData.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(AsyncData.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 = AsyncData.Uninitialized } } @@ -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..cf5f40aecc 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,14 +17,14 @@ 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.AsyncData import io.element.android.libraries.matrix.api.room.RoomNotificationMode @Immutable data class NotificationSettingsState( val matrixSettings: MatrixSettings, val appSettings: AppSettings, - val changeNotificationSettingAction: Async, + val changeNotificationSettingAction: AsyncData, val eventSink: (NotificationSettingsEvents) -> Unit, ) { sealed interface MatrixSettings { 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..a1d0e3cb0d 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.AsyncData 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 = AsyncData.Loading(Unit)), + aNotificationSettingsState(changeNotificationSettingAction = AsyncData.Failure(Throwable("error"))), ) } fun aNotificationSettingsState( - changeNotificationSettingAction: Async = Async.Uninitialized, + changeNotificationSettingAction: AsyncData = AsyncData.Uninitialized, ) = NotificationSettingsState( matrixSettings = NotificationSettingsState.MatrixSettings.Valid( atRoomNotificationsEnabled = true, 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..3f1edbfe28 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.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.MatrixClient @@ -63,7 +63,7 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( mutableStateOf(null) } - val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(Async.Uninitialized) } + val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } val roomsWithUserDefinedMode: MutableState> = remember { mutableStateOf(listOf()) @@ -82,7 +82,7 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( is EditDefaultNotificationSettingStateEvents.SetNotificationMode -> { localCoroutineScope.setDefaultNotificationMode(event.mode, changeNotificationSettingAction) } - EditDefaultNotificationSettingStateEvents.ClearError -> changeNotificationSettingAction.value = Async.Uninitialized + EditDefaultNotificationSettingStateEvents.ClearError -> changeNotificationSettingAction.value = AsyncData.Uninitialized } } @@ -137,7 +137,7 @@ class EditDefaultNotificationSettingPresenter @AssistedInject constructor( 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() 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..60d881fa1c 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.AsyncData 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: AsyncData, 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..f049a69669 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,7 +17,7 @@ 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.AsyncData 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 @@ -29,15 +29,15 @@ open class EditDefaultNotificationSettingStateProvider: PreviewParameterProvider get() = sequenceOf( anEditDefaultNotificationSettingsState(), anEditDefaultNotificationSettingsState(isOneToOne = true), - anEditDefaultNotificationSettingsState(changeNotificationSettingAction = Async.Loading(Unit)), - anEditDefaultNotificationSettingsState(changeNotificationSettingAction = Async.Failure(Throwable("error"))), + anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncData.Loading(Unit)), + anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncData.Failure(Throwable("error"))), anEditDefaultNotificationSettingsState(displayMentionsOnlyDisclaimer = true), ) } private fun anEditDefaultNotificationSettingsState( isOneToOne: Boolean = false, - changeNotificationSettingAction: Async = Async.Uninitialized, + changeNotificationSettingAction: AsyncData = AsyncData.Uninitialized, displayMentionsOnlyDisclaimer: Boolean = false, ) = EditDefaultNotificationSettingState( isOneToOne = isOneToOne, 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..60498d7141 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.AsyncData 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(AsyncData.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 = AsyncData.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 AsyncData.Loading, saveAction = saveAction.value, cameraPermissionState = cameraPermissionState, eventSink = { handleEvents(it) }, @@ -140,7 +140,7 @@ 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..600c16858b 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.AsyncData 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: AsyncData, 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..f970e2c60d 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.AsyncData 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 = AsyncData.Uninitialized, saveButtonEnabled = true, cameraPermissionState = aPermissionsState(showDialog = false), eventSink = {} 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/user/editprofile/EditUserProfilePresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenterTest.kt index 3e32ed675f..37e95378ba 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.AsyncData 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(AsyncData.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(AsyncData.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(AsyncData.Failure::class.java) initialState.eventSink(EditUserProfileEvents.CancelSaveChanges) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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..eac789af3e 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.AsyncData 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 = AsyncData.Uninitialized } override fun onUploadFailed(reason: String?) { sendingProgress.floatValue = 0f - sendingAction.value = Async.Failure(Exception(reason)) + sendingAction.value = AsyncData.Failure(Exception(reason)) } override fun onProgress(progress: Int) { sendingProgress.floatValue = progress.toFloat() / 100 - sendingAction.value = Async.Loading() + sendingAction.value = AsyncData.Loading() } override fun onUploadSucceed() { sendingProgress.floatValue = 0f - sendingAction.value = Async.Success(Unit) + sendingAction.value = AsyncData.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(AsyncData.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 = AsyncData.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..1401369cc2 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.AsyncData 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: AsyncData, val eventSink: (BugReportEvents) -> Unit ) { val submitEnabled = - formState.description.length > 10 && sending !is Async.Loading + formState.description.length > 10 && sending !is AsyncData.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..e670562637 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.AsyncData 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 = AsyncData.Loading()), + aBugReportState().copy(sending = AsyncData.Success(Unit)), ) } @@ -41,6 +41,6 @@ fun aBugReportState() = BugReportState( hasCrashLogs = false, screenshotUri = null, sendingProgress = 0F, - sending = Async.Uninitialized, + sending = AsyncData.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..2d1b7fdd6e 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,7 +37,7 @@ 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.architecture.AsyncData import io.element.android.libraries.designsystem.components.async.AsyncView import io.element.android.libraries.designsystem.components.form.textFieldState import io.element.android.libraries.designsystem.components.preferences.PreferencePage @@ -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 AsyncData.Loading var descriptionFieldState by textFieldState( stateValue = state.formState.description ) 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..3c2607a08a 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.AsyncData 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(AsyncData.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(AsyncData.Loading(null)) 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(AsyncData.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(AsyncData.Loading(null)) 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 AsyncData.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(AsyncData.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(AsyncData.Loading(null)) 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(AsyncData.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..f48ec727e1 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.AsyncData 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(AsyncData.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 = AsyncData.Uninitialized } } @@ -156,7 +156,7 @@ 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..c7076bd67f 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.AsyncData 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: AsyncData, 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..9d62760542 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.AsyncData 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.NotSearching()) } var searchQuery by rememberSaveable { mutableStateOf("") } @@ -115,7 +115,7 @@ class RoomInviteMembersPresenter @Inject constructor( private suspend fun performSearch( searchResults: MutableState>>, - roomMembers: MutableState>>, + roomMembers: MutableState>>, selectedUsers: MutableState>, searchQuery: String, ) = withContext(coroutineDispatchers.io) { @@ -142,7 +142,7 @@ class RoomInviteMembersPresenter @Inject constructor( } } - 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 49ae479d40..649d2d8482 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.NotSearching()) @@ -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 4954af8efc..a9e4037c3c 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.NotSearching(), ) = 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..73d5457f64 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.AsyncData 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 AsyncData.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..b2b64ea67e 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,7 @@ 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.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 +56,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(AsyncData.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 +90,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 +98,7 @@ class RoomMemberDetailsPresenter @AssistedInject constructor( } } RoomMemberDetailsEvents.ClearStartDMState -> { - startDmActionState.value = Async.Uninitialized + startDmActionState.value = AsyncData.Uninitialized } } } @@ -127,30 +127,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..db7b926db9 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,15 @@ package io.element.android.features.roomdetails.impl.members.details -import io.element.android.libraries.architecture.Async +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: AsyncData, 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..b060d2de7c 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,18 @@ 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.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 = AsyncData.Loading()), // Add other states here ) } @@ -37,8 +37,8 @@ fun aRoomMemberDetailsState() = RoomMemberDetailsState( userId = "@daniel:domain.com", userName = "Daniel", avatarUrl = null, - isBlocked = Async.Success(false), - startDmActionState = Async.Uninitialized, + isBlocked = AsyncData.Success(false), + startDmActionState = AsyncData.Uninitialized, displayConfirmationDialog = null, isCurrentUser = false, eventSink = {}, 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..31621fb648 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,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.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.notificationsettings.NotificationSettingsService @@ -61,11 +61,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(AsyncData.Uninitialized) } + val restoreDefaultAction: MutableState> = remember { mutableStateOf(AsyncData.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. @@ -111,10 +111,10 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( localCoroutineScope.restoreDefaultRoomNotificationMode(restoreDefaultAction, pendingSetDefault) } RoomNotificationSettingsEvents.ClearSetNotificationError -> { - setNotificationSettingAction.value = Async.Uninitialized + setNotificationSettingAction.value = AsyncData.Uninitialized } RoomNotificationSettingsEvents.ClearRestoreDefaultError -> { - restoreDefaultAction.value = Async.Uninitialized + restoreDefaultAction.value = AsyncData.Uninitialized } } } @@ -136,7 +136,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 +148,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( private fun CoroutineScope.fetchNotificationSettings( pendingModeState: MutableState, - roomNotificationSettings: MutableState> + roomNotificationSettings: MutableState> ) = launch { suspend { pendingModeState.value = null @@ -169,7 +169,7 @@ class RoomNotificationSettingsPresenter @AssistedInject constructor( mode: RoomNotificationMode, pendingModeState: MutableState, pendingDefaultState: MutableState, - action: MutableState> + action: MutableState> ) = launch { suspend { pendingModeState.value = mode @@ -184,7 +184,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..a009e5b4e5 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,19 @@ package io.element.android.features.roomdetails.impl.notificationsettings -import io.element.android.libraries.architecture.Async +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: AsyncData, + val restoreDefaultAction: AsyncData, 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..5b4fac7b0d 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,7 @@ 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.AsyncData import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.RoomNotificationSettings @@ -26,23 +26,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 = AsyncData.Loading(Unit)), + aRoomNotificationSettingsState(setNotificationSettingAction = AsyncData.Failure(Throwable("error"))), + aRoomNotificationSettingsState(restoreDefaultAction = AsyncData.Loading(Unit)), + aRoomNotificationSettingsState(restoreDefaultAction = AsyncData.Failure(Throwable("error"))), aRoomNotificationSettingsState(displayMentionsOnlyDisclaimer = true) ) private fun aRoomNotificationSettingsState( isDefault: Boolean = true, - setNotificationSettingAction: Async = Async.Uninitialized, - restoreDefaultAction: Async = Async.Uninitialized, + setNotificationSettingAction: AsyncData = AsyncData.Uninitialized, + restoreDefaultAction: AsyncData = AsyncData.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/UserDefinedRoomNotificationSettingsStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/UserDefinedRoomNotificationSettingsStateProvider.kt index a3ff7f23d7..26f201d949 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,7 @@ 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.AsyncData import io.element.android.libraries.matrix.api.room.RoomNotificationMode import io.element.android.libraries.matrix.api.room.RoomNotificationSettings @@ -27,7 +27,7 @@ internal class UserDefinedRoomNotificationSettingsStateProvider : PreviewParamet RoomNotificationSettingsState( showUserDefinedSettingStyle = false, roomName = "Room 1", - Async.Success( + AsyncData.Success( RoomNotificationSettings( mode = RoomNotificationMode.MUTE, isDefault = false) @@ -35,8 +35,8 @@ internal class UserDefinedRoomNotificationSettingsStateProvider : PreviewParamet pendingRoomNotificationMode = null, pendingSetDefault = null, defaultRoomNotificationMode = RoomNotificationMode.ALL_MESSAGES, - setNotificationSettingAction = Async.Uninitialized, - restoreDefaultAction = Async.Uninitialized, + setNotificationSettingAction = AsyncData.Uninitialized, + restoreDefaultAction = AsyncData.Uninitialized, displayMentionsOnlyDisclaimer = false, eventSink = { }, ), 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..d6a325b51d 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.AsyncData 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(AsyncData.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(AsyncData.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(AsyncData.Failure::class.java) initialState.eventSink(RoomDetailsEditEvents.CancelSaveChanges) - assertThat(awaitItem().saveAction).isInstanceOf(Async.Uninitialized::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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 097919a5e1..1b5ae74765 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.NotSearching::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..f386c0e887 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,7 +27,7 @@ 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.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 @@ -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(AsyncData.Uninitialized::class.java) + val startDMSuccessResult = AsyncData.Success(A_ROOM_ID) + val startDMFailureResult = AsyncData.Failure(A_THROWABLE) // Failure startDMAction.givenExecuteResult(startDMFailureResult) initialState.eventSink(RoomMemberDetailsEvents.StartDM) - assertThat(awaitItem().startDmActionState).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmActionState).isInstanceOf(AsyncData.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(AsyncData.Uninitialized) state.eventSink(RoomMemberDetailsEvents.StartDM) } - assertThat(awaitItem().startDmActionState).isInstanceOf(Async.Loading::class.java) + assertThat(awaitItem().startDmActionState).isInstanceOf(AsyncData.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/SecureBackupDisablePresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt index 60b4691661..bb9cfb8a0a 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 @@ -25,7 +25,7 @@ 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.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.core.meta.BuildMeta @@ -44,7 +44,7 @@ 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 = remember { mutableStateOf>(AsyncData.Uninitialized) } val coroutineScope = rememberCoroutineScope() var showDialog by remember { mutableStateOf(false) } fun handleEvents(event: SecureBackupDisableEvents) { @@ -57,7 +57,7 @@ class SecureBackupDisablePresenter @Inject constructor( } SecureBackupDisableEvents.DismissDialogs -> { showDialog = false - disableAction.value = Async.Uninitialized + disableAction.value = AsyncData.Uninitialized } } } @@ -71,7 +71,7 @@ class SecureBackupDisablePresenter @Inject constructor( ) } - 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..3698752749 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,12 +16,12 @@ package io.element.android.features.securebackup.impl.disable -import io.element.android.libraries.architecture.Async +import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.encryption.BackupState data class SecureBackupDisableState( val backupState: BackupState, - val disableAction: Async, + val disableAction: AsyncData, val showConfirmationDialog: Boolean, 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..44bee84d2d 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,7 +17,7 @@ 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.AsyncData import io.element.android.libraries.matrix.api.encryption.BackupState open class SecureBackupDisableStateProvider : PreviewParameterProvider { @@ -25,15 +25,15 @@ open class SecureBackupDisableStateProvider : PreviewParameterProvider = Async.Uninitialized, + disableAction: AsyncData = AsyncData.Uninitialized, showConfirmationDialog: Boolean = false, ) = SecureBackupDisableState( backupState = backupState, 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..6d972223a8 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 @@ -34,7 +34,7 @@ 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.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.pages.FlowStepPage import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog @@ -53,7 +53,7 @@ fun SecureBackupDisableView( modifier: Modifier = Modifier, ) { LaunchedEffect(state.disableAction) { - if (state.disableAction is Async.Success) { + if (state.disableAction is AsyncData.Success) { onDone() } } @@ -72,7 +72,7 @@ fun SecureBackupDisableView( onConfirm = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup(force = true)) }, onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, ) - } else if (state.disableAction is Async.Failure) { + } else if (state.disableAction is AsyncData.Failure) { ErrorDialog( content = state.disableAction.error.let { it.message ?: it.toString() }, onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, 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..f79176b3a9 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.AsyncData import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.architecture.runCatchingUpdatingState import io.element.android.libraries.matrix.api.encryption.EncryptionService @@ -47,13 +47,13 @@ class SecureBackupEnterRecoveryKeyPresenter @Inject constructor( mutableStateOf("") } val submitAction = remember { - mutableStateOf>(Async.Uninitialized) + mutableStateOf>(AsyncData.Uninitialized) } fun handleEvents(event: SecureBackupEnterRecoveryKeyEvents) { when (event) { SecureBackupEnterRecoveryKeyEvents.ClearDialog -> { - submitAction.value = Async.Uninitialized + submitAction.value = AsyncData.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..9f00714f38 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.AsyncData // 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: AsyncData, 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..6350eeb696 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.AsyncData 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 = AsyncData.Loading()), + aSecureBackupEnterRecoveryKeyState(submitAction = AsyncData.Failure(Exception("A Failure"))), ) } fun aSecureBackupEnterRecoveryKeyState( recoveryKey: String = aFormattedRecoveryKey(), isSubmitEnabled: Boolean = recoveryKey.isNotEmpty(), - submitAction: Async = Async.Uninitialized, + submitAction: AsyncData = AsyncData.Uninitialized, ) = SecureBackupEnterRecoveryKeyState( recoveryKeyViewState = RecoveryKeyViewState( recoveryKeyUserStory = RecoveryKeyUserStory.Enter, 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..32847fc66c 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.AsyncData 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,7 +42,7 @@ class SecureBackupDisablePresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.backupState).isEqualTo(BackupState.UNKNOWN) - assertThat(initialState.disableAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.disableAction).isEqualTo(AsyncData.Uninitialized) assertThat(initialState.showConfirmationDialog).isFalse() assertThat(initialState.appName).isEqualTo("Element") } @@ -80,9 +80,9 @@ class SecureBackupDisablePresenterTest { skipItems(1) val loadingState = awaitItem() assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.disableAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.disableAction).isInstanceOf(AsyncData.Loading::class.java) val finalState = awaitItem() - assertThat(finalState.disableAction).isEqualTo(Async.Success(Unit)) + assertThat(finalState.disableAction).isEqualTo(AsyncData.Success(Unit)) } } @@ -106,12 +106,12 @@ class SecureBackupDisablePresenterTest { skipItems(1) val loadingState = awaitItem() assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.disableAction).isInstanceOf(Async.Loading::class.java) + assertThat(loadingState.disableAction).isInstanceOf(AsyncData.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.disableAction).isInstanceOf(Async.Failure::class.java) + assertThat(errorState.disableAction).isInstanceOf(AsyncData.Failure::class.java) errorState.eventSink(SecureBackupDisableEvents.DismissDialogs) val finalState = awaitItem() - assertThat(finalState.disableAction).isEqualTo(Async.Uninitialized) + assertThat(finalState.disableAction).isEqualTo(AsyncData.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..50da0728c4 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.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 @@ -44,7 +44,7 @@ class SecureBackupEnterRecoveryKeyPresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.isSubmitEnabled).isFalse() - assertThat(initialState.submitAction).isEqualTo(Async.Uninitialized) + assertThat(initialState.submitAction).isEqualTo(AsyncData.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(AsyncData.Loading()) assertThat(loadingState.isSubmitEnabled).isFalse() val errorState = awaitItem() - assertThat(errorState.submitAction).isEqualTo(Async.Failure(AN_EXCEPTION)) + assertThat(errorState.submitAction).isEqualTo(AsyncData.Failure(AN_EXCEPTION)) assertThat(errorState.isSubmitEnabled).isFalse() errorState.eventSink(SecureBackupEnterRecoveryKeyEvents.ClearDialog) val clearedState = awaitItem() - assertThat(clearedState.submitAction).isEqualTo(Async.Uninitialized) + assertThat(clearedState.submitAction).isEqualTo(AsyncData.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(AsyncData.Loading()) assertThat(loadingState2.isSubmitEnabled).isFalse() val finalState = awaitItem() - assertThat(finalState.submitAction).isEqualTo(Async.Success(Unit)) + assertThat(finalState.submitAction).isEqualTo(AsyncData.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/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/AsyncProvider.kt index 028de2d57b..ae090739ce 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/AsyncProvider.kt @@ -17,14 +17,14 @@ 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.AsyncData -open class AsyncProvider : PreviewParameterProvider> { - override val values: Sequence> +open class AsyncProvider : PreviewParameterProvider> { + override val values: Sequence> get() = sequenceOf( - Async.Uninitialized, - Async.Loading(), - Async.Failure(Exception("An error occurred")), - Async.Success(Unit), + AsyncData.Uninitialized, + AsyncData.Loading(), + AsyncData.Failure(Exception("An error occurred")), + AsyncData.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/AsyncView.kt index d19dc08c6a..b58c1b3e2c 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/AsyncView.kt @@ -19,7 +19,7 @@ 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.AsyncData import io.element.android.libraries.designsystem.components.ProgressDialog import io.element.android.libraries.designsystem.components.dialogs.ErrorDialog import io.element.android.libraries.designsystem.components.dialogs.ErrorDialogDefaults @@ -36,7 +36,7 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight */ @Composable fun AsyncView( - async: Async, + async: AsyncData, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, showProgressDialog: Boolean = true, @@ -62,7 +62,7 @@ fun AsyncView( @Composable fun AsyncView( - async: Async, + async: AsyncData, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, progressDialog: @Composable () -> Unit = { AsyncViewDefaults.ProgressDialog() }, @@ -71,9 +71,9 @@ fun AsyncView( onRetry: (() -> Unit)? = null, ) { when (async) { - Async.Uninitialized -> Unit - is Async.Loading -> progressDialog() - is Async.Failure -> { + AsyncData.Uninitialized -> Unit + is AsyncData.Loading -> progressDialog() + is AsyncData.Failure -> { if (onRetry == null) { ErrorDialog( title = errorTitle(async.error), @@ -89,7 +89,7 @@ fun AsyncView( ) } } - is Async.Success -> { + is AsyncData.Success -> { LaunchedEffect(async) { onSuccess(async.data) } @@ -109,7 +109,7 @@ object AsyncViewDefaults { @PreviewsDayNight @Composable internal fun AsyncViewPreview( - @PreviewParameter(AsyncProvider::class) async: Async, + @PreviewParameter(AsyncProvider::class) async: AsyncData, ) = ElementPreview { AsyncView( async = async, 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() } } From d78ce21939364780285eb1b901698b231de0bb6f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 16:49:22 +0100 Subject: [PATCH 075/161] Rename AsyncView to AsyncActionView --- .../features/createroom/api/StartDMAction.kt | 4 +- .../createroom/impl/DefaultStartDMAction.kt | 10 +-- .../configureroom/ConfigureRoomPresenter.kt | 10 +-- .../impl/configureroom/ConfigureRoomState.kt | 6 +- .../ConfigureRoomStateProvider.kt | 4 +- .../impl/configureroom/ConfigureRoomView.kt | 4 +- .../impl/root/CreateRoomRootPresenter.kt | 6 +- .../impl/root/CreateRoomRootState.kt | 4 +- .../impl/root/CreateRoomRootStateProvider.kt | 8 +-- .../impl/root/CreateRoomRootView.kt | 4 +- .../impl/DefaultStartDMActionTests.kt | 14 ++-- .../ConfigureRoomPresenterTests.kt | 32 ++++----- .../impl/root/CreateRoomRootPresenterTests.kt | 15 ++--- .../createroom/test/FakeStartDMAction.kt | 10 +-- .../login/impl/oidc/webview/OidcPresenter.kt | 18 ++--- .../login/impl/oidc/webview/OidcState.kt | 4 +- .../impl/oidc/webview/OidcStateProvider.kt | 6 +- .../login/impl/oidc/webview/OidcView.kt | 4 +- .../impl/oidc/webview/OidcPresenterTest.kt | 24 +++---- .../impl/report/ReportMessagePresenter.kt | 8 +-- .../impl/report/ReportMessageState.kt | 4 +- .../impl/report/ReportMessageStateProvider.kt | 10 +-- .../messages/impl/report/ReportMessageView.kt | 7 +- .../report/ReportMessagePresenterTests.kt | 18 ++--- .../NotificationSettingsPresenter.kt | 14 ++-- .../NotificationSettingsState.kt | 8 +-- .../NotificationSettingsStateProvider.kt | 8 +-- .../notifications/NotificationSettingsView.kt | 4 +- ...EditDefaultNotificationSettingPresenter.kt | 12 ++-- .../EditDefaultNotificationSettingState.kt | 4 +- ...DefaultNotificationSettingStateProvider.kt | 10 +-- .../EditDefaultNotificationSettingView.kt | 4 +- .../editprofile/EditUserProfilePresenter.kt | 15 +++-- .../user/editprofile/EditUserProfileState.kt | 4 +- .../EditUserProfileStateProvider.kt | 4 +- .../user/editprofile/EditUserProfileView.kt | 4 +- .../EditUserProfilePresenterTest.kt | 14 ++-- .../impl/bugreport/BugReportPresenter.kt | 18 ++--- .../impl/bugreport/BugReportState.kt | 6 +- .../impl/bugreport/BugReportStateProvider.kt | 8 +-- .../rageshake/impl/bugreport/BugReportView.kt | 8 +-- .../impl/bugreport/BugReportPresenterTest.kt | 18 ++--- .../impl/edit/RoomDetailsEditPresenter.kt | 13 ++-- .../impl/edit/RoomDetailsEditState.kt | 4 +- .../impl/edit/RoomDetailsEditStateProvider.kt | 8 +-- .../impl/edit/RoomDetailsEditView.kt | 4 +- .../members/details/RoomMemberDetailsNode.kt | 3 +- .../details/RoomMemberDetailsPresenter.kt | 5 +- .../members/details/RoomMemberDetailsState.kt | 3 +- .../details/RoomMemberDetailsStateProvider.kt | 5 +- .../members/details/RoomMemberDetailsView.kt | 4 +- .../RoomNotificationSettingsPresenter.kt | 15 +++-- .../RoomNotificationSettingsState.kt | 5 +- .../RoomNotificationSettingsStateProvider.kt | 13 ++-- .../RoomNotificationSettingsView.kt | 6 +- ...edRoomNotificationSettingsStateProvider.kt | 5 +- ...UserDefinedRoomNotificationSettingsView.kt | 6 +- .../edit/RoomDetailsEditPresenterTest.kt | 14 ++-- .../RoomMemberDetailsPresenterTests.kt | 14 ++-- .../disable/SecureBackupDisablePresenter.kt | 8 +-- .../impl/disable/SecureBackupDisableState.kt | 4 +- .../SecureBackupDisableStateProvider.kt | 8 +-- .../impl/disable/SecureBackupDisableView.kt | 5 +- .../SecureBackupEnterRecoveryKeyPresenter.kt | 10 +-- .../SecureBackupEnterRecoveryKeyState.kt | 4 +- ...cureBackupEnterRecoveryKeyStateProvider.kt | 7 +- .../enter/SecureBackupEnterRecoveryKeyView.kt | 4 +- .../SecureBackupDisablePresenterTest.kt | 14 ++-- ...cureBackupEnterRecoveryKeyPresenterTest.kt | 14 ++-- ...syncProvider.kt => AsyncActionProvider.kt} | 15 +++-- .../{AsyncView.kt => AsyncActionView.kt} | 67 ++++++++++++++----- 71 files changed, 369 insertions(+), 315 deletions(-) rename libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/{AsyncProvider.kt => AsyncActionProvider.kt} (65%) rename libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/{AsyncView.kt => AsyncActionView.kt} (62%) 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 4e20cea5d1..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.AsyncData +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 f129071824..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.AsyncData +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 = AsyncData.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 = AsyncData.Success(result.roomId) + actionState.value = AsyncAction.Success(result.roomId) } is StartDMResult.Failure -> { - actionState.value = AsyncData.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 46f6113780..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.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.mimetype.MimeTypes @@ -91,10 +91,10 @@ class ConfigureRoomPresenter @Inject constructor( } val localCoroutineScope = rememberCoroutineScope() - val createRoomAction: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } + val createRoomAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } fun createRoom(config: CreateRoomConfig) { - createRoomAction.value = AsyncData.Uninitialized + createRoomAction.value = AsyncAction.Uninitialized localCoroutineScope.createRoom(config, createRoomAction) } @@ -118,7 +118,7 @@ class ConfigureRoomPresenter @Inject constructor( } } - ConfigureRoomEvents.CancelCreateRoom -> createRoomAction.value = AsyncData.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 7b932db9b6..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.AsyncData +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: AsyncData, + 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 f5a665f25e..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.AsyncData +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(AsyncData.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 = AsyncData.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 ad583e2cbf..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.AsyncData +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: AsyncData, + 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 ceef8daa73..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.AsyncData 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>(AsyncData.Uninitialized) + val state = mutableStateOf>(AsyncAction.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(AsyncData.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>(AsyncData.Uninitialized) + val state = mutableStateOf>(AsyncAction.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(AsyncData.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>(AsyncData.Uninitialized) + val state = mutableStateOf>(AsyncAction.Uninitialized) action.execute(A_USER_ID, state) - assertThat(state.value).isEqualTo(AsyncData.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 e0be429790..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.AsyncData +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(AsyncData.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Uninitialized::class.java) - assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.Loading::class.java) - assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncAction.Loading::class.java) val stateAfterCreateRoom = awaitItem() - assertThat(stateAfterCreateRoom.createRoomAction).isInstanceOf(AsyncData.Failure::class.java) - assertThat((stateAfterCreateRoom.createRoomAction as? AsyncData.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(AsyncData.Uninitialized::class.java) - assertThat(awaitItem().createRoomAction).isInstanceOf(AsyncData.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(AsyncData.Failure::class.java) - assertThat((stateAfterRetry.createRoomAction as? AsyncData.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(AsyncData.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 4446f1f3a9..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.AsyncData -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(AsyncData.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 = AsyncData.Success(A_ROOM_ID) - val startDMFailureResult = AsyncData.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(AsyncData.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(AsyncData.Uninitialized) + assertThat(state.startDmAction).isEqualTo(AsyncAction.Uninitialized) state.eventSink(CreateRoomRootEvents.StartDM(matrixUser)) } - assertThat(awaitItem().startDmAction).isInstanceOf(AsyncData.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 f3e17ee79a..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.AsyncData +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: AsyncData = AsyncData.Success(A_ROOM_ID) + private var executeResult: AsyncAction = AsyncAction.Success(A_ROOM_ID) - fun givenExecuteResult(result: AsyncData) { + fun givenExecuteResult(result: AsyncAction) { executeResult = result } - override suspend fun execute(userId: UserId, actionState: MutableState>) { - actionState.value = AsyncData.Loading() + override suspend fun execute(userId: UserId, actionState: MutableState>) { + actionState.value = AsyncAction.Loading delay(1) actionState.value = executeResult } 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 74a5f58494..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.AsyncData +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: AsyncData by remember { - mutableStateOf(AsyncData.Uninitialized) + var requestState: AsyncAction by remember { + mutableStateOf(AsyncAction.Uninitialized) } val localCoroutineScope = rememberCoroutineScope() fun handleCancel() { - requestState = AsyncData.Loading() + requestState = AsyncAction.Loading localCoroutineScope.launch { authenticationService.cancelOidcLogin() .fold( onSuccess = { // Then go back - requestState = AsyncData.Success(Unit) + requestState = AsyncAction.Success(Unit) }, onFailure = { - requestState = AsyncData.Failure(it) + requestState = AsyncAction.Failure(it) } ) } } fun handleSuccess(url: String) { - requestState = AsyncData.Loading() + requestState = AsyncAction.Loading localCoroutineScope.launch { authenticationService.loginWithOidc(url) .onFailure { - requestState = AsyncData.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 = AsyncData.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 2571f01f0c..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.AsyncData +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.auth.OidcDetails data class OidcState( val oidcDetails: OidcDetails, - val requestState: AsyncData, + 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 f0b9dac200..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.AsyncData +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 = AsyncData.Loading()), + aOidcState().copy(requestState = AsyncAction.Loading), ) } fun aOidcState() = OidcState( oidcDetails = aOidcDetails(), - requestState = AsyncData.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/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 2627bc384d..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.AsyncData +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(AsyncData.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(AsyncData.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(AsyncData.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(AsyncData.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(AsyncData.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(AsyncData.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(AsyncData.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(AsyncData.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(AsyncData.Loading()) + assertThat(loadingState.requestState).isEqualTo(AsyncAction.Loading) val errorState = awaitItem() - assertThat(errorState.requestState).isEqualTo(AsyncData.Failure(A_THROWABLE)) + assertThat(errorState.requestState).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(OidcEvents.ClearError) val finalState = awaitItem() - assertThat(finalState.requestState).isEqualTo(AsyncData.Uninitialized) + assertThat(finalState.requestState).isEqualTo(AsyncAction.Uninitialized) } } } 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 902c82aa0c..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.AsyncData +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(AsyncData.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 = AsyncData.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 f1255c18a0..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.AsyncData +import io.element.android.libraries.architecture.AsyncAction data class ReportMessageState( val reason: String, val blockUser: Boolean, - val result: AsyncData, + 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 a5847cef4a..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.AsyncData +import io.element.android.libraries.architecture.AsyncAction open class ReportMessageStateProvider : PreviewParameterProvider { override val values: Sequence @@ -25,9 +25,9 @@ open class ReportMessageStateProvider : PreviewParameterProvider = AsyncData.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 d393619c72..a069fd615b 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,9 @@ 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.AsyncAction import io.element.android.libraries.architecture.AsyncData -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 @@ -62,8 +63,8 @@ fun ReportMessageView( modifier: Modifier = Modifier, ) { val focusManager = LocalFocusManager.current - val isSending = state.result is AsyncData.Loading - AsyncView( + val isSending = state.result is AsyncAction.Loading + AsyncActionView( async = state.result, showProgressDialog = false, onSuccess = { onBackClicked() }, 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 9bc85a241e..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.AsyncData +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(AsyncData.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(AsyncData.Loading::class.java) - assertThat(awaitItem().result).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) - assertThat(awaitItem().result).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) + assertThat(awaitItem().result).isInstanceOf(AsyncAction.Loading::class.java) val resultState = awaitItem() - assertThat(resultState.result).isInstanceOf(AsyncData.Failure::class.java) + assertThat(resultState.result).isInstanceOf(AsyncAction.Failure::class.java) assertThat(room.reportedContentCount).isEqualTo(1) resultState.eventSink(ReportMessageEvents.ClearError) - assertThat(awaitItem().result).isInstanceOf(AsyncData.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/notifications/NotificationSettingsPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt index e43177b9ae..7083b9f88b 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenter.kt @@ -23,7 +23,7 @@ import androidx.compose.runtime.collectAsState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -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.matrix.api.MatrixClient @@ -52,7 +52,7 @@ class NotificationSettingsPresenter @Inject constructor( val systemNotificationsEnabled: MutableState = remember { mutableStateOf(systemNotificationsEnabledProvider.notificationsEnabled()) } - val changeNotificationSettingAction: MutableState> = remember { mutableStateOf(AsyncData.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 = AsyncData.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 cf5f40aecc..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.AsyncData +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: AsyncData, + 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 a1d0e3cb0d..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.AsyncData +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 = AsyncData.Loading(Unit)), - aNotificationSettingsState(changeNotificationSettingAction = AsyncData.Failure(Throwable("error"))), + aNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Loading), + aNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Failure(Throwable("error"))), ) } fun aNotificationSettingsState( - changeNotificationSettingAction: AsyncData = AsyncData.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 3f1edbfe28..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.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.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(AsyncData.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 = AsyncData.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 60d881fa1c..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.AsyncData +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: AsyncData, + 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 f049a69669..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.AsyncData +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 = AsyncData.Loading(Unit)), - anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncData.Failure(Throwable("error"))), + anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Loading), + anEditDefaultNotificationSettingsState(changeNotificationSettingAction = AsyncAction.Failure(Throwable("error"))), anEditDefaultNotificationSettingsState(displayMentionsOnlyDisclaimer = true), ) } private fun anEditDefaultNotificationSettingsState( isOneToOne: Boolean = false, - changeNotificationSettingAction: AsyncData = AsyncData.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/user/editprofile/EditUserProfilePresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/editprofile/EditUserProfilePresenter.kt index 60498d7141..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.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.mimetype.MimeTypes @@ -92,7 +92,7 @@ class EditUserProfilePresenter @AssistedInject constructor( } } - val saveAction: MutableState> = remember { mutableStateOf(AsyncData.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 = AsyncData.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 AsyncData.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 600c16858b..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.AsyncData +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: AsyncData, + 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 f970e2c60d..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.AsyncData +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 = AsyncData.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..8f0add74ce 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 @@ -147,7 +147,7 @@ fun EditUserProfileView( onActionSelected = { state.eventSink(EditUserProfileEvents.HandleAvatarAction(it)) } ) - AsyncView( + AsyncActionView( async = state.saveAction, progressText = stringResource(R.string.screen_edit_profile_updating_details), onSuccess = { onProfileEdited() }, 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 37e95378ba..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.AsyncData +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(AsyncData.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(AsyncData.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(AsyncData.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) initialState.eventSink(EditUserProfileEvents.CancelSaveChanges) - assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) - assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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 eac789af3e..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.AsyncData +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 = AsyncData.Uninitialized + sendingAction.value = AsyncAction.Uninitialized } override fun onUploadFailed(reason: String?) { sendingProgress.floatValue = 0f - sendingAction.value = AsyncData.Failure(Exception(reason)) + sendingAction.value = AsyncAction.Failure(Exception(reason)) } override fun onProgress(progress: Int) { sendingProgress.floatValue = progress.toFloat() / 100 - sendingAction.value = AsyncData.Loading() + sendingAction.value = AsyncAction.Loading } override fun onUploadSucceed() { sendingProgress.floatValue = 0f - sendingAction.value = AsyncData.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(AsyncData.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 = AsyncData.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 1401369cc2..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.AsyncData +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: AsyncData, + val sending: AsyncAction, val eventSink: (BugReportEvents) -> Unit ) { val submitEnabled = - formState.description.length > 10 && sending !is AsyncData.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 e670562637..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.AsyncData +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 = AsyncData.Loading()), - aBugReportState().copy(sending = AsyncData.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 = AsyncData.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 2d1b7fdd6e..34eaf3316a 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.AsyncData -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 AsyncData.Loading + val isFormEnabled = state.sending !is AsyncAction.Loading var descriptionFieldState by textFieldState( stateValue = state.formState.description ) @@ -150,7 +150,7 @@ fun BugReportView( } } - AsyncView( + AsyncActionView( async = state.sending, showProgressDialog = false, onSuccess = { 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 3c2607a08a..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.AsyncData +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(AsyncData.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(AsyncData.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(AsyncData.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(AsyncData.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 AsyncData.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(AsyncData.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(AsyncData.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(AsyncData.Uninitialized) + assertThat(awaitItem().sending).isEqualTo(AsyncAction.Uninitialized) } } } 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 f48ec727e1..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.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.mimetype.MimeTypes @@ -116,7 +116,7 @@ class RoomDetailsEditPresenter @Inject constructor( } } - val saveAction: MutableState> = remember { mutableStateOf(AsyncData.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 = AsyncData.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 c7076bd67f..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.AsyncData +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: AsyncData, + 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 9d62760542..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.AsyncData +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(null) } val roomMember by room.getRoomMemberAsState(roomMemberId) - val startDmActionState: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } + val startDmActionState: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } // the room member is not really live... val isBlocked: MutableState> = remember(roomMember) { val isIgnored = roomMember?.isIgnored @@ -98,7 +99,7 @@ class RoomMemberDetailsPresenter @AssistedInject constructor( } } RoomMemberDetailsEvents.ClearStartDMState -> { - startDmActionState.value = AsyncData.Uninitialized + startDmActionState.value = AsyncAction.Uninitialized } } } 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 db7b926db9..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,6 +16,7 @@ package io.element.android.features.roomdetails.impl.members.details +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.matrix.api.core.RoomId @@ -24,7 +25,7 @@ data class RoomMemberDetailsState( val userName: String?, val avatarUrl: String?, val isBlocked: AsyncData, - val startDmActionState: 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 b060d2de7c..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,6 +17,7 @@ package io.element.android.features.roomdetails.impl.members.details import androidx.compose.ui.tooling.preview.PreviewParameterProvider +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.architecture.AsyncData open class RoomMemberDetailsStateProvider : PreviewParameterProvider { @@ -28,7 +29,7 @@ open class RoomMemberDetailsStateProvider : PreviewParameterProvider> = remember { mutableStateOf(AsyncData.Uninitialized) } - val restoreDefaultAction: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) } + val setNotificationSettingAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } + val restoreDefaultAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val roomNotificationSettings: MutableState> = remember { mutableStateOf(AsyncData.Uninitialized) @@ -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 = AsyncData.Uninitialized + setNotificationSettingAction.value = AsyncAction.Uninitialized } RoomNotificationSettingsEvents.ClearRestoreDefaultError -> { - restoreDefaultAction.value = AsyncData.Uninitialized + restoreDefaultAction.value = AsyncAction.Uninitialized } } } @@ -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 a009e5b4e5..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,6 +16,7 @@ package io.element.android.features.roomdetails.impl.notificationsettings +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,8 +28,8 @@ data class RoomNotificationSettingsState( val pendingRoomNotificationMode: RoomNotificationMode?, val pendingSetDefault: Boolean?, val defaultRoomNotificationMode: RoomNotificationMode?, - val setNotificationSettingAction: AsyncData, - val restoreDefaultAction: AsyncData, + 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 5b4fac7b0d..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,6 +17,7 @@ package io.element.android.features.roomdetails.impl.notificationsettings import androidx.compose.ui.tooling.preview.PreviewParameterProvider +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,17 +27,17 @@ internal class RoomNotificationSettingsStateProvider : PreviewParameterProvider< get() = sequenceOf( aRoomNotificationSettingsState(), aRoomNotificationSettingsState(isDefault = false), - aRoomNotificationSettingsState(setNotificationSettingAction = AsyncData.Loading(Unit)), - aRoomNotificationSettingsState(setNotificationSettingAction = AsyncData.Failure(Throwable("error"))), - aRoomNotificationSettingsState(restoreDefaultAction = AsyncData.Loading(Unit)), - aRoomNotificationSettingsState(restoreDefaultAction = AsyncData.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: AsyncData = AsyncData.Uninitialized, - restoreDefaultAction: AsyncData = AsyncData.Uninitialized, + setNotificationSettingAction: AsyncAction = AsyncAction.Uninitialized, + restoreDefaultAction: AsyncAction = AsyncAction.Uninitialized, displayMentionsOnlyDisclaimer: Boolean = false, ): RoomNotificationSettingsState { return RoomNotificationSettingsState( 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 26f201d949..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,6 +17,7 @@ package io.element.android.features.roomdetails.impl.notificationsettings import androidx.compose.ui.tooling.preview.PreviewParameterProvider +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 @@ -35,8 +36,8 @@ internal class UserDefinedRoomNotificationSettingsStateProvider : PreviewParamet pendingRoomNotificationMode = null, pendingSetDefault = null, defaultRoomNotificationMode = RoomNotificationMode.ALL_MESSAGES, - setNotificationSettingAction = AsyncData.Uninitialized, - restoreDefaultAction = AsyncData.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 d6a325b51d..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.AsyncData +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(AsyncData.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(AsyncData.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(AsyncData.Failure::class.java) + assertThat(awaitItem().saveAction).isInstanceOf(AsyncAction.Failure::class.java) initialState.eventSink(RoomDetailsEditEvents.CancelSaveChanges) - assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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(AsyncData.Loading::class.java) - assertThat(awaitItem().saveAction).isInstanceOf(AsyncData.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/details/RoomMemberDetailsPresenterTests.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/members/details/RoomMemberDetailsPresenterTests.kt index f386c0e887..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.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 @@ -204,14 +204,14 @@ class RoomMemberDetailsPresenterTests { presenter.present() }.test { val initialState = awaitItem() - assertThat(initialState.startDmActionState).isInstanceOf(AsyncData.Uninitialized::class.java) - val startDMSuccessResult = AsyncData.Success(A_ROOM_ID) - val startDMFailureResult = AsyncData.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(AsyncData.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(AsyncData.Uninitialized) + assertThat(state.startDmActionState).isEqualTo(AsyncAction.Uninitialized) state.eventSink(RoomMemberDetailsEvents.StartDM) } - assertThat(awaitItem().startDmActionState).isInstanceOf(AsyncData.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/SecureBackupDisablePresenter.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/disable/SecureBackupDisablePresenter.kt index bb9cfb8a0a..7f19039979 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 @@ -25,7 +25,7 @@ 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.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.meta.BuildMeta @@ -44,7 +44,7 @@ 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>(AsyncData.Uninitialized) } + val disableAction: MutableState> = remember { mutableStateOf(AsyncAction.Uninitialized) } val coroutineScope = rememberCoroutineScope() var showDialog by remember { mutableStateOf(false) } fun handleEvents(event: SecureBackupDisableEvents) { @@ -57,7 +57,7 @@ class SecureBackupDisablePresenter @Inject constructor( } SecureBackupDisableEvents.DismissDialogs -> { showDialog = false - disableAction.value = AsyncData.Uninitialized + disableAction.value = AsyncAction.Uninitialized } } } @@ -71,7 +71,7 @@ class SecureBackupDisablePresenter @Inject constructor( ) } - 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 3698752749..2573812f75 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,12 +16,12 @@ package io.element.android.features.securebackup.impl.disable -import io.element.android.libraries.architecture.AsyncData +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState data class SecureBackupDisableState( val backupState: BackupState, - val disableAction: AsyncData, + val disableAction: AsyncAction, val showConfirmationDialog: Boolean, 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 44bee84d2d..8d23d1178b 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,7 +17,7 @@ package io.element.android.features.securebackup.impl.disable import androidx.compose.ui.tooling.preview.PreviewParameterProvider -import io.element.android.libraries.architecture.AsyncData +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.matrix.api.encryption.BackupState open class SecureBackupDisableStateProvider : PreviewParameterProvider { @@ -25,15 +25,15 @@ open class SecureBackupDisableStateProvider : PreviewParameterProvider = AsyncData.Uninitialized, + disableAction: AsyncAction = AsyncAction.Uninitialized, showConfirmationDialog: Boolean = false, ) = SecureBackupDisableState( backupState = backupState, 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 6d972223a8..7c00582a0b 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 @@ -34,6 +34,7 @@ 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.AsyncAction import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.atomic.pages.FlowStepPage import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog @@ -53,7 +54,7 @@ fun SecureBackupDisableView( modifier: Modifier = Modifier, ) { LaunchedEffect(state.disableAction) { - if (state.disableAction is AsyncData.Success) { + if (state.disableAction is AsyncAction.Success) { onDone() } } @@ -72,7 +73,7 @@ fun SecureBackupDisableView( onConfirm = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup(force = true)) }, onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, ) - } else if (state.disableAction is AsyncData.Failure) { + } else if (state.disableAction is AsyncAction.Failure) { ErrorDialog( content = state.disableAction.error.let { it.message ?: it.toString() }, onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, 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 f79176b3a9..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.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.matrix.api.encryption.EncryptionService @@ -46,14 +46,14 @@ class SecureBackupEnterRecoveryKeyPresenter @Inject constructor( var recoveryKey by rememberSaveable { mutableStateOf("") } - val submitAction = remember { - mutableStateOf>(AsyncData.Uninitialized) + val submitAction: MutableState> = remember { + mutableStateOf(AsyncAction.Uninitialized) } fun handleEvents(event: SecureBackupEnterRecoveryKeyEvents) { when (event) { SecureBackupEnterRecoveryKeyEvents.ClearDialog -> { - submitAction.value = AsyncData.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 9f00714f38..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.AsyncData +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: AsyncData, + 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 6350eeb696..cb8d1cba03 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,6 +20,7 @@ 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.AsyncAction import io.element.android.libraries.architecture.AsyncData open class SecureBackupEnterRecoveryKeyStateProvider : PreviewParameterProvider { @@ -27,15 +28,15 @@ open class SecureBackupEnterRecoveryKeyStateProvider : PreviewParameterProvider< get() = sequenceOf( aSecureBackupEnterRecoveryKeyState(recoveryKey = ""), aSecureBackupEnterRecoveryKeyState(), - aSecureBackupEnterRecoveryKeyState(submitAction = AsyncData.Loading()), - aSecureBackupEnterRecoveryKeyState(submitAction = AsyncData.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: AsyncData = AsyncData.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..f18937711c 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,7 +43,7 @@ fun SecureBackupEnterRecoveryKeyView( onBackClicked: () -> Unit, modifier: Modifier = Modifier, ) { - AsyncView( + AsyncActionView( async = state.submitAction, onSuccess = { onDone() }, showProgressDialog = false, 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 32847fc66c..9453e9e660 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.AsyncData +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,7 +42,7 @@ class SecureBackupDisablePresenterTest { }.test { val initialState = awaitItem() assertThat(initialState.backupState).isEqualTo(BackupState.UNKNOWN) - assertThat(initialState.disableAction).isEqualTo(AsyncData.Uninitialized) + assertThat(initialState.disableAction).isEqualTo(AsyncAction.Uninitialized) assertThat(initialState.showConfirmationDialog).isFalse() assertThat(initialState.appName).isEqualTo("Element") } @@ -80,9 +80,9 @@ class SecureBackupDisablePresenterTest { skipItems(1) val loadingState = awaitItem() assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.disableAction).isInstanceOf(AsyncData.Loading::class.java) + assertThat(loadingState.disableAction).isInstanceOf(AsyncAction.Loading::class.java) val finalState = awaitItem() - assertThat(finalState.disableAction).isEqualTo(AsyncData.Success(Unit)) + assertThat(finalState.disableAction).isEqualTo(AsyncAction.Success(Unit)) } } @@ -106,12 +106,12 @@ class SecureBackupDisablePresenterTest { skipItems(1) val loadingState = awaitItem() assertThat(loadingState.showConfirmationDialog).isFalse() - assertThat(loadingState.disableAction).isInstanceOf(AsyncData.Loading::class.java) + assertThat(loadingState.disableAction).isInstanceOf(AsyncAction.Loading::class.java) val errorState = awaitItem() - assertThat(errorState.disableAction).isInstanceOf(AsyncData.Failure::class.java) + assertThat(errorState.disableAction).isInstanceOf(AsyncAction.Failure::class.java) errorState.eventSink(SecureBackupDisableEvents.DismissDialogs) val finalState = awaitItem() - assertThat(finalState.disableAction).isEqualTo(AsyncData.Uninitialized) + assertThat(finalState.disableAction).isEqualTo(AsyncAction.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 50da0728c4..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.AsyncData +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(AsyncData.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(AsyncData.Loading()) + assertThat(loadingState.submitAction).isEqualTo(AsyncAction.Loading) assertThat(loadingState.isSubmitEnabled).isFalse() val errorState = awaitItem() - assertThat(errorState.submitAction).isEqualTo(AsyncData.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(AsyncData.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(AsyncData.Loading()) + assertThat(loadingState2.submitAction).isEqualTo(AsyncAction.Loading) assertThat(loadingState2.isSubmitEnabled).isFalse() val finalState = awaitItem() - assertThat(finalState.submitAction).isEqualTo(AsyncData.Success(Unit)) + assertThat(finalState.submitAction).isEqualTo(AsyncAction.Success(Unit)) assertThat(finalState.isSubmitEnabled).isFalse() } } 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 ae090739ce..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.AsyncData +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( - AsyncData.Uninitialized, - AsyncData.Loading(), - AsyncData.Failure(Exception("An error occurred")), - AsyncData.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 62% 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 b58c1b3e2c..fb74ecd975 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 @@ -18,40 +18,55 @@ package io.element.android.libraries.designsystem.components.async import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect +import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter -import io.element.android.libraries.architecture.AsyncData +import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.designsystem.components.ProgressDialog 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 import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.ui.strings.CommonStrings /** - * 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]. */ @Composable -fun AsyncView( - async: AsyncData, +fun AsyncActionView( + async: AsyncAction, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, + showConfirmationDialog: Boolean = false, + confirmationText: String? = null, + confirmationSubmit: String? = null, + onConfirmation: (() -> Unit)? = null, showProgressDialog: Boolean = true, progressText: String? = null, errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, onRetry: (() -> Unit)? = null, ) { - AsyncView( + AsyncActionView( async = async, onSuccess = onSuccess, onErrorDismiss = onErrorDismiss, + confirmingDialog = { + if (showConfirmationDialog) { + AsyncActionViewDefaults.ConfirmationDialog( + confirmationText = confirmationText, + confirmationSubmit = confirmationSubmit, + onConfirmation = onConfirmation, + ) + } + }, progressDialog = { if (showProgressDialog) { - AsyncViewDefaults.ProgressDialog(progressText) + AsyncActionViewDefaults.ProgressDialog(progressText) } }, errorTitle = errorTitle, @@ -61,19 +76,21 @@ fun AsyncView( } @Composable -fun AsyncView( - async: AsyncData, +fun AsyncActionView( + async: AsyncAction, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, - progressDialog: @Composable () -> Unit = { AsyncViewDefaults.ProgressDialog() }, + confirmingDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ConfirmationDialog() }, + progressDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ProgressDialog() }, errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, onRetry: (() -> Unit)? = null, ) { when (async) { - AsyncData.Uninitialized -> Unit - is AsyncData.Loading -> progressDialog() - is AsyncData.Failure -> { + AsyncAction.Uninitialized -> Unit + AsyncAction.Confirming -> confirmingDialog() + is AsyncAction.Loading -> progressDialog() + is AsyncAction.Failure -> { if (onRetry == null) { ErrorDialog( title = errorTitle(async.error), @@ -89,7 +106,7 @@ fun AsyncView( ) } } - is AsyncData.Success -> { + is AsyncAction.Success -> { LaunchedEffect(async) { onSuccess(async.data) } @@ -97,7 +114,23 @@ fun AsyncView( } } -object AsyncViewDefaults { +object AsyncActionViewDefaults { + @Composable + fun ConfirmationDialog( + confirmationText: String? = null, + confirmationSubmit: String? = null, + onConfirmation: (() -> Unit)? = null, + onDismiss: (() -> Unit)? = null, + ) { + io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog( + content = confirmationText.orEmpty(), + onSubmitClicked = onConfirmation ?: {}, + onDismiss = onDismiss ?: {}, + submitText = confirmationSubmit ?: stringResource(CommonStrings.action_continue), + cancelText = stringResource(CommonStrings.action_cancel), + ) + } + @Composable fun ProgressDialog(progressText: String? = null) { ProgressDialog( @@ -108,10 +141,10 @@ object AsyncViewDefaults { @PreviewsDayNight @Composable -internal fun AsyncViewPreview( - @PreviewParameter(AsyncProvider::class) async: AsyncData, +internal fun AsyncActionViewPreview( + @PreviewParameter(AsyncActionProvider::class) async: AsyncAction, ) = ElementPreview { - AsyncView( + AsyncActionView( async = async, onSuccess = {}, onErrorDismiss = {}, From d0f1a7e3e0ad8eb920327e606dc3cca97c502202 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 18:07:09 +0100 Subject: [PATCH 076/161] Replace `showConfirmationDialog` by `disableAction` `Confirming` state, and remove `force` boolean, we get read the state instead. Also use AsyncActionView. --- .../impl/disable/SecureBackupDisableEvents.kt | 2 +- .../disable/SecureBackupDisablePresenter.kt | 9 ++--- .../impl/disable/SecureBackupDisableState.kt | 1 - .../SecureBackupDisableStateProvider.kt | 4 +-- .../impl/disable/SecureBackupDisableView.kt | 36 ++++++++----------- .../SecureBackupDisablePresenterTest.kt | 28 ++++++--------- 6 files changed, 30 insertions(+), 50 deletions(-) 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 7f19039979..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,7 +23,6 @@ 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.AsyncAction import io.element.android.libraries.architecture.Presenter @@ -46,17 +45,14 @@ class SecureBackupDisablePresenter @Inject constructor( Timber.tag(loggerTagDisable.value).d("backupState: $backupState") 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 = AsyncAction.Uninitialized } } @@ -65,7 +61,6 @@ class SecureBackupDisablePresenter @Inject constructor( return SecureBackupDisableState( backupState = backupState, disableAction = disableAction.value, - showConfirmationDialog = showDialog, appName = buildMeta.applicationName, eventSink = ::handleEvents ) 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 2573812f75..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 @@ -22,7 +22,6 @@ import io.element.android.libraries.matrix.api.encryption.BackupState data class SecureBackupDisableState( val backupState: BackupState, val disableAction: AsyncAction, - val showConfirmationDialog: Boolean, 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 8d23d1178b..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 @@ -24,7 +24,7 @@ open class SecureBackupDisableStateProvider : PreviewParameterProvider get() = sequenceOf( aSecureBackupDisableState(), - aSecureBackupDisableState(showConfirmationDialog = true), + aSecureBackupDisableState(disableAction = AsyncAction.Confirming), aSecureBackupDisableState(disableAction = AsyncAction.Loading), aSecureBackupDisableState(disableAction = AsyncAction.Failure(Exception("Failed to disable"))), // Add other states here @@ -34,11 +34,9 @@ open class SecureBackupDisableStateProvider : PreviewParameterProvider = AsyncAction.Uninitialized, - showConfirmationDialog: Boolean = false, ) = 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 7c00582a0b..b7b104b470 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,11 +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.AsyncAction -import io.element.android.libraries.architecture.AsyncData 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 @@ -53,11 +50,6 @@ fun SecureBackupDisableView( onBackClicked: () -> Unit, modifier: Modifier = Modifier, ) { - LaunchedEffect(state.disableAction) { - if (state.disableAction is AsyncAction.Success) { - onDone() - } - } FlowStepPage( modifier = modifier, onBackClicked = onBackClicked, @@ -68,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 AsyncAction.Failure) { - ErrorDialog( - content = state.disableAction.error.let { it.message ?: it.toString() }, - onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, - ) - } + AsyncActionView( + async = state.disableAction, + confirmingDialog = { + 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 @@ -102,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/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 9453e9e660..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 @@ -43,7 +43,6 @@ class SecureBackupDisablePresenterTest { val initialState = awaitItem() assertThat(initialState.backupState).isEqualTo(BackupState.UNKNOWN) assertThat(initialState.disableAction).isEqualTo(AsyncAction.Uninitialized) - assertThat(initialState.showConfirmationDialog).isFalse() 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,14 +70,12 @@ 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(AsyncAction.Loading::class.java) val finalState = awaitItem() assertThat(finalState.disableAction).isEqualTo(AsyncAction.Success(Unit)) @@ -98,14 +94,12 @@ 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(AsyncAction.Loading::class.java) val errorState = awaitItem() assertThat(errorState.disableAction).isInstanceOf(AsyncAction.Failure::class.java) From b466ade6a17152c656940cc41f15759958366dbb Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 18:10:53 +0100 Subject: [PATCH 077/161] Rename parameter --- .../securebackup/impl/disable/SecureBackupDisableView.kt | 2 +- .../designsystem/components/async/AsyncActionView.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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 b7b104b470..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 @@ -62,7 +62,7 @@ fun SecureBackupDisableView( AsyncActionView( async = state.disableAction, - confirmingDialog = { + confirmationDialog = { SecureBackupDisableConfirmationDialog( onConfirm = { state.eventSink.invoke(SecureBackupDisableEvents.DisableBackup) }, onDismiss = { state.eventSink.invoke(SecureBackupDisableEvents.DismissDialogs) }, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt index fb74ecd975..deae4db2c4 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt @@ -55,7 +55,7 @@ fun AsyncActionView( async = async, onSuccess = onSuccess, onErrorDismiss = onErrorDismiss, - confirmingDialog = { + confirmationDialog = { if (showConfirmationDialog) { AsyncActionViewDefaults.ConfirmationDialog( confirmationText = confirmationText, @@ -80,7 +80,7 @@ fun AsyncActionView( async: AsyncAction, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, - confirmingDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ConfirmationDialog() }, + confirmationDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ConfirmationDialog() }, progressDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ProgressDialog() }, errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, @@ -88,7 +88,7 @@ fun AsyncActionView( ) { when (async) { AsyncAction.Uninitialized -> Unit - AsyncAction.Confirming -> confirmingDialog() + AsyncAction.Confirming -> confirmationDialog() is AsyncAction.Loading -> progressDialog() is AsyncAction.Failure -> { if (onRetry == null) { From 1dc6e5edb344ae23db6ecc5c0b4e92ba8527a15d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 4 Jan 2024 18:23:24 +0100 Subject: [PATCH 078/161] Clean up --- .../impl/configureroom/ConfigureRoomView.kt | 7 +- .../impl/root/CreateRoomRootView.kt | 7 +- .../messages/impl/report/ReportMessageView.kt | 3 +- .../user/editprofile/EditUserProfileView.kt | 7 +- .../rageshake/impl/bugreport/BugReportView.kt | 2 +- .../impl/edit/RoomDetailsEditView.kt | 7 +- .../members/details/RoomMemberDetailsNode.kt | 1 - .../members/details/RoomMemberDetailsView.kt | 7 +- ...cureBackupEnterRecoveryKeyStateProvider.kt | 1 - .../enter/SecureBackupEnterRecoveryKeyView.kt | 2 +- .../components/async/AsyncActionView.kt | 70 +++---------------- 11 files changed, 44 insertions(+), 70 deletions(-) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt index cd6a400c91..c3887ecba6 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/ConfigureRoomView.kt @@ -50,6 +50,7 @@ import io.element.android.features.createroom.impl.R import io.element.android.features.createroom.impl.components.RoomPrivacyOption import io.element.android.libraries.designsystem.components.LabelledTextField 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.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -150,7 +151,11 @@ fun ConfigureRoomView( AsyncActionView( async = state.createRoomAction, - progressText = stringResource(CommonStrings.common_creating_room), + progressDialog = { + AsyncActionViewDefaults.ProgressDialog( + progressText = stringResource(CommonStrings.common_creating_room), + ) + }, onSuccess = { onRoomCreated(it) }, errorMessage = { stringResource(R.string.screen_create_room_error_creating_room) }, onRetry = { state.eventSink(ConfigureRoomEvents.CreateRoom(state.config)) }, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt index cc5e6a237b..59decf9129 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt @@ -39,6 +39,7 @@ import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.createroom.impl.R import io.element.android.features.createroom.impl.components.UserListView 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.icons.CompoundDrawables import io.element.android.libraries.designsystem.preview.ElementPreview @@ -95,7 +96,11 @@ fun CreateRoomRootView( AsyncActionView( async = state.startDmAction, - progressText = stringResource(CommonStrings.common_starting_chat), + progressDialog = { + AsyncActionViewDefaults.ProgressDialog( + progressText = stringResource(CommonStrings.common_starting_chat), + ) + }, onSuccess = { onOpenDM(it) }, errorMessage = { stringResource(R.string.screen_start_chat_error_starting_chat) }, onRetry = { 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 a069fd615b..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 @@ -42,7 +42,6 @@ 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.AsyncAction -import io.element.android.libraries.architecture.AsyncData 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 @@ -66,7 +65,7 @@ fun ReportMessageView( 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/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 8f0add74ce..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 @@ -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 @@ -149,7 +150,11 @@ fun EditUserProfileView( 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/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 34eaf3316a..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 @@ -152,7 +152,7 @@ fun BugReportView( AsyncActionView( async = state.sending, - showProgressDialog = false, + progressDialog = { }, onSuccess = { eventSink(BugReportEvents.ResetAll) onDone() diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt index 1f2761c30a..dca726a77a 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt @@ -61,6 +61,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 @@ -173,7 +174,11 @@ fun RoomDetailsEditView( AsyncActionView( async = state.saveAction, - progressText = stringResource(R.string.screen_room_details_updating_room), + progressDialog = { + AsyncActionViewDefaults.ProgressDialog( + progressText = stringResource(R.string.screen_room_details_updating_room), + ) + }, onSuccess = { onRoomEdited() }, errorMessage = { stringResource(R.string.screen_room_details_edition_error) }, onErrorDismiss = { state.eventSink(RoomDetailsEditEvents.CancelSaveChanges) } 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 9d0973d931..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 @@ -31,7 +31,6 @@ 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.AsyncAction -import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.architecture.NodeInputs import io.element.android.libraries.architecture.inputs import io.element.android.libraries.di.RoomScope 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 3e93d7205a..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 @@ -34,6 +34,7 @@ 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.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 @@ -90,7 +91,11 @@ fun RoomMemberDetailsView( } 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/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 cb8d1cba03..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 @@ -21,7 +21,6 @@ import io.element.android.features.securebackup.impl.setup.views.RecoveryKeyUser 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.AsyncAction -import io.element.android.libraries.architecture.AsyncData open class SecureBackupEnterRecoveryKeyStateProvider : PreviewParameterProvider { override val values: Sequence 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 f18937711c..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 @@ -46,7 +46,7 @@ fun SecureBackupEnterRecoveryKeyView( 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/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt index deae4db2c4..732a3473a3 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncActionView.kt @@ -18,69 +18,29 @@ package io.element.android.libraries.designsystem.components.async import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect -import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter 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 import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.libraries.ui.strings.CommonStrings /** * 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 AsyncActionView( async: AsyncAction, onSuccess: (T) -> Unit, onErrorDismiss: () -> Unit, - showConfirmationDialog: Boolean = false, - confirmationText: String? = null, - confirmationSubmit: String? = null, - onConfirmation: (() -> Unit)? = null, - showProgressDialog: Boolean = true, - progressText: String? = null, - errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, - errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, - onRetry: (() -> Unit)? = null, -) { - AsyncActionView( - async = async, - onSuccess = onSuccess, - onErrorDismiss = onErrorDismiss, - confirmationDialog = { - if (showConfirmationDialog) { - AsyncActionViewDefaults.ConfirmationDialog( - confirmationText = confirmationText, - confirmationSubmit = confirmationSubmit, - onConfirmation = onConfirmation, - ) - } - }, - progressDialog = { - if (showProgressDialog) { - AsyncActionViewDefaults.ProgressDialog(progressText) - } - }, - errorTitle = errorTitle, - errorMessage = errorMessage, - onRetry = onRetry, - ) -} - -@Composable -fun AsyncActionView( - async: AsyncAction, - onSuccess: (T) -> Unit, - onErrorDismiss: () -> Unit, - confirmationDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ConfirmationDialog() }, + confirmationDialog: @Composable () -> Unit = { }, progressDialog: @Composable () -> Unit = { AsyncActionViewDefaults.ProgressDialog() }, errorTitle: @Composable (Throwable) -> String = { ErrorDialogDefaults.title }, errorMessage: @Composable (Throwable) -> String = { it.message ?: it.toString() }, @@ -115,22 +75,6 @@ fun AsyncActionView( } object AsyncActionViewDefaults { - @Composable - fun ConfirmationDialog( - confirmationText: String? = null, - confirmationSubmit: String? = null, - onConfirmation: (() -> Unit)? = null, - onDismiss: (() -> Unit)? = null, - ) { - io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog( - content = confirmationText.orEmpty(), - onSubmitClicked = onConfirmation ?: {}, - onDismiss = onDismiss ?: {}, - submitText = confirmationSubmit ?: stringResource(CommonStrings.action_continue), - cancelText = stringResource(CommonStrings.action_cancel), - ) - } - @Composable fun ProgressDialog(progressText: String? = null) { ProgressDialog( @@ -148,5 +92,13 @@ internal fun AsyncActionViewPreview( async = async, onSuccess = {}, onErrorDismiss = {}, + confirmationDialog = { + ConfirmationDialog( + title = "Confirmation", + content = "Are you sure?", + onSubmitClicked = {}, + onDismiss = {}, + ) + }, ) } From 690a165411485f7ca19bd76f0c6d4ab03c1922cc Mon Sep 17 00:00:00 2001 From: ganfra Date: Thu, 4 Jan 2024 21:27:44 +0100 Subject: [PATCH 079/161] User search : show a loader when fetching results --- .../impl/components/SearchUserBar.kt | 7 +++ .../impl/components/UserListView.kt | 1 + .../impl/userlist/DefaultUserListPresenter.kt | 20 ++++--- .../createroom/impl/userlist/UserListState.kt | 1 + .../impl/userlist/UserListStateProvider.kt | 6 +- .../userlist/DefaultUserListPresenterTests.kt | 10 ++-- .../impl/invite/RoomInviteMembersPresenter.kt | 30 +++++++--- .../impl/invite/RoomInviteMembersState.kt | 1 + .../invite/RoomInviteMembersStateProvider.kt | 6 +- .../impl/invite/RoomInviteMembersView.kt | 8 +++ .../impl/members/RoomMemberListPresenter.kt | 6 +- .../members/RoomMemberListStateProvider.kt | 4 +- .../invite/RoomInviteMembersPresenterTest.kt | 4 +- .../members/RoomMemberListPresenterTests.kt | 4 +- .../theme/components/SearchBar.kt | 31 +++++----- .../roomselect/impl/RoomSelectPresenter.kt | 4 +- .../impl/RoomSelectStateProvider.kt | 2 +- .../impl/RoomSelectPresenterTests.kt | 6 +- .../usersearch/api/UserRepository.kt | 2 +- .../usersearch/api/UserSearchResult.kt | 5 ++ .../usersearch/impl/MatrixUserRepository.kt | 58 +++++++++++-------- 21 files changed, 135 insertions(+), 81 deletions(-) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt index bc562627cc..a9292e5a24 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt @@ -35,6 +35,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp +import io.element.android.libraries.designsystem.components.async.AsyncLoading import io.element.android.libraries.designsystem.theme.components.HorizontalDivider import io.element.android.libraries.designsystem.theme.components.SearchBar import io.element.android.libraries.designsystem.theme.components.SearchBarResultState @@ -49,6 +50,7 @@ import kotlinx.collections.immutable.ImmutableList fun SearchUserBar( query: String, state: SearchBarResultState>, + isSearching: Boolean, selectedUsers: ImmutableList, active: Boolean, isMultiSelectionEnabled: Boolean, @@ -99,6 +101,11 @@ fun SearchUserBar( ) } }, + contentSuffix = { + if (isSearching) { + AsyncLoading() + } + }, resultState = state, resultHandler = { users -> LazyColumn(state = columnState) { diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt index 45d898577f..8d5a3690db 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt @@ -48,6 +48,7 @@ fun UserListView( state = state.searchResults, selectedUsers = state.selectedUsers, active = state.isSearchActive, + isSearching = state.isFetchingSearchResults, isMultiSelectionEnabled = state.isMultiSelectionEnabled, showBackButton = showBackButton, onActiveChanged = { state.eventSink(UserListEvents.OnSearchActiveChanged(it)) }, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt index 867fdc9a60..19a858dd78 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt @@ -34,6 +34,8 @@ import io.element.android.libraries.usersearch.api.UserRepository import io.element.android.libraries.usersearch.api.UserSearchResult import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList +import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.onEach class DefaultUserListPresenter @AssistedInject constructor( @Assisted val args: UserListPresenterArgs, @@ -57,18 +59,21 @@ class DefaultUserListPresenter @AssistedInject constructor( val selectedUsers by userListDataStore.selectedUsers().collectAsState(emptyList()) var searchQuery by rememberSaveable { mutableStateOf("") } var searchResults: SearchBarResultState> by remember { - mutableStateOf(SearchBarResultState.NotSearching()) + mutableStateOf(SearchBarResultState.Empty()) } + var isFetchingSearchResults by remember { mutableStateOf(false) } LaunchedEffect(searchQuery) { - searchResults = SearchBarResultState.NotSearching() - - userRepository.search(searchQuery).collect { + searchResults = SearchBarResultState.Empty() + isFetchingSearchResults = false + userRepository.search(searchQuery).onEach { state -> + isFetchingSearchResults = state.isFetchingSearchResults searchResults = when { - it.isEmpty() -> SearchBarResultState.NoResults() - else -> SearchBarResultState.Results(it.toImmutableList()) + state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Empty() + state.results.isEmpty() && !state.isFetchingSearchResults -> SearchBarResultState.NoResultsFound() + else -> SearchBarResultState.Results(state.results.toImmutableList()) } - } + }.launchIn(this) } return UserListState( @@ -76,6 +81,7 @@ class DefaultUserListPresenter @AssistedInject constructor( searchResults = searchResults, selectedUsers = selectedUsers.toImmutableList(), isSearchActive = isSearchActive, + isFetchingSearchResults = isFetchingSearchResults, selectionMode = args.selectionMode, eventSink = { event -> when (event) { diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt index 60a5bea506..5d59735e46 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt @@ -24,6 +24,7 @@ import kotlinx.collections.immutable.ImmutableList data class UserListState( val searchQuery: String, val searchResults: SearchBarResultState>, + val isFetchingSearchResults: Boolean, val selectedUsers: ImmutableList, val isSearchActive: Boolean, val selectionMode: SelectionMode, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt index 31d1f6953a..ec7fba57b5 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt @@ -51,17 +51,19 @@ open class UserListStateProvider : PreviewParameterProvider { aUserListState().copy( isSearchActive = true, searchQuery = "something-with-no-results", - searchResults = SearchBarResultState.NoResults() + searchResults = SearchBarResultState.NoResultsFound() ), + aUserListState().copy(isSearchActive = true, searchQuery = "someone", selectionMode = SelectionMode.Single), ) } fun aUserListState() = UserListState( isSearchActive = false, searchQuery = "", - searchResults = SearchBarResultState.NotSearching(), + searchResults = SearchBarResultState.Empty(), selectedUsers = persistentListOf(), selectionMode = SelectionMode.Single, + isFetchingSearchResults = false, eventSink = {} ) diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt index a591a7a8e9..7f5eff5c30 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt @@ -55,7 +55,7 @@ class DefaultUserListPresenterTests { assertThat(initialState.isMultiSelectionEnabled).isFalse() assertThat(initialState.isSearchActive).isFalse() assertThat(initialState.selectedUsers).isEmpty() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) } } @@ -76,7 +76,7 @@ class DefaultUserListPresenterTests { assertThat(initialState.isMultiSelectionEnabled).isTrue() assertThat(initialState.isSearchActive).isFalse() assertThat(initialState.selectedUsers).isEmpty() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) } } @@ -131,7 +131,7 @@ class DefaultUserListPresenterTests { val initialState = awaitItem() initialState.eventSink(UserListEvents.UpdateSearchQuery("alice")) - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(userRepository.providedQuery).isEqualTo("alice") skipItems(2) @@ -170,13 +170,13 @@ class DefaultUserListPresenterTests { val initialState = awaitItem() initialState.eventSink(UserListEvents.UpdateSearchQuery("alice")) - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(userRepository.providedQuery).isEqualTo("alice") skipItems(2) // When the results list is empty, the state is set to NoResults userRepository.emitResult(emptyList()) - assertThat(awaitItem().searchResults).isInstanceOf(SearchBarResultState.NoResults::class.java) + assertThat(awaitItem().searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt index cc0886c3af..4cd540bd35 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt @@ -37,6 +37,8 @@ import io.element.android.libraries.usersearch.api.UserRepository import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toImmutableList +import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.withContext import javax.inject.Inject @@ -50,16 +52,22 @@ class RoomInviteMembersPresenter @Inject constructor( override fun present(): RoomInviteMembersState { val roomMembers = remember { mutableStateOf>>(Async.Loading()) } val selectedUsers = remember { mutableStateOf>(persistentListOf()) } - val searchResults = remember { mutableStateOf>>(SearchBarResultState.NotSearching()) } + val searchResults = remember { mutableStateOf>>(SearchBarResultState.Empty()) } var searchQuery by rememberSaveable { mutableStateOf("") } var searchActive by rememberSaveable { mutableStateOf(false) } + var isFetchingSearchResults = rememberSaveable { mutableStateOf(false) } LaunchedEffect(Unit) { fetchMembers(roomMembers) } - LaunchedEffect(searchQuery, roomMembers) { - performSearch(searchResults, roomMembers, selectedUsers, searchQuery) + performSearch( + searchResults = searchResults, + roomMembers = roomMembers, + selectedUsers = selectedUsers, + isFetchingSearchResults = isFetchingSearchResults, + searchQuery = searchQuery + ) } return RoomInviteMembersState( @@ -68,6 +76,7 @@ class RoomInviteMembersPresenter @Inject constructor( searchQuery = searchQuery, isSearchActive = searchActive, searchResults = searchResults.value, + isFetchingSearchResults = isFetchingSearchResults.value, eventSink = { when (it) { is RoomInviteMembersEvents.OnSearchActiveChanged -> { @@ -117,16 +126,19 @@ class RoomInviteMembersPresenter @Inject constructor( searchResults: MutableState>>, roomMembers: MutableState>>, selectedUsers: MutableState>, + isFetchingSearchResults: MutableState, searchQuery: String, ) = withContext(coroutineDispatchers.io) { - searchResults.value = SearchBarResultState.NotSearching() - + searchResults.value = SearchBarResultState.Empty() + isFetchingSearchResults.value = false val joinedMembers = roomMembers.value.dataOrNull().orEmpty() - userRepository.search(searchQuery).collect { + userRepository.search(searchQuery).onEach { state -> + isFetchingSearchResults.value = state.isFetchingSearchResults searchResults.value = when { - it.isEmpty() -> SearchBarResultState.NoResults() - else -> SearchBarResultState.Results(it.map { result -> + state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Empty() + state.results.isEmpty() && !state.isFetchingSearchResults -> SearchBarResultState.NoResultsFound() + else -> SearchBarResultState.Results(state.results.map { result -> val existingMembership = joinedMembers.firstOrNull { j -> j.userId == result.matrixUser.userId }?.membership val isJoined = existingMembership == RoomMembershipState.JOIN val isInvited = existingMembership == RoomMembershipState.INVITE @@ -139,7 +151,7 @@ class RoomInviteMembersPresenter @Inject constructor( ) }.toImmutableList()) } - } + }.launchIn(this) } private suspend fun fetchMembers(roomMembers: MutableState>>) { diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt index 16436debf0..1fb2dc1e78 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt @@ -23,6 +23,7 @@ import kotlinx.collections.immutable.ImmutableList data class RoomInviteMembersState( val canInvite: Boolean, val searchQuery: String, + val isFetchingSearchResults: Boolean, val searchResults: SearchBarResultState>, val selectedUsers: ImmutableList, val isSearchActive: Boolean, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt index f44d518fb5..c9ae8a606a 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt @@ -32,7 +32,7 @@ internal class RoomInviteMembersStateProvider : PreviewParameterProvider> = SearchBarResultState.NotSearching(), + searchResults: SearchBarResultState> = SearchBarResultState.Empty(), selectedUsers: ImmutableList = persistentListOf(), isSearchActive: Boolean = false, + isFetchingSearchResults: Boolean = false, ): RoomInviteMembersState { return RoomInviteMembersState( canInvite = canInvite, @@ -80,6 +81,7 @@ private fun aRoomInviteMembersState( searchResults = searchResults, selectedUsers = selectedUsers, isSearchActive = isSearchActive, + isFetchingSearchResults = isFetchingSearchResults, eventSink = {}, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt index 6c19b45686..73f6de54a8 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt @@ -50,6 +50,7 @@ import io.element.android.libraries.matrix.ui.components.SelectedUsersList import io.element.android.libraries.matrix.ui.model.getAvatarData import io.element.android.libraries.matrix.ui.model.getBestName import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.components.async.AsyncLoading import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList @@ -86,6 +87,7 @@ fun RoomInviteMembersView( RoomInviteMembersSearchBar( modifier = Modifier.fillMaxWidth(), query = state.searchQuery, + isSearching = state.isFetchingSearchResults, selectedUsers = state.selectedUsers, state = state.searchResults, active = state.isSearchActive, @@ -139,6 +141,7 @@ private fun RoomInviteMembersTopBar( private fun RoomInviteMembersSearchBar( query: String, state: SearchBarResultState>, + isSearching: Boolean, selectedUsers: ImmutableList, active: Boolean, onActiveChanged: (Boolean) -> Unit, @@ -167,6 +170,11 @@ private fun RoomInviteMembersSearchBar( }, showBackButton = false, resultState = state, + contentSuffix = { + if (isSearching) { + AsyncLoading() + } + }, resultHandler = { results -> Text( text = stringResource(id = CommonStrings.common_search_results), 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 49ae479d40..e779af5f61 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 @@ -47,7 +47,7 @@ class RoomMemberListPresenter @Inject constructor( var roomMembers by remember { mutableStateOf>(Async.Loading()) } var searchQuery by rememberSaveable { mutableStateOf("") } var searchResults by remember { - mutableStateOf>(SearchBarResultState.NotSearching()) + mutableStateOf>(SearchBarResultState.Empty()) } var isSearchActive by rememberSaveable { mutableStateOf(false) } @@ -71,10 +71,10 @@ class RoomMemberListPresenter @Inject constructor( LaunchedEffect(searchQuery) { withContext(coroutineDispatchers.io) { searchResults = if (searchQuery.isEmpty()) { - SearchBarResultState.NotSearching() + SearchBarResultState.Empty() } else { val results = roomMemberListDataSource.search(searchQuery).groupBy { it.membership } - if (results.isEmpty()) SearchBarResultState.NoResults() + if (results.isEmpty()) SearchBarResultState.NoResultsFound() else SearchBarResultState.Results( RoomMembers( invited = results.getOrDefault(RoomMembershipState.INVITE, emptyList()).toImmutableList(), 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 4954af8efc..f6eefa4385 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 @@ -53,14 +53,14 @@ internal class RoomMemberListStateProvider : PreviewParameterProvider = Async.Uninitialized, - searchResults: SearchBarResultState = SearchBarResultState.NotSearching(), + searchResults: SearchBarResultState = SearchBarResultState.Empty(), ) = RoomMemberListState( roomMembers = roomMembers, searchQuery = "", diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt index 9763ed280b..7ecdccf7f1 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt @@ -63,7 +63,7 @@ internal class RoomInviteMembersPresenterTest { }.test { val initialState = awaitItem() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(initialState.isSearchActive).isFalse() assertThat(initialState.canInvite).isFalse() assertThat(initialState.searchQuery).isEmpty() @@ -115,7 +115,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) val resultState = awaitItem() - assertThat(resultState.searchResults).isInstanceOf(SearchBarResultState.NoResults::class.java) + assertThat(resultState.searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::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 097919a5e1..3a2620cad0 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 @@ -55,7 +55,7 @@ class RoomMemberListPresenterTests { val initialState = awaitItem() assertThat(initialState.roomMembers).isInstanceOf(Async.Loading::class.java) assertThat(initialState.searchQuery).isEmpty() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(initialState.isSearchActive).isFalse() val loadedState = awaitItem() assertThat(loadedState.roomMembers).isInstanceOf(Async.Success::class.java) @@ -92,7 +92,7 @@ class RoomMemberListPresenterTests { val searchQueryUpdatedState = awaitItem() assertThat(searchQueryUpdatedState.searchQuery).isEqualTo("something") val searchSearchResultDelivered = awaitItem() - assertThat(searchSearchResultDelivered.searchResults).isInstanceOf(SearchBarResultState.NoResults::class.java) + assertThat(searchSearchResultDelivered.searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt index 7e208b88d9..c53fbb6cb6 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt @@ -59,7 +59,7 @@ fun SearchBar( modifier: Modifier = Modifier, enabled: Boolean = true, showBackButton: Boolean = true, - resultState: SearchBarResultState = SearchBarResultState.NotSearching(), + resultState: SearchBarResultState = SearchBarResultState.Empty(), shape: Shape = SearchBarDefaults.inputFieldShape, tonalElevation: Dp = SearchBarDefaults.TonalElevation, windowInsets: WindowInsets = SearchBarDefaults.windowInsets, @@ -129,7 +129,7 @@ fun SearchBar( resultHandler(resultState.results) } - is SearchBarResultState.NoResults -> { + is SearchBarResultState.NoResultsFound -> { // No results found, show a message Spacer(Modifier.size(80.dp)) @@ -184,10 +184,10 @@ object ElementSearchBarDefaults { @Immutable sealed interface SearchBarResultState { /** No search results are available yet (e.g. because the user hasn't entered a search term). */ - class NotSearching : SearchBarResultState + class Empty : SearchBarResultState /** The search has completed, but no results were found. */ - class NoResults : SearchBarResultState + class NoResultsFound : SearchBarResultState /** The search has completed, and some matching users were found. */ data class Results(val results: T) : SearchBarResultState @@ -199,7 +199,7 @@ internal fun SearchBarInactivePreview() = ElementThemedPreview { ContentToPrevie @Preview(group = PreviewGroup.Search) @Composable -internal fun SearchBarActiveEmptyQueryPreview() = ElementThemedPreview { +internal fun SearchBarActiveNoneQueryPreview() = ElementThemedPreview { ContentToPreview( query = "", active = true, @@ -231,7 +231,7 @@ internal fun SearchBarActiveWithNoResultsPreview() = ElementThemedPreview { ContentToPreview( query = "search term", active = true, - resultState = SearchBarResultState.NoResults(), + resultState = SearchBarResultState.NoResultsFound(), ) } @@ -257,16 +257,15 @@ internal fun SearchBarActiveWithContentPreview() = ElementThemedPreview { .background(color = Color.Blue) .fillMaxWidth() ) - }, - resultHandler = { - Text( - text = "Results go here", - modifier = Modifier - .background(color = Color.Green) - .fillMaxWidth() - ) } - ) + ) { + Text( + text = "Results go here", + modifier = Modifier + .background(color = Color.Green) + .fillMaxWidth() + ) + } } @OptIn(ExperimentalMaterial3Api::class) @@ -275,7 +274,7 @@ private fun ContentToPreview( query: String = "", active: Boolean = false, showBackButton: Boolean = true, - resultState: SearchBarResultState = SearchBarResultState.NotSearching(), + resultState: SearchBarResultState = SearchBarResultState.Empty(), contentPrefix: @Composable ColumnScope.() -> Unit = {}, contentSuffix: @Composable ColumnScope.() -> Unit = {}, resultHandler: @Composable ColumnScope.(String) -> Unit = {}, diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt index 16cd7b813d..1bc1e8a4b5 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt @@ -51,7 +51,7 @@ class RoomSelectPresenter @AssistedInject constructor( var selectedRooms by remember { mutableStateOf(persistentListOf()) } var query by remember { mutableStateOf("") } var isSearchActive by remember { mutableStateOf(false) } - var results: SearchBarResultState> by remember { mutableStateOf(SearchBarResultState.NotSearching()) } + var results: SearchBarResultState> by remember { mutableStateOf(SearchBarResultState.Empty()) } val summaries by client.roomListService.allRooms.summaries.collectAsState() @@ -64,7 +64,7 @@ class RoomSelectPresenter @AssistedInject constructor( results = if (filteredSummaries.isNotEmpty()) { SearchBarResultState.Results(filteredSummaries) } else { - SearchBarResultState.NoResults() + SearchBarResultState.NoResultsFound() } } diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt index d06e0be6d6..8cc082d702 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt @@ -48,7 +48,7 @@ open class RoomSelectStateProvider : PreviewParameterProvider { } private fun aRoomSelectState( - resultState: SearchBarResultState> = SearchBarResultState.NotSearching(), + resultState: SearchBarResultState> = SearchBarResultState.Empty(), query: String = "", isSearchActive: Boolean = false, selectedRooms: ImmutableList = persistentListOf(), diff --git a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt index 88ae560bb2..9c6e7a0adb 100644 --- a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt +++ b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt @@ -45,11 +45,11 @@ class RoomSelectPresenterTests { }.test { val initialState = awaitItem() assertThat(initialState.selectedRooms).isEmpty() - assertThat(initialState.resultState).isInstanceOf(SearchBarResultState.NotSearching::class.java) + assertThat(initialState.resultState).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(initialState.isSearchActive).isFalse() // Search is run automatically val searchState = awaitItem() - assertThat(searchState.resultState).isInstanceOf(SearchBarResultState.NoResults::class.java) + assertThat(searchState.resultState).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } @@ -85,7 +85,7 @@ class RoomSelectPresenterTests { initialState.eventSink(RoomSelectEvents.UpdateQuery("string not contained")) assertThat(awaitItem().query).isEqualTo("string not contained") - assertThat(awaitItem().resultState).isInstanceOf(SearchBarResultState.NoResults::class.java) + assertThat(awaitItem().resultState).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt index 03e9952c92..9b0af6d2b0 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt @@ -20,5 +20,5 @@ import kotlinx.coroutines.flow.Flow interface UserRepository { - suspend fun search(query: String): Flow> + fun search(query: String): Flow } diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt index e67a7af46f..c3f7b7b966 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt @@ -22,3 +22,8 @@ data class UserSearchResult( val matrixUser: MatrixUser, val isUnresolved: Boolean = false, ) + +data class UserSearchResultsState( + val results: List, + val isFetchingSearchResults: Boolean +) diff --git a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt index 0714528836..ca06a6e83a 100644 --- a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt +++ b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt @@ -25,6 +25,7 @@ import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.usersearch.api.UserListDataSource import io.element.android.libraries.usersearch.api.UserRepository import io.element.android.libraries.usersearch.api.UserSearchResult +import io.element.android.libraries.usersearch.api.UserSearchResultsState import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow @@ -36,36 +37,45 @@ class MatrixUserRepository @Inject constructor( private val dataSource: UserListDataSource ) : UserRepository { - override suspend fun search(query: String): Flow> = flow { - // If the search term is a MXID that's not ours, we'll show a 'fake' result for that user, then update it when we get search results. + override fun search(query: String): Flow = flow { val shouldQueryProfile = MatrixPatterns.isUserId(query) && !client.isMe(UserId(query)) - if (shouldQueryProfile) { - emit(listOf(UserSearchResult(MatrixUser(UserId(query))))) + val shouldFetchSearchResults = query.length >= MINIMUM_SEARCH_LENGTH + // If the search term is a MXID that's not ours, we'll show a 'fake' result for that user, then update it when we get search results. + val fakeSearchResult = if (shouldQueryProfile) { + UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true) + } else { + null } - - if (query.length >= MINIMUM_SEARCH_LENGTH) { - // Debounce - delay(DEBOUNCE_TIME_MILLIS) - - val results = dataSource - .search(query, MAXIMUM_SEARCH_RESULTS) - .filter { !client.isMe(it.userId) } - .map { UserSearchResult(it) } - .toMutableList() - - // If the query is another user's MXID and the result doesn't contain that user ID, query the profile information explicitly - if (shouldQueryProfile && results.none { it.matrixUser.userId.value == query }) { - results.add( - 0, - dataSource.getProfile(UserId(query)) - ?.let { UserSearchResult(it) } - ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)) - } - + if (shouldQueryProfile || shouldFetchSearchResults) { + emit(UserSearchResultsState(isFetchingSearchResults = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) + } + if (shouldFetchSearchResults) { + val results = fetchSearchResults(query, shouldQueryProfile) emit(results) } } + private suspend fun fetchSearchResults(query: String, shouldQueryProfile: Boolean): UserSearchResultsState { + // Debounce + delay(DEBOUNCE_TIME_MILLIS) + val results = dataSource + .search(query, MAXIMUM_SEARCH_RESULTS) + .filter { !client.isMe(it.userId) } + .map { UserSearchResult(it) } + .toMutableList() + + // If the query is another user's MXID and the result doesn't contain that user ID, query the profile information explicitly + if (shouldQueryProfile && results.none { it.matrixUser.userId.value == query }) { + results.add( + 0, + dataSource.getProfile(UserId(query)) + ?.let { UserSearchResult(it) } + ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)) + } + + return UserSearchResultsState(results = results, isFetchingSearchResults = false) + } + companion object { private const val DEBOUNCE_TIME_MILLIS = 250L private const val MINIMUM_SEARCH_LENGTH = 3 From 9cfc5a5c80684a53f240ad51c15331036661941c Mon Sep 17 00:00:00 2001 From: ElementBot Date: Fri, 5 Jan 2024 08:13:36 +0000 Subject: [PATCH 080/161] Update screenshots --- ...View_null_AsyncActionView-Day_0_null_0,NEXUS_5,1.0,en].png} | 0 ...nView_null_AsyncActionView-Day_0_null_1,NEXUS_5,1.0,en].png | 3 +++ ...View_null_AsyncActionView-Day_0_null_2,NEXUS_5,1.0,en].png} | 0 ...View_null_AsyncActionView-Day_0_null_3,NEXUS_5,1.0,en].png} | 0 ...View_null_AsyncActionView-Day_0_null_4,NEXUS_5,1.0,en].png} | 0 ...ew_null_AsyncActionView-Night_1_null_0,NEXUS_5,1.0,en].png} | 0 ...iew_null_AsyncActionView-Night_1_null_1,NEXUS_5,1.0,en].png | 3 +++ ...ew_null_AsyncActionView-Night_1_null_2,NEXUS_5,1.0,en].png} | 0 ...ew_null_AsyncActionView-Night_1_null_3,NEXUS_5,1.0,en].png} | 0 ...ew_null_AsyncActionView-Night_1_null_4,NEXUS_5,1.0,en].png} | 0 10 files changed, 6 insertions(+) rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_0,NEXUS_5,1.0,en].png} (100%) create mode 100644 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 rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Day_0_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_0,NEXUS_5,1.0,en].png} (100%) create mode 100644 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 rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[l.designsystem.components.async_AsyncActionView_null_AsyncActionView-Night_1_null_4,NEXUS_5,1.0,en].png} (100%) 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 From d4c41e38cc1056eadae24337e5aefeb5c8dd3076 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 5 Jan 2024 09:31:54 +0100 Subject: [PATCH 081/161] Fix flaky test using deterministic `awaitFirstItem` instead of `awaitLastSequentialItem` --- .../logout/impl/LogoutPresenterTest.kt | 21 ++++++++++--------- .../DefaultDirectLogoutPresenterTest.kt | 19 ++++++++++------- 2 files changed, 22 insertions(+), 18 deletions(-) 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 89db94cf1d..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,6 +18,7 @@ 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.AsyncAction @@ -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,7 +50,7 @@ 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() @@ -117,7 +117,7 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) @@ -133,7 +133,7 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) @@ -156,15 +156,13 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) val loadingState = awaitItem() assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) - skipItems(1) val errorState = awaitItem() assertThat(errorState.logoutAction).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(LogoutEvents.CloseDialogs) @@ -184,15 +182,13 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) confirmationState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = false)) val loadingState = awaitItem() assertThat(loadingState.logoutAction).isInstanceOf(AsyncAction.Loading::class.java) - skipItems(1) val errorState = awaitItem() assertThat(errorState.logoutAction).isEqualTo(AsyncAction.Failure(A_THROWABLE)) errorState.eventSink.invoke(LogoutEvents.Logout(ignoreSdkError = true)) @@ -203,6 +199,11 @@ class LogoutPresenterTest { } } + 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 b2cef2f28d..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,6 +18,7 @@ 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 @@ -31,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 @@ -48,7 +48,7 @@ class DefaultDirectLogoutPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val initialState = awaitLastSequentialItem() + val initialState = awaitFirstItem() assertThat(initialState.canDoDirectSignOut).isTrue() assertThat(initialState.logoutAction).isEqualTo(AsyncAction.Uninitialized) } @@ -98,7 +98,7 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) @@ -114,7 +114,7 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) @@ -137,8 +137,7 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) @@ -164,8 +163,7 @@ 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.logoutAction).isEqualTo(AsyncAction.Confirming) @@ -182,6 +180,11 @@ class DefaultDirectLogoutPresenterTest { } } + private suspend fun ReceiveTurbine.awaitFirstItem(): T { + skipItems(1) + return awaitItem() + } + private fun createDefaultDirectLogoutPresenter( matrixClient: MatrixClient = FakeMatrixClient(), encryptionService: EncryptionService = FakeEncryptionService(), From 936127c682566a5e6d0eb8159c647fe5fec02012 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Fri, 5 Jan 2024 12:11:49 +0100 Subject: [PATCH 082/161] Fix crashes for extremely long messages with no line breaks (#2163) --- changelog.d/2105.bugfix | 1 + .../MessageSummaryFormatterImpl.kt | 8 +- .../impl/DefaultRoomLastMessageFormatter.kt | 75 ++++++++++--------- 3 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 changelog.d/2105.bugfix 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/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/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? { From 0e3f0ac6b52c7b86b7f2b281f2c6acd83ee009b7 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Fri, 5 Jan 2024 12:40:10 +0100 Subject: [PATCH 083/161] Trim whitespace at the end of messages (#2169) Trim whitespace at the end of messages --- changelog.d/2099.bugfix | 1 + .../TimelineItemContentMessageFactory.kt | 64 +++++++++++-------- .../matrix/ui/messages/ToHtmlDocument.kt | 6 +- 3 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 changelog.d/2099.bugfix 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/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/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 { From 00c27ffafc53f13c4b1105aa9d8b61568529d15d Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Fri, 5 Jan 2024 13:40:25 +0100 Subject: [PATCH 084/161] Use `SubcomposeLayout` for `ContentAvoidingLayout` (#2171) Use `SubcomposeLayout` for `ContentAvoidingLayout` --- changelog.d/2155.bugfix | 1 + .../components/layout/ContentAvoidingLayout.kt | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 changelog.d/2155.bugfix 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/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 From 60d015596fe90c06f81708ae649d5c5edd53825e Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 13:44:59 +0100 Subject: [PATCH 085/161] MatrixUserRepo : fix tests --- .../userlist/DefaultUserListPresenterTests.kt | 38 +++++++++++++------ .../invite/RoomInviteMembersPresenterTest.kt | 13 ++++--- .../usersearch/api/UserRepository.kt | 2 +- .../usersearch/api/UserSearchResult.kt | 4 +- .../usersearch/impl/MatrixUserRepository.kt | 10 ++--- .../usersearch/test/FakeUserRepository.kt | 8 ++-- 6 files changed, 45 insertions(+), 30 deletions(-) diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt index 7f5eff5c30..8b0caf7d66 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt @@ -24,6 +24,7 @@ import io.element.android.libraries.designsystem.theme.components.SearchBarResul import io.element.android.libraries.matrix.ui.components.aMatrixUser import io.element.android.libraries.matrix.ui.components.aMatrixUserList import io.element.android.libraries.usersearch.api.UserSearchResult +import io.element.android.libraries.usersearch.api.UserSearchResults import io.element.android.libraries.usersearch.test.FakeUserRepository import io.element.android.tests.testutils.WarmUpRule import kotlinx.collections.immutable.persistentListOf @@ -136,20 +137,33 @@ class DefaultUserListPresenterTests { skipItems(2) // When the user repository emits a result, it's copied to the state - userRepository.emitResult(listOf(UserSearchResult(aMatrixUser()))) - assertThat(awaitItem().searchResults).isEqualTo( - SearchBarResultState.Results( - persistentListOf(UserSearchResult(aMatrixUser())) - ) + val result = UserSearchResults( + results = listOf(UserSearchResult(aMatrixUser())), + isFetchingSearchResults = false, ) - + userRepository.emitResult(result) + awaitItem().also { state -> + assertThat(state.searchResults).isEqualTo( + SearchBarResultState.Results( + persistentListOf(UserSearchResult(aMatrixUser())) + ) + ) + assertThat(state.isFetchingSearchResults).isFalse() + } // When the user repository emits another result, it replaces the previous value - userRepository.emitResult(aMatrixUserList().map { UserSearchResult(it) }) - assertThat(awaitItem().searchResults).isEqualTo( - SearchBarResultState.Results( - aMatrixUserList().map { UserSearchResult(it) } - ) + val newResult = UserSearchResults( + results = aMatrixUserList().map { UserSearchResult(it) }, + isFetchingSearchResults = false, ) + userRepository.emitResult(newResult) + awaitItem().also { state -> + assertThat(state.searchResults).isEqualTo( + SearchBarResultState.Results( + aMatrixUserList().map { UserSearchResult(it) } + ) + ) + assertThat(state.isFetchingSearchResults).isFalse() + } } } @@ -175,7 +189,7 @@ class DefaultUserListPresenterTests { skipItems(2) // When the results list is empty, the state is set to NoResults - userRepository.emitResult(emptyList()) + userRepository.emitResult(UserSearchResults(results = emptyList(), isFetchingSearchResults = false)) assertThat(awaitItem().searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt index 7ecdccf7f1..3c801d9581 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt @@ -35,6 +35,7 @@ import io.element.android.libraries.matrix.test.room.FakeMatrixRoom import io.element.android.libraries.matrix.ui.components.aMatrixUser import io.element.android.libraries.matrix.ui.components.aMatrixUserList import io.element.android.libraries.usersearch.api.UserSearchResult +import io.element.android.libraries.usersearch.api.UserSearchResults import io.element.android.libraries.usersearch.test.FakeUserRepository import io.element.android.tests.testutils.WarmUpRule import io.element.android.tests.testutils.testCoroutineDispatchers @@ -111,7 +112,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(emptyList()) + repository.emitResult(UserSearchResults(results = emptyList())) skipItems(1) val resultState = awaitItem() @@ -137,7 +138,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(aMatrixUserList().map { UserSearchResult(it) }) + repository.emitResult(UserSearchResults(results =aMatrixUserList().map { UserSearchResult(it) })) skipItems(1) val resultState = awaitItem() @@ -189,7 +190,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(aMatrixUserList().map { UserSearchResult(it) }) + repository.emitResult(UserSearchResults(results =aMatrixUserList().map { UserSearchResult(it) })) skipItems(1) val resultState = awaitItem() @@ -250,7 +251,7 @@ internal class RoomInviteMembersPresenterTest { assertThat(repository.providedQuery).isEqualTo("some query") val unresolvedUser = UserSearchResult(aMatrixUser(id = A_USER_ID.value), isUnresolved = true) - repository.emitResult(listOf(unresolvedUser) + aMatrixUserList().map { UserSearchResult(it) }) + repository.emitResult(UserSearchResults(results = listOf(unresolvedUser) + aMatrixUserList().map { UserSearchResult(it) })) skipItems(1) val resultState = awaitItem() @@ -318,7 +319,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult((aMatrixUserList() + selectedUser).map { UserSearchResult(it) }) + repository.emitResult(UserSearchResults(results = (aMatrixUserList() + selectedUser).map { UserSearchResult(it) })) skipItems(2) val resultState = awaitItem() @@ -358,7 +359,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult((aMatrixUserList() + selectedUser).map { UserSearchResult(it) }) + repository.emitResult(UserSearchResults(results =(aMatrixUserList() + selectedUser).map { UserSearchResult(it) })) skipItems(2) // And then a user is toggled diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt index 9b0af6d2b0..4108788cff 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt @@ -20,5 +20,5 @@ import kotlinx.coroutines.flow.Flow interface UserRepository { - fun search(query: String): Flow + fun search(query: String): Flow } diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt index c3f7b7b966..95ede55f0c 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt @@ -23,7 +23,7 @@ data class UserSearchResult( val isUnresolved: Boolean = false, ) -data class UserSearchResultsState( +data class UserSearchResults( val results: List, - val isFetchingSearchResults: Boolean + val isFetchingSearchResults: Boolean = false, ) diff --git a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt index ca06a6e83a..431f452cd9 100644 --- a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt +++ b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt @@ -25,7 +25,7 @@ import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.usersearch.api.UserListDataSource import io.element.android.libraries.usersearch.api.UserRepository import io.element.android.libraries.usersearch.api.UserSearchResult -import io.element.android.libraries.usersearch.api.UserSearchResultsState +import io.element.android.libraries.usersearch.api.UserSearchResults import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow @@ -37,7 +37,7 @@ class MatrixUserRepository @Inject constructor( private val dataSource: UserListDataSource ) : UserRepository { - override fun search(query: String): Flow = flow { + override fun search(query: String): Flow = flow { val shouldQueryProfile = MatrixPatterns.isUserId(query) && !client.isMe(UserId(query)) val shouldFetchSearchResults = query.length >= MINIMUM_SEARCH_LENGTH // If the search term is a MXID that's not ours, we'll show a 'fake' result for that user, then update it when we get search results. @@ -47,7 +47,7 @@ class MatrixUserRepository @Inject constructor( null } if (shouldQueryProfile || shouldFetchSearchResults) { - emit(UserSearchResultsState(isFetchingSearchResults = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) + emit(UserSearchResults(isFetchingSearchResults = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) } if (shouldFetchSearchResults) { val results = fetchSearchResults(query, shouldQueryProfile) @@ -55,7 +55,7 @@ class MatrixUserRepository @Inject constructor( } } - private suspend fun fetchSearchResults(query: String, shouldQueryProfile: Boolean): UserSearchResultsState { + private suspend fun fetchSearchResults(query: String, shouldQueryProfile: Boolean): UserSearchResults { // Debounce delay(DEBOUNCE_TIME_MILLIS) val results = dataSource @@ -73,7 +73,7 @@ class MatrixUserRepository @Inject constructor( ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)) } - return UserSearchResultsState(results = results, isFetchingSearchResults = false) + return UserSearchResults(results = results, isFetchingSearchResults = false) } companion object { diff --git a/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt b/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt index 0911d86b36..e21c48a48b 100644 --- a/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt +++ b/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt @@ -17,7 +17,7 @@ package io.element.android.libraries.usersearch.test import io.element.android.libraries.usersearch.api.UserRepository -import io.element.android.libraries.usersearch.api.UserSearchResult +import io.element.android.libraries.usersearch.api.UserSearchResults import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableSharedFlow @@ -26,14 +26,14 @@ class FakeUserRepository : UserRepository { var providedQuery: String? = null private set - private val flow = MutableSharedFlow>() + private val flow = MutableSharedFlow() - override suspend fun search(query: String): Flow> { + override fun search(query: String): Flow { providedQuery = query return flow } - suspend fun emitResult(result: List) { + suspend fun emitResult(result: UserSearchResults) { flow.emit(result) } From 4e06ccd610e26ddef92a37d886975d9a65c64010 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 13:53:02 +0100 Subject: [PATCH 086/161] RoomInviteMembers : add small tests --- .../invite/RoomInviteMembersStateProvider.kt | 11 +++++++++ .../invite/RoomInviteMembersPresenterTest.kt | 23 +++++++++++-------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt index c9ae8a606a..e7b0ba3397 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt @@ -64,6 +64,17 @@ internal class RoomInviteMembersStateProvider : PreviewParameterProvider + assertThat(state.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(state.isFetchingSearchResults).isTrue() + } + repository.emitResult(UserSearchResults(results = emptyList(), isFetchingSearchResults = false)) + consumeItemsUntilPredicate { !it.isFetchingSearchResults }.last().also { state -> + assertThat(state.searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) + assertThat(state.isFetchingSearchResults).isFalse() + } } } From fbd05336a027d4e9a1fa3242b1d9f582546f9b63 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 13:56:59 +0100 Subject: [PATCH 087/161] Fix detekt --- .../roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt index f2a875b956..fb36722f59 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt @@ -38,7 +38,6 @@ import io.element.android.libraries.usersearch.api.UserSearchResult import io.element.android.libraries.usersearch.api.UserSearchResults import io.element.android.libraries.usersearch.test.FakeUserRepository import io.element.android.tests.testutils.WarmUpRule -import io.element.android.tests.testutils.awaitLastSequentialItem import io.element.android.tests.testutils.consumeItemsUntilPredicate import io.element.android.tests.testutils.testCoroutineDispatchers import kotlinx.collections.immutable.ImmutableList From d539c1f38198ec7d216bbfcecac46275ff6ac071 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 14:00:25 +0100 Subject: [PATCH 088/161] Add changelog --- changelog.d/2172.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/2172.bugfix diff --git a/changelog.d/2172.bugfix b/changelog.d/2172.bugfix new file mode 100644 index 0000000000..14f34666b9 --- /dev/null +++ b/changelog.d/2172.bugfix @@ -0,0 +1 @@ +Fix no indication that user list is loading when inviting to room. From 4135b3381b132ab855043491bc8ff4daf1c39846 Mon Sep 17 00:00:00 2001 From: ElementBot Date: Fri, 5 Jan 2024 13:10:32 +0000 Subject: [PATCH 089/161] Update screenshots --- ...stView_null_UserListView-Day-2_3_null_8,NEXUS_5,1.0,en].png | 3 +++ ...View_null_UserListView-Night-2_4_null_8,NEXUS_5,1.0,en].png | 3 +++ ...s_null_RoomInviteMembers-Day-1_2_null_7,NEXUS_5,1.0,en].png | 3 +++ ...null_RoomInviteMembers-Night-1_3_null_7,NEXUS_5,1.0,en].png | 3 +++ ...hviews_SearchBarActiveNoneQuery_0_null,NEXUS_5,1.0,en].png} | 0 5 files changed, 12 insertions(+) create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_8,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_8,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_7,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_7,NEXUS_5,1.0,en].png rename tests/uitests/src/test/snapshots/images/{ui_S_t[l.designsystem.theme.components_SearchBarActiveEmptyQuery_null_Searchviews_SearchBarActiveEmptyQuery_0_null,NEXUS_5,1.0,en].png => ui_S_t[l.designsystem.theme.components_SearchBarActiveNoneQuery_null_Searchviews_SearchBarActiveNoneQuery_0_null,NEXUS_5,1.0,en].png} (100%) diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_8,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_8,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..d81d496d15 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Day-2_3_null_8,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4731f36d3ee1331c0767ad27d4286feca266deabfd55960a89b0e823925b30f2 +size 7646 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_8,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_8,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..573ab912c2 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.createroom.impl.components_UserListView_null_UserListView-Night-2_4_null_8,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae2119fa8d67dc6787a3cf86ada1259a4ff941d1d9a55936d5ee84e71e42ac72 +size 7217 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_7,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_7,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..d7964f155e --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Day-1_2_null_7,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:62baff22557bc9b130c87b64b45a53b0209390ecfe11d16e1b31868a5a264cf3 +size 31956 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_7,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_7,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..ee60e0fc83 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomdetails.impl.invite_RoomInviteMembers_null_RoomInviteMembers-Night-1_3_null_7,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b5645d81ef1ed73241ec2183f8d5b4cf4cd7510fc8804a26719842e8ed4bc7f +size 29891 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.theme.components_SearchBarActiveEmptyQuery_null_Searchviews_SearchBarActiveEmptyQuery_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.theme.components_SearchBarActiveNoneQuery_null_Searchviews_SearchBarActiveNoneQuery_0_null,NEXUS_5,1.0,en].png similarity index 100% rename from tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.theme.components_SearchBarActiveEmptyQuery_null_Searchviews_SearchBarActiveEmptyQuery_0_null,NEXUS_5,1.0,en].png rename to tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.theme.components_SearchBarActiveNoneQuery_null_Searchviews_SearchBarActiveNoneQuery_0_null,NEXUS_5,1.0,en].png From a790cca1b9460365f36a95b43a72589411a9aa65 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 15:12:31 +0100 Subject: [PATCH 090/161] Fix MatrixUserRepositoryTest --- .../usersearch/impl/MatrixUserRepository.kt | 2 +- .../impl/MatrixUserRepositoryTest.kt | 45 ++++++++++++++----- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt index 431f452cd9..02a03f8be4 100644 --- a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt +++ b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt @@ -42,7 +42,7 @@ class MatrixUserRepository @Inject constructor( val shouldFetchSearchResults = query.length >= MINIMUM_SEARCH_LENGTH // If the search term is a MXID that's not ours, we'll show a 'fake' result for that user, then update it when we get search results. val fakeSearchResult = if (shouldQueryProfile) { - UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true) + UserSearchResult(MatrixUser(UserId(query))) } else { null } diff --git a/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt b/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt index 621274bef5..0ddf58e8aa 100644 --- a/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt +++ b/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt @@ -54,7 +54,14 @@ internal class MatrixUserRepositoryTest { val result = repository.search("some query") result.test { - assertThat(awaitItem()).isEmpty() + awaitItem().also { + assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.results).isEmpty() + } + awaitItem().also { + assertThat(it.isFetchingSearchResults).isFalse() + assertThat(it.results).isEmpty() + } awaitComplete() } } @@ -68,7 +75,14 @@ internal class MatrixUserRepositoryTest { val result = repository.search("some query") result.test { - assertThat(awaitItem()).isEqualTo(aMatrixUserList().toUserSearchResults()) + awaitItem().also { + assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.results).isEmpty() + } + awaitItem().also { + assertThat(it.isFetchingSearchResults).isFalse() + assertThat(it.results).isEqualTo(aMatrixUserList().toUserSearchResults()) + } awaitComplete() } } @@ -81,9 +95,11 @@ internal class MatrixUserRepositoryTest { val result = repository.search(A_USER_ID.value) result.test { - assertThat(awaitItem()).isEqualTo(listOf(placeholderResult())) - skipItems(1) - awaitComplete() + awaitItem().also { + assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.results).isEqualTo(listOf(placeholderResult())) + } + cancelAndConsumeRemainingEvents() } } @@ -95,8 +111,11 @@ internal class MatrixUserRepositoryTest { val result = repository.search(SESSION_ID.value) result.test { - assertThat(awaitItem()).isEmpty() - awaitComplete() + awaitItem().also { + assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.results).isEmpty() + } + cancelAndConsumeRemainingEvents() } } @@ -110,7 +129,8 @@ internal class MatrixUserRepositoryTest { val result = repository.search("some text") result.test { - assertThat(awaitItem()).isEqualTo(aMatrixUserList().toUserSearchResults()) + skipItems(1) + assertThat(awaitItem().results).isEqualTo(aMatrixUserList().toUserSearchResults()) awaitComplete() } } @@ -126,7 +146,7 @@ internal class MatrixUserRepositoryTest { result.test { skipItems(1) - assertThat(awaitItem()).isEqualTo(searchResults.toUserSearchResults()) + assertThat(awaitItem().results).isEqualTo(searchResults.toUserSearchResults()) awaitComplete() } } @@ -145,7 +165,7 @@ internal class MatrixUserRepositoryTest { result.test { skipItems(1) - assertThat(awaitItem()).isEqualTo((listOf(userProfile) + searchResults).toUserSearchResults()) + assertThat(awaitItem().results).isEqualTo((listOf(userProfile) + searchResults).toUserSearchResults()) awaitComplete() } } @@ -163,7 +183,8 @@ internal class MatrixUserRepositoryTest { val result = repository.search(SESSION_ID.value) result.test { - assertThat(awaitItem()).isEqualTo(searchResults.toUserSearchResults()) + skipItems(1) + assertThat(awaitItem().results).isEqualTo(searchResults.toUserSearchResults()) awaitComplete() } } @@ -181,7 +202,7 @@ internal class MatrixUserRepositoryTest { result.test { skipItems(1) - assertThat(awaitItem()).isEqualTo(listOf(placeholderResult(isUnresolved = true)) + searchResults.toUserSearchResults()) + assertThat(awaitItem().results).isEqualTo(listOf(placeholderResult(isUnresolved = true)) + searchResults.toUserSearchResults()) awaitComplete() } } From dbfa9b0dc6e51f198d84f04f7f306e0a2d705eac Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 15:28:18 +0100 Subject: [PATCH 091/161] Rename UserSearchResults as UserSearchResultState --- .../userlist/DefaultUserListPresenterTests.kt | 12 +++--- .../invite/RoomInviteMembersPresenterTest.kt | 38 +++++++++++++++---- .../usersearch/api/UserRepository.kt | 2 +- .../usersearch/api/UserSearchResult.kt | 4 +- .../usersearch/impl/MatrixUserRepository.kt | 10 ++--- .../usersearch/test/FakeUserRepository.kt | 10 ++--- 6 files changed, 49 insertions(+), 27 deletions(-) diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt index 8b0caf7d66..219a252b7b 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt @@ -24,7 +24,7 @@ import io.element.android.libraries.designsystem.theme.components.SearchBarResul import io.element.android.libraries.matrix.ui.components.aMatrixUser import io.element.android.libraries.matrix.ui.components.aMatrixUserList import io.element.android.libraries.usersearch.api.UserSearchResult -import io.element.android.libraries.usersearch.api.UserSearchResults +import io.element.android.libraries.usersearch.api.UserSearchResultState import io.element.android.libraries.usersearch.test.FakeUserRepository import io.element.android.tests.testutils.WarmUpRule import kotlinx.collections.immutable.persistentListOf @@ -137,11 +137,11 @@ class DefaultUserListPresenterTests { skipItems(2) // When the user repository emits a result, it's copied to the state - val result = UserSearchResults( + val result = UserSearchResultState( results = listOf(UserSearchResult(aMatrixUser())), isFetchingSearchResults = false, ) - userRepository.emitResult(result) + userRepository.emitState(result) awaitItem().also { state -> assertThat(state.searchResults).isEqualTo( SearchBarResultState.Results( @@ -151,11 +151,11 @@ class DefaultUserListPresenterTests { assertThat(state.isFetchingSearchResults).isFalse() } // When the user repository emits another result, it replaces the previous value - val newResult = UserSearchResults( + val newResult = UserSearchResultState( results = aMatrixUserList().map { UserSearchResult(it) }, isFetchingSearchResults = false, ) - userRepository.emitResult(newResult) + userRepository.emitState(newResult) awaitItem().also { state -> assertThat(state.searchResults).isEqualTo( SearchBarResultState.Results( @@ -189,7 +189,7 @@ class DefaultUserListPresenterTests { skipItems(2) // When the results list is empty, the state is set to NoResults - userRepository.emitResult(UserSearchResults(results = emptyList(), isFetchingSearchResults = false)) + userRepository.emitState(UserSearchResultState(results = emptyList(), isFetchingSearchResults = false)) assertThat(awaitItem().searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt index fb36722f59..60ba78c725 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt @@ -29,13 +29,14 @@ import io.element.android.libraries.designsystem.theme.components.SearchBarResul 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.RoomMembershipState +import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.test.A_USER_ID import io.element.android.libraries.matrix.test.A_USER_ID_2 import io.element.android.libraries.matrix.test.room.FakeMatrixRoom import io.element.android.libraries.matrix.ui.components.aMatrixUser import io.element.android.libraries.matrix.ui.components.aMatrixUserList import io.element.android.libraries.usersearch.api.UserSearchResult -import io.element.android.libraries.usersearch.api.UserSearchResults +import io.element.android.libraries.usersearch.api.UserSearchResultState import io.element.android.libraries.usersearch.test.FakeUserRepository import io.element.android.tests.testutils.WarmUpRule import io.element.android.tests.testutils.consumeItemsUntilPredicate @@ -109,12 +110,12 @@ internal class RoomInviteMembersPresenterTest { val initialState = awaitItem() initialState.eventSink(RoomInviteMembersEvents.UpdateSearchQuery("some query")) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(UserSearchResults(results = emptyList(), isFetchingSearchResults = true)) + repository.emitState(UserSearchResultState(results = emptyList(), isFetchingSearchResults = true)) consumeItemsUntilPredicate { it.isFetchingSearchResults }.last().also { state -> assertThat(state.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) assertThat(state.isFetchingSearchResults).isTrue() } - repository.emitResult(UserSearchResults(results = emptyList(), isFetchingSearchResults = false)) + repository.emitState(results = emptyList(), isFetchingSearchResults = false) consumeItemsUntilPredicate { !it.isFetchingSearchResults }.last().also { state -> assertThat(state.searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) assertThat(state.isFetchingSearchResults).isFalse() @@ -140,7 +141,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(UserSearchResults(results =aMatrixUserList().map { UserSearchResult(it) })) + repository.emitStateWithUsers(users = aMatrixUserList()) skipItems(1) val resultState = awaitItem() @@ -192,7 +193,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(UserSearchResults(results =aMatrixUserList().map { UserSearchResult(it) })) + repository.emitStateWithUsers(users = aMatrixUserList()) skipItems(1) val resultState = awaitItem() @@ -253,7 +254,7 @@ internal class RoomInviteMembersPresenterTest { assertThat(repository.providedQuery).isEqualTo("some query") val unresolvedUser = UserSearchResult(aMatrixUser(id = A_USER_ID.value), isUnresolved = true) - repository.emitResult(UserSearchResults(results = listOf(unresolvedUser) + aMatrixUserList().map { UserSearchResult(it) })) + repository.emitState(listOf(unresolvedUser) + aMatrixUserList().map { UserSearchResult(it) }) skipItems(1) val resultState = awaitItem() @@ -321,7 +322,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(UserSearchResults(results = (aMatrixUserList() + selectedUser).map { UserSearchResult(it) })) + repository.emitStateWithUsers(users = aMatrixUserList() + selectedUser) skipItems(2) val resultState = awaitItem() @@ -361,7 +362,7 @@ internal class RoomInviteMembersPresenterTest { skipItems(1) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitResult(UserSearchResults(results =(aMatrixUserList() + selectedUser).map { UserSearchResult(it) })) + repository.emitStateWithUsers(users = aMatrixUserList() + selectedUser) skipItems(2) // And then a user is toggled @@ -384,6 +385,27 @@ internal class RoomInviteMembersPresenterTest { } } + private suspend fun FakeUserRepository.emitStateWithUsers( + users: List, + isFetchingSearchResults: Boolean = false + ) { + emitState( + results = users.map { UserSearchResult(it) }, + isFetchingSearchResults = isFetchingSearchResults, + ) + } + + private suspend fun FakeUserRepository.emitState( + results: List, + isFetchingSearchResults: Boolean = false + ) { + val state = UserSearchResultState( + results = results, + isFetchingSearchResults = isFetchingSearchResults + ) + emitState(state) + } + private fun TestScope.createDataSource( matrixRoom: MatrixRoom = aMatrixRoom().apply { givenRoomMembersState(MatrixRoomMembersState.Ready(aRoomMemberList())) diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt index 4108788cff..ed019fc5a5 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserRepository.kt @@ -20,5 +20,5 @@ import kotlinx.coroutines.flow.Flow interface UserRepository { - fun search(query: String): Flow + fun search(query: String): Flow } diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt index 95ede55f0c..ebdfb7fedb 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt @@ -23,7 +23,7 @@ data class UserSearchResult( val isUnresolved: Boolean = false, ) -data class UserSearchResults( +data class UserSearchResultState( val results: List, - val isFetchingSearchResults: Boolean = false, + val isFetchingSearchResults: Boolean, ) diff --git a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt index 02a03f8be4..7ac3ec8380 100644 --- a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt +++ b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt @@ -25,7 +25,7 @@ import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.usersearch.api.UserListDataSource import io.element.android.libraries.usersearch.api.UserRepository import io.element.android.libraries.usersearch.api.UserSearchResult -import io.element.android.libraries.usersearch.api.UserSearchResults +import io.element.android.libraries.usersearch.api.UserSearchResultState import kotlinx.coroutines.delay import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.flow @@ -37,7 +37,7 @@ class MatrixUserRepository @Inject constructor( private val dataSource: UserListDataSource ) : UserRepository { - override fun search(query: String): Flow = flow { + override fun search(query: String): Flow = flow { val shouldQueryProfile = MatrixPatterns.isUserId(query) && !client.isMe(UserId(query)) val shouldFetchSearchResults = query.length >= MINIMUM_SEARCH_LENGTH // If the search term is a MXID that's not ours, we'll show a 'fake' result for that user, then update it when we get search results. @@ -47,7 +47,7 @@ class MatrixUserRepository @Inject constructor( null } if (shouldQueryProfile || shouldFetchSearchResults) { - emit(UserSearchResults(isFetchingSearchResults = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) + emit(UserSearchResultState(isFetchingSearchResults = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) } if (shouldFetchSearchResults) { val results = fetchSearchResults(query, shouldQueryProfile) @@ -55,7 +55,7 @@ class MatrixUserRepository @Inject constructor( } } - private suspend fun fetchSearchResults(query: String, shouldQueryProfile: Boolean): UserSearchResults { + private suspend fun fetchSearchResults(query: String, shouldQueryProfile: Boolean): UserSearchResultState { // Debounce delay(DEBOUNCE_TIME_MILLIS) val results = dataSource @@ -73,7 +73,7 @@ class MatrixUserRepository @Inject constructor( ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)) } - return UserSearchResults(results = results, isFetchingSearchResults = false) + return UserSearchResultState(results = results, isFetchingSearchResults = false) } companion object { diff --git a/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt b/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt index e21c48a48b..3ca2320a26 100644 --- a/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt +++ b/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt @@ -17,7 +17,7 @@ package io.element.android.libraries.usersearch.test import io.element.android.libraries.usersearch.api.UserRepository -import io.element.android.libraries.usersearch.api.UserSearchResults +import io.element.android.libraries.usersearch.api.UserSearchResultState import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableSharedFlow @@ -26,15 +26,15 @@ class FakeUserRepository : UserRepository { var providedQuery: String? = null private set - private val flow = MutableSharedFlow() + private val flow = MutableSharedFlow() - override fun search(query: String): Flow { + override fun search(query: String): Flow { providedQuery = query return flow } - suspend fun emitResult(result: UserSearchResults) { - flow.emit(result) + suspend fun emitState(state: UserSearchResultState) { + flow.emit(state) } } From 2f49de1fbb0f07a949fecbd3f7cc4b17034ce2a5 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 15:40:02 +0100 Subject: [PATCH 092/161] Rename SearchBarResultState.Empty to SearchBarResultState.Initial --- .../createroom/impl/userlist/DefaultUserListPresenter.kt | 6 +++--- .../createroom/impl/userlist/UserListStateProvider.kt | 2 +- .../impl/userlist/DefaultUserListPresenterTests.kt | 8 ++++---- .../roomdetails/impl/invite/RoomInviteMembersPresenter.kt | 6 +++--- .../impl/invite/RoomInviteMembersStateProvider.kt | 2 +- .../roomdetails/impl/members/RoomMemberListPresenter.kt | 4 ++-- .../impl/members/RoomMemberListStateProvider.kt | 2 +- .../impl/invite/RoomInviteMembersPresenterTest.kt | 4 ++-- .../roomdetails/members/RoomMemberListPresenterTests.kt | 2 +- .../libraries/designsystem/theme/components/SearchBar.kt | 6 +++--- .../libraries/roomselect/impl/RoomSelectPresenter.kt | 2 +- .../libraries/roomselect/impl/RoomSelectStateProvider.kt | 2 +- .../libraries/roomselect/impl/RoomSelectPresenterTests.kt | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt index 19a858dd78..2157f0ce80 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt @@ -59,17 +59,17 @@ class DefaultUserListPresenter @AssistedInject constructor( val selectedUsers by userListDataStore.selectedUsers().collectAsState(emptyList()) var searchQuery by rememberSaveable { mutableStateOf("") } var searchResults: SearchBarResultState> by remember { - mutableStateOf(SearchBarResultState.Empty()) + mutableStateOf(SearchBarResultState.Initial()) } var isFetchingSearchResults by remember { mutableStateOf(false) } LaunchedEffect(searchQuery) { - searchResults = SearchBarResultState.Empty() + searchResults = SearchBarResultState.Initial() isFetchingSearchResults = false userRepository.search(searchQuery).onEach { state -> isFetchingSearchResults = state.isFetchingSearchResults searchResults = when { - state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Empty() + state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Initial() state.results.isEmpty() && !state.isFetchingSearchResults -> SearchBarResultState.NoResultsFound() else -> SearchBarResultState.Results(state.results.toImmutableList()) } diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt index ec7fba57b5..f50ed6c5ab 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt @@ -60,7 +60,7 @@ open class UserListStateProvider : PreviewParameterProvider { fun aUserListState() = UserListState( isSearchActive = false, searchQuery = "", - searchResults = SearchBarResultState.Empty(), + searchResults = SearchBarResultState.Initial(), selectedUsers = persistentListOf(), selectionMode = SelectionMode.Single, isFetchingSearchResults = false, diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt index 219a252b7b..3c1e5c44b5 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt @@ -56,7 +56,7 @@ class DefaultUserListPresenterTests { assertThat(initialState.isMultiSelectionEnabled).isFalse() assertThat(initialState.isSearchActive).isFalse() assertThat(initialState.selectedUsers).isEmpty() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) } } @@ -77,7 +77,7 @@ class DefaultUserListPresenterTests { assertThat(initialState.isMultiSelectionEnabled).isTrue() assertThat(initialState.isSearchActive).isFalse() assertThat(initialState.selectedUsers).isEmpty() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) } } @@ -132,7 +132,7 @@ class DefaultUserListPresenterTests { val initialState = awaitItem() initialState.eventSink(UserListEvents.UpdateSearchQuery("alice")) - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) assertThat(userRepository.providedQuery).isEqualTo("alice") skipItems(2) @@ -184,7 +184,7 @@ class DefaultUserListPresenterTests { val initialState = awaitItem() initialState.eventSink(UserListEvents.UpdateSearchQuery("alice")) - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) assertThat(userRepository.providedQuery).isEqualTo("alice") skipItems(2) diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt index a880afe306..0065f1c5e2 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt @@ -52,7 +52,7 @@ class RoomInviteMembersPresenter @Inject constructor( override fun present(): RoomInviteMembersState { val roomMembers = remember { mutableStateOf>>(AsyncData.Loading()) } val selectedUsers = remember { mutableStateOf>(persistentListOf()) } - val searchResults = remember { mutableStateOf>>(SearchBarResultState.Empty()) } + val searchResults = remember { mutableStateOf>>(SearchBarResultState.Initial()) } var searchQuery by rememberSaveable { mutableStateOf("") } var searchActive by rememberSaveable { mutableStateOf(false) } var isFetchingSearchResults = rememberSaveable { mutableStateOf(false) } @@ -129,14 +129,14 @@ class RoomInviteMembersPresenter @Inject constructor( isFetchingSearchResults: MutableState, searchQuery: String, ) = withContext(coroutineDispatchers.io) { - searchResults.value = SearchBarResultState.Empty() + searchResults.value = SearchBarResultState.Initial() isFetchingSearchResults.value = false val joinedMembers = roomMembers.value.dataOrNull().orEmpty() userRepository.search(searchQuery).onEach { state -> isFetchingSearchResults.value = state.isFetchingSearchResults searchResults.value = when { - state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Empty() + state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Initial() state.results.isEmpty() && !state.isFetchingSearchResults -> SearchBarResultState.NoResultsFound() else -> SearchBarResultState.Results(state.results.map { result -> val existingMembership = joinedMembers.firstOrNull { j -> j.userId == result.matrixUser.userId }?.membership diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt index e7b0ba3397..5e43492a17 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt @@ -81,7 +81,7 @@ internal class RoomInviteMembersStateProvider : PreviewParameterProvider> = SearchBarResultState.Empty(), + searchResults: SearchBarResultState> = SearchBarResultState.Initial(), selectedUsers: ImmutableList = persistentListOf(), isSearchActive: Boolean = false, isFetchingSearchResults: Boolean = false, 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 92a029c8f3..0f66f7db4c 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 @@ -47,7 +47,7 @@ class RoomMemberListPresenter @Inject constructor( var roomMembers by remember { mutableStateOf>(AsyncData.Loading()) } var searchQuery by rememberSaveable { mutableStateOf("") } var searchResults by remember { - mutableStateOf>(SearchBarResultState.Empty()) + mutableStateOf>(SearchBarResultState.Initial()) } var isSearchActive by rememberSaveable { mutableStateOf(false) } @@ -71,7 +71,7 @@ class RoomMemberListPresenter @Inject constructor( LaunchedEffect(searchQuery) { withContext(coroutineDispatchers.io) { searchResults = if (searchQuery.isEmpty()) { - SearchBarResultState.Empty() + SearchBarResultState.Initial() } else { val results = roomMemberListDataSource.search(searchQuery).groupBy { it.membership } if (results.isEmpty()) SearchBarResultState.NoResultsFound() 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 01e29832eb..5d9549808c 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 @@ -60,7 +60,7 @@ internal class RoomMemberListStateProvider : PreviewParameterProvider = AsyncData.Uninitialized, - searchResults: SearchBarResultState = SearchBarResultState.Empty(), + searchResults: SearchBarResultState = SearchBarResultState.Initial(), ) = RoomMemberListState( roomMembers = roomMembers, searchQuery = "", diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt index 60ba78c725..fbd34ad408 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt @@ -66,7 +66,7 @@ internal class RoomInviteMembersPresenterTest { }.test { val initialState = awaitItem() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) assertThat(initialState.isSearchActive).isFalse() assertThat(initialState.canInvite).isFalse() assertThat(initialState.searchQuery).isEmpty() @@ -112,7 +112,7 @@ internal class RoomInviteMembersPresenterTest { assertThat(repository.providedQuery).isEqualTo("some query") repository.emitState(UserSearchResultState(results = emptyList(), isFetchingSearchResults = true)) consumeItemsUntilPredicate { it.isFetchingSearchResults }.last().also { state -> - assertThat(state.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(state.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) assertThat(state.isFetchingSearchResults).isTrue() } repository.emitState(results = emptyList(), isFetchingSearchResults = false) 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 982c9f83f0..f08976a8cb 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 @@ -55,7 +55,7 @@ class RoomMemberListPresenterTests { val initialState = awaitItem() assertThat(initialState.roomMembers).isInstanceOf(AsyncData.Loading::class.java) assertThat(initialState.searchQuery).isEmpty() - assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) assertThat(initialState.isSearchActive).isFalse() val loadedState = awaitItem() assertThat(loadedState.roomMembers).isInstanceOf(AsyncData.Success::class.java) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt index c53fbb6cb6..d32d7de685 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/SearchBar.kt @@ -59,7 +59,7 @@ fun SearchBar( modifier: Modifier = Modifier, enabled: Boolean = true, showBackButton: Boolean = true, - resultState: SearchBarResultState = SearchBarResultState.Empty(), + resultState: SearchBarResultState = SearchBarResultState.Initial(), shape: Shape = SearchBarDefaults.inputFieldShape, tonalElevation: Dp = SearchBarDefaults.TonalElevation, windowInsets: WindowInsets = SearchBarDefaults.windowInsets, @@ -184,7 +184,7 @@ object ElementSearchBarDefaults { @Immutable sealed interface SearchBarResultState { /** No search results are available yet (e.g. because the user hasn't entered a search term). */ - class Empty : SearchBarResultState + class Initial : SearchBarResultState /** The search has completed, but no results were found. */ class NoResultsFound : SearchBarResultState @@ -274,7 +274,7 @@ private fun ContentToPreview( query: String = "", active: Boolean = false, showBackButton: Boolean = true, - resultState: SearchBarResultState = SearchBarResultState.Empty(), + resultState: SearchBarResultState = SearchBarResultState.Initial(), contentPrefix: @Composable ColumnScope.() -> Unit = {}, contentSuffix: @Composable ColumnScope.() -> Unit = {}, resultHandler: @Composable ColumnScope.(String) -> Unit = {}, diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt index 1bc1e8a4b5..8535031c16 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt @@ -51,7 +51,7 @@ class RoomSelectPresenter @AssistedInject constructor( var selectedRooms by remember { mutableStateOf(persistentListOf()) } var query by remember { mutableStateOf("") } var isSearchActive by remember { mutableStateOf(false) } - var results: SearchBarResultState> by remember { mutableStateOf(SearchBarResultState.Empty()) } + var results: SearchBarResultState> by remember { mutableStateOf(SearchBarResultState.Initial()) } val summaries by client.roomListService.allRooms.summaries.collectAsState() diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt index 8cc082d702..032dc4a8d0 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectStateProvider.kt @@ -48,7 +48,7 @@ open class RoomSelectStateProvider : PreviewParameterProvider { } private fun aRoomSelectState( - resultState: SearchBarResultState> = SearchBarResultState.Empty(), + resultState: SearchBarResultState> = SearchBarResultState.Initial(), query: String = "", isSearchActive: Boolean = false, selectedRooms: ImmutableList = persistentListOf(), diff --git a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt index 9c6e7a0adb..ec85358ebd 100644 --- a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt +++ b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt @@ -45,7 +45,7 @@ class RoomSelectPresenterTests { }.test { val initialState = awaitItem() assertThat(initialState.selectedRooms).isEmpty() - assertThat(initialState.resultState).isInstanceOf(SearchBarResultState.Empty::class.java) + assertThat(initialState.resultState).isInstanceOf(SearchBarResultState.Initial::class.java) assertThat(initialState.isSearchActive).isFalse() // Search is run automatically val searchState = awaitItem() From c78ce88c53643637acd74757273fa47668715e97 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 5 Jan 2024 15:54:50 +0100 Subject: [PATCH 093/161] Rename isFetchingSearchResults to showSearchLoader --- .../impl/components/SearchUserBar.kt | 4 ++-- .../impl/components/UserListView.kt | 2 +- .../impl/userlist/DefaultUserListPresenter.kt | 12 +++++------ .../createroom/impl/userlist/UserListState.kt | 2 +- .../impl/userlist/UserListStateProvider.kt | 2 +- .../userlist/DefaultUserListPresenterTests.kt | 10 +++++----- .../impl/invite/RoomInviteMembersPresenter.kt | 16 +++++++-------- .../impl/invite/RoomInviteMembersState.kt | 2 +- .../invite/RoomInviteMembersStateProvider.kt | 6 +++--- .../impl/invite/RoomInviteMembersView.kt | 6 +++--- .../invite/RoomInviteMembersPresenterTest.kt | 20 +++++++++---------- .../usersearch/api/UserSearchResult.kt | 2 +- .../usersearch/impl/MatrixUserRepository.kt | 4 ++-- .../impl/MatrixUserRepositoryTest.kt | 12 +++++------ 14 files changed, 50 insertions(+), 50 deletions(-) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt index a9292e5a24..c047a60018 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchUserBar.kt @@ -50,7 +50,7 @@ import kotlinx.collections.immutable.ImmutableList fun SearchUserBar( query: String, state: SearchBarResultState>, - isSearching: Boolean, + showLoader: Boolean, selectedUsers: ImmutableList, active: Boolean, isMultiSelectionEnabled: Boolean, @@ -102,7 +102,7 @@ fun SearchUserBar( } }, contentSuffix = { - if (isSearching) { + if (showLoader) { AsyncLoading() } }, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt index 8d5a3690db..b13d682250 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/UserListView.kt @@ -48,7 +48,7 @@ fun UserListView( state = state.searchResults, selectedUsers = state.selectedUsers, active = state.isSearchActive, - isSearching = state.isFetchingSearchResults, + showLoader = state.showSearchLoader, isMultiSelectionEnabled = state.isMultiSelectionEnabled, showBackButton = showBackButton, onActiveChanged = { state.eventSink(UserListEvents.OnSearchActiveChanged(it)) }, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt index 2157f0ce80..a843570fe5 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenter.kt @@ -61,16 +61,16 @@ class DefaultUserListPresenter @AssistedInject constructor( var searchResults: SearchBarResultState> by remember { mutableStateOf(SearchBarResultState.Initial()) } - var isFetchingSearchResults by remember { mutableStateOf(false) } + var showSearchLoader by remember { mutableStateOf(false) } LaunchedEffect(searchQuery) { searchResults = SearchBarResultState.Initial() - isFetchingSearchResults = false + showSearchLoader = false userRepository.search(searchQuery).onEach { state -> - isFetchingSearchResults = state.isFetchingSearchResults + showSearchLoader = state.isSearching searchResults = when { - state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Initial() - state.results.isEmpty() && !state.isFetchingSearchResults -> SearchBarResultState.NoResultsFound() + state.results.isEmpty() && state.isSearching -> SearchBarResultState.Initial() + state.results.isEmpty() && !state.isSearching -> SearchBarResultState.NoResultsFound() else -> SearchBarResultState.Results(state.results.toImmutableList()) } }.launchIn(this) @@ -81,7 +81,7 @@ class DefaultUserListPresenter @AssistedInject constructor( searchResults = searchResults, selectedUsers = selectedUsers.toImmutableList(), isSearchActive = isSearchActive, - isFetchingSearchResults = isFetchingSearchResults, + showSearchLoader = showSearchLoader, selectionMode = args.selectionMode, eventSink = { event -> when (event) { diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt index 5d59735e46..a27191881e 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListState.kt @@ -24,7 +24,7 @@ import kotlinx.collections.immutable.ImmutableList data class UserListState( val searchQuery: String, val searchResults: SearchBarResultState>, - val isFetchingSearchResults: Boolean, + val showSearchLoader: Boolean, val selectedUsers: ImmutableList, val isSearchActive: Boolean, val selectionMode: SelectionMode, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt index f50ed6c5ab..4685bb47e3 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/userlist/UserListStateProvider.kt @@ -63,7 +63,7 @@ fun aUserListState() = UserListState( searchResults = SearchBarResultState.Initial(), selectedUsers = persistentListOf(), selectionMode = SelectionMode.Single, - isFetchingSearchResults = false, + showSearchLoader = false, eventSink = {} ) diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt index 3c1e5c44b5..d1c82120b9 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/userlist/DefaultUserListPresenterTests.kt @@ -139,7 +139,7 @@ class DefaultUserListPresenterTests { // When the user repository emits a result, it's copied to the state val result = UserSearchResultState( results = listOf(UserSearchResult(aMatrixUser())), - isFetchingSearchResults = false, + isSearching = false, ) userRepository.emitState(result) awaitItem().also { state -> @@ -148,12 +148,12 @@ class DefaultUserListPresenterTests { persistentListOf(UserSearchResult(aMatrixUser())) ) ) - assertThat(state.isFetchingSearchResults).isFalse() + assertThat(state.showSearchLoader).isFalse() } // When the user repository emits another result, it replaces the previous value val newResult = UserSearchResultState( results = aMatrixUserList().map { UserSearchResult(it) }, - isFetchingSearchResults = false, + isSearching = false, ) userRepository.emitState(newResult) awaitItem().also { state -> @@ -162,7 +162,7 @@ class DefaultUserListPresenterTests { aMatrixUserList().map { UserSearchResult(it) } ) ) - assertThat(state.isFetchingSearchResults).isFalse() + assertThat(state.showSearchLoader).isFalse() } } } @@ -189,7 +189,7 @@ class DefaultUserListPresenterTests { skipItems(2) // When the results list is empty, the state is set to NoResults - userRepository.emitState(UserSearchResultState(results = emptyList(), isFetchingSearchResults = false)) + userRepository.emitState(UserSearchResultState(results = emptyList(), isSearching = false)) assertThat(awaitItem().searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) } } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt index 0065f1c5e2..f7c4363613 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt @@ -55,7 +55,7 @@ class RoomInviteMembersPresenter @Inject constructor( val searchResults = remember { mutableStateOf>>(SearchBarResultState.Initial()) } var searchQuery by rememberSaveable { mutableStateOf("") } var searchActive by rememberSaveable { mutableStateOf(false) } - var isFetchingSearchResults = rememberSaveable { mutableStateOf(false) } + var showSearchLoader = rememberSaveable { mutableStateOf(false) } LaunchedEffect(Unit) { fetchMembers(roomMembers) @@ -65,7 +65,7 @@ class RoomInviteMembersPresenter @Inject constructor( searchResults = searchResults, roomMembers = roomMembers, selectedUsers = selectedUsers, - isFetchingSearchResults = isFetchingSearchResults, + showSearchLoader = showSearchLoader, searchQuery = searchQuery ) } @@ -76,7 +76,7 @@ class RoomInviteMembersPresenter @Inject constructor( searchQuery = searchQuery, isSearchActive = searchActive, searchResults = searchResults.value, - isFetchingSearchResults = isFetchingSearchResults.value, + showSearchLoader = showSearchLoader.value, eventSink = { when (it) { is RoomInviteMembersEvents.OnSearchActiveChanged -> { @@ -126,18 +126,18 @@ class RoomInviteMembersPresenter @Inject constructor( searchResults: MutableState>>, roomMembers: MutableState>>, selectedUsers: MutableState>, - isFetchingSearchResults: MutableState, + showSearchLoader: MutableState, searchQuery: String, ) = withContext(coroutineDispatchers.io) { searchResults.value = SearchBarResultState.Initial() - isFetchingSearchResults.value = false + showSearchLoader.value = false val joinedMembers = roomMembers.value.dataOrNull().orEmpty() userRepository.search(searchQuery).onEach { state -> - isFetchingSearchResults.value = state.isFetchingSearchResults + showSearchLoader.value = state.isSearching searchResults.value = when { - state.results.isEmpty() && state.isFetchingSearchResults -> SearchBarResultState.Initial() - state.results.isEmpty() && !state.isFetchingSearchResults -> SearchBarResultState.NoResultsFound() + state.results.isEmpty() && state.isSearching -> SearchBarResultState.Initial() + state.results.isEmpty() && !state.isSearching -> SearchBarResultState.NoResultsFound() else -> SearchBarResultState.Results(state.results.map { result -> val existingMembership = joinedMembers.firstOrNull { j -> j.userId == result.matrixUser.userId }?.membership val isJoined = existingMembership == RoomMembershipState.JOIN diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt index 1fb2dc1e78..84fb1b0986 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersState.kt @@ -23,7 +23,7 @@ import kotlinx.collections.immutable.ImmutableList data class RoomInviteMembersState( val canInvite: Boolean, val searchQuery: String, - val isFetchingSearchResults: Boolean, + val showSearchLoader: Boolean, val searchResults: SearchBarResultState>, val selectedUsers: ImmutableList, val isSearchActive: Boolean, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt index 5e43492a17..ca4e4ac7d2 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersStateProvider.kt @@ -73,7 +73,7 @@ internal class RoomInviteMembersStateProvider : PreviewParameterProvider> = SearchBarResultState.Initial(), selectedUsers: ImmutableList = persistentListOf(), isSearchActive: Boolean = false, - isFetchingSearchResults: Boolean = false, + showSearchLoader: Boolean = false, ): RoomInviteMembersState { return RoomInviteMembersState( canInvite = canInvite, @@ -92,7 +92,7 @@ private fun aRoomInviteMembersState( searchResults = searchResults, selectedUsers = selectedUsers, isSearchActive = isSearchActive, - isFetchingSearchResults = isFetchingSearchResults, + showSearchLoader = showSearchLoader, eventSink = {}, ) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt index 73f6de54a8..e40e624afc 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt @@ -87,7 +87,7 @@ fun RoomInviteMembersView( RoomInviteMembersSearchBar( modifier = Modifier.fillMaxWidth(), query = state.searchQuery, - isSearching = state.isFetchingSearchResults, + showLoader = state.showSearchLoader, selectedUsers = state.selectedUsers, state = state.searchResults, active = state.isSearchActive, @@ -141,7 +141,7 @@ private fun RoomInviteMembersTopBar( private fun RoomInviteMembersSearchBar( query: String, state: SearchBarResultState>, - isSearching: Boolean, + showLoader: Boolean, selectedUsers: ImmutableList, active: Boolean, onActiveChanged: (Boolean) -> Unit, @@ -171,7 +171,7 @@ private fun RoomInviteMembersSearchBar( showBackButton = false, resultState = state, contentSuffix = { - if (isSearching) { + if (showLoader) { AsyncLoading() } }, diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt index fbd34ad408..0d2201342f 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenterTest.kt @@ -110,15 +110,15 @@ internal class RoomInviteMembersPresenterTest { val initialState = awaitItem() initialState.eventSink(RoomInviteMembersEvents.UpdateSearchQuery("some query")) assertThat(repository.providedQuery).isEqualTo("some query") - repository.emitState(UserSearchResultState(results = emptyList(), isFetchingSearchResults = true)) - consumeItemsUntilPredicate { it.isFetchingSearchResults }.last().also { state -> + repository.emitState(UserSearchResultState(results = emptyList(), isSearching = true)) + consumeItemsUntilPredicate { it.showSearchLoader }.last().also { state -> assertThat(state.searchResults).isInstanceOf(SearchBarResultState.Initial::class.java) - assertThat(state.isFetchingSearchResults).isTrue() + assertThat(state.showSearchLoader).isTrue() } - repository.emitState(results = emptyList(), isFetchingSearchResults = false) - consumeItemsUntilPredicate { !it.isFetchingSearchResults }.last().also { state -> + repository.emitState(results = emptyList(), isSearching = false) + consumeItemsUntilPredicate { !it.showSearchLoader }.last().also { state -> assertThat(state.searchResults).isInstanceOf(SearchBarResultState.NoResultsFound::class.java) - assertThat(state.isFetchingSearchResults).isFalse() + assertThat(state.showSearchLoader).isFalse() } } } @@ -387,21 +387,21 @@ internal class RoomInviteMembersPresenterTest { private suspend fun FakeUserRepository.emitStateWithUsers( users: List, - isFetchingSearchResults: Boolean = false + isSearching: Boolean = false ) { emitState( results = users.map { UserSearchResult(it) }, - isFetchingSearchResults = isFetchingSearchResults, + isSearching = isSearching, ) } private suspend fun FakeUserRepository.emitState( results: List, - isFetchingSearchResults: Boolean = false + isSearching: Boolean = false ) { val state = UserSearchResultState( results = results, - isFetchingSearchResults = isFetchingSearchResults + isSearching = isSearching ) emitState(state) } diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt index ebdfb7fedb..2410b58d05 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserSearchResult.kt @@ -25,5 +25,5 @@ data class UserSearchResult( data class UserSearchResultState( val results: List, - val isFetchingSearchResults: Boolean, + val isSearching: Boolean, ) diff --git a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt index 7ac3ec8380..fa09a5ce9a 100644 --- a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt +++ b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt @@ -47,7 +47,7 @@ class MatrixUserRepository @Inject constructor( null } if (shouldQueryProfile || shouldFetchSearchResults) { - emit(UserSearchResultState(isFetchingSearchResults = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) + emit(UserSearchResultState(isSearching = shouldFetchSearchResults, results = listOfNotNull(fakeSearchResult))) } if (shouldFetchSearchResults) { val results = fetchSearchResults(query, shouldQueryProfile) @@ -73,7 +73,7 @@ class MatrixUserRepository @Inject constructor( ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)) } - return UserSearchResultState(results = results, isFetchingSearchResults = false) + return UserSearchResultState(results = results, isSearching = false) } companion object { diff --git a/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt b/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt index 0ddf58e8aa..e775547efc 100644 --- a/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt +++ b/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt @@ -55,11 +55,11 @@ internal class MatrixUserRepositoryTest { result.test { awaitItem().also { - assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.isSearching).isTrue() assertThat(it.results).isEmpty() } awaitItem().also { - assertThat(it.isFetchingSearchResults).isFalse() + assertThat(it.isSearching).isFalse() assertThat(it.results).isEmpty() } awaitComplete() @@ -76,11 +76,11 @@ internal class MatrixUserRepositoryTest { result.test { awaitItem().also { - assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.isSearching).isTrue() assertThat(it.results).isEmpty() } awaitItem().also { - assertThat(it.isFetchingSearchResults).isFalse() + assertThat(it.isSearching).isFalse() assertThat(it.results).isEqualTo(aMatrixUserList().toUserSearchResults()) } awaitComplete() @@ -96,7 +96,7 @@ internal class MatrixUserRepositoryTest { result.test { awaitItem().also { - assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.isSearching).isTrue() assertThat(it.results).isEqualTo(listOf(placeholderResult())) } cancelAndConsumeRemainingEvents() @@ -112,7 +112,7 @@ internal class MatrixUserRepositoryTest { result.test { awaitItem().also { - assertThat(it.isFetchingSearchResults).isTrue() + assertThat(it.isSearching).isTrue() assertThat(it.results).isEmpty() } cancelAndConsumeRemainingEvents() From 5faa894d3b00c66e0e4cae4f8423d222580c757b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 5 Jan 2024 15:23:46 +0000 Subject: [PATCH 094/161] Update wysiwyg to v2.24.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index a145e4dd96..b4b7ecc6bd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -38,7 +38,7 @@ serialization_json = "1.6.2" showkase = "1.0.2" appyx = "1.4.0" sqldelight = "2.0.1" -wysiwyg = "2.23.0" +wysiwyg = "2.24.0" # DI dagger = "2.50" From 69e8384163f17395da22e27fac4e320aaebb21ca Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 5 Jan 2024 18:00:37 +0100 Subject: [PATCH 095/161] Add first tests on compose click interaction. --- features/logout/impl/build.gradle.kts | 9 ++ .../logout/impl/LogoutStateProvider.kt | 3 +- .../features/logout/impl/LogoutViewTest.kt | 147 ++++++++++++++++++ tests/testutils/build.gradle.kts | 2 + .../tests/testutils/EnsureCalledOnce.kt | 48 ++++++ .../tests/testutils/EnsureNeverCalled.kt | 29 ++++ .../android/tests/testutils/EventsRecorder.kt | 41 +++++ ...nticsNodeInteractionsProviderExtensions.kt | 27 ++++ 8 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt create mode 100644 tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt create mode 100644 tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt create mode 100644 tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EventsRecorder.kt create mode 100644 tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt diff --git a/features/logout/impl/build.gradle.kts b/features/logout/impl/build.gradle.kts index 68f7b389b3..6193e3fba4 100644 --- a/features/logout/impl/build.gradle.kts +++ b/features/logout/impl/build.gradle.kts @@ -22,6 +22,12 @@ plugins { android { namespace = "io.element.android.features.logout.impl" + + testOptions { + unitTests { + isIncludeAndroidResources = true + } + } } anvil { @@ -48,6 +54,9 @@ dependencies { testImplementation(libs.molecule.runtime) testImplementation(libs.test.truth) testImplementation(libs.test.turbine) + testImplementation(libs.test.robolectric) + testImplementation(libs.test.junitext) + testImplementation(libs.androidx.compose.ui.test.junit) testImplementation(projects.libraries.matrix.test) testImplementation(projects.libraries.featureflag.test) testImplementation(projects.tests.testutils) 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 33c60a851f..f1b11f61e9 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 @@ -48,6 +48,7 @@ fun aLogoutState( recoveryState: RecoveryState = RecoveryState.ENABLED, backupUploadState: BackupUploadState = BackupUploadState.Unknown, logoutAction: AsyncAction = AsyncAction.Uninitialized, + eventSink: (LogoutEvents) -> Unit = {}, ) = LogoutState( isLastSession = isLastSession, backupState = backupState, @@ -55,5 +56,5 @@ fun aLogoutState( recoveryState = recoveryState, backupUploadState = backupUploadState, logoutAction = logoutAction, - eventSink = {} + eventSink = eventSink, ) diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt new file mode 100644 index 0000000000..6193f67d48 --- /dev/null +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt @@ -0,0 +1,147 @@ +/* + * 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.features.logout.impl + +import androidx.compose.ui.test.hasContentDescription +import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.performClick +import androidx.test.ext.junit.runners.AndroidJUnit4 +import io.element.android.libraries.architecture.AsyncAction +import io.element.android.tests.testutils.EnsureCalledOnce +import io.element.android.tests.testutils.EnsureCalledOnceWithParam +import io.element.android.tests.testutils.EnsureNeverCalled +import io.element.android.tests.testutils.EnsureNeverCalledWithParam +import io.element.android.tests.testutils.EventsRecorder +import io.element.android.tests.testutils.clickOn +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidJUnit4::class) +class LogoutViewTest { + + @get:Rule val rule = createComposeRule() + + @Test + fun `clicking on logout sends a LogoutEvents`() { + val eventsRecorder = EventsRecorder() + rule.setContent { + LogoutView( + aLogoutState( + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.clickOn("Sign out") + eventsRecorder.assertSingle(LogoutEvents.Logout(false)) + } + + @Test + fun `clicking on back invoke back callback`() { + val eventsRecorder = EventsRecorder(expectEvents = false) + val callback = EnsureCalledOnce() + rule.setContent { + LogoutView( + aLogoutState( + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = callback, + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.onNode(hasContentDescription("Back")).performClick() + callback.assertSuccess() + } + + @Test + fun `clicking on confirm after error sends a LogoutEvents`() { + val eventsRecorder = EventsRecorder() + rule.setContent { + LogoutView( + aLogoutState( + logoutAction = AsyncAction.Failure(Exception("Failed to logout")), + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.clickOn("Sign out anyway") + eventsRecorder.assertSingle(LogoutEvents.Logout(true)) + } + + @Test + fun `clicking on cancel after error sends a LogoutEvents`() { + val eventsRecorder = EventsRecorder() + rule.setContent { + LogoutView( + aLogoutState( + logoutAction = AsyncAction.Failure(Exception("Failed to logout")), + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.clickOn("Cancel") + eventsRecorder.assertSingle(LogoutEvents.CloseDialogs) + } + + @Test + fun `success logout invoke onSuccessLogout`() { + val data = "data" + val eventsRecorder = EventsRecorder(expectEvents = false) + val callback = EnsureCalledOnceWithParam(data) + rule.setContent { + LogoutView( + aLogoutState( + logoutAction = AsyncAction.Success(data), + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = callback, + ) + } + callback.assertSuccess() + } + + @Test + fun `last session setting button invoke onChangeRecoveryKeyClicked`() { + val eventsRecorder = EventsRecorder(expectEvents = false) + val callback = EnsureCalledOnce() + rule.setContent { + LogoutView( + aLogoutState( + isLastSession = true, + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = callback, + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.clickOn("Settings") + callback.assertSuccess() + } +} diff --git a/tests/testutils/build.gradle.kts b/tests/testutils/build.gradle.kts index 8275c975d2..f81db46f2a 100644 --- a/tests/testutils/build.gradle.kts +++ b/tests/testutils/build.gradle.kts @@ -28,8 +28,10 @@ android { dependencies { implementation(libs.test.junit) + implementation(libs.test.truth) implementation(libs.coroutines.test) implementation(projects.libraries.core) implementation(libs.test.turbine) implementation(libs.molecule.runtime) + implementation(libs.androidx.compose.ui.test.junit) } diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt new file mode 100644 index 0000000000..721ced9dcb --- /dev/null +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2024 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.tests.testutils + +class EnsureCalledOnce : () -> Unit { + private var counter = 0 + override fun invoke() { + counter++ + } + + fun assertSuccess() { + if (counter != 1) { + throw AssertionError("Expected to be called once, but was called $counter times") + } + } +} + +class EnsureCalledOnceWithParam( + private val expectedParam: T +) : (T) -> Unit { + private var counter = 0 + override fun invoke(p1: T) { + if (p1 != expectedParam) { + throw AssertionError("Expected to be called with $expectedParam, but was called with $p1") + } + counter++ + } + + fun assertSuccess() { + if (counter != 1) { + throw AssertionError("Expected to be called once, but was called $counter times") + } + } +} diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt new file mode 100644 index 0000000000..9a106c86ad --- /dev/null +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2024 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.tests.testutils + +class EnsureNeverCalled : () -> Unit { + override fun invoke() { + throw AssertionError("Should not be called") + } +} + +class EnsureNeverCalledWithParam : (T) -> Unit { + override fun invoke(p1: T) { + throw AssertionError("Should not be called") + } +} diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EventsRecorder.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EventsRecorder.kt new file mode 100644 index 0000000000..4cc9bd078c --- /dev/null +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EventsRecorder.kt @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2024 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.tests.testutils + +import com.google.common.truth.Truth.assertThat + +class EventsRecorder( + private val expectEvents: Boolean = true +) : (T) -> Unit { + private val events = mutableListOf() + + override fun invoke(event: T) { + if (expectEvents) { + events.add(event) + } else { + throw AssertionError("Unexpected event: $event") + } + } + + fun assertSingle(event: T) { + assertList(listOf(event)) + } + + fun assertList(expectedEvents: List) { + assertThat(events).isEqualTo(expectedEvents) + } +} diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt new file mode 100644 index 0000000000..2a42bd115b --- /dev/null +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2024 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.tests.testutils + +import androidx.compose.ui.test.SemanticsNodeInteractionsProvider +import androidx.compose.ui.test.hasClickAction +import androidx.compose.ui.test.hasText +import androidx.compose.ui.test.performClick + +fun SemanticsNodeInteractionsProvider.clickOn(text: String) { + onNode(hasText(text) and hasClickAction()) + .performClick() +} From a0eceeae8bef27b0e597284b7215e938f2a2a03a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 5 Jan 2024 18:20:26 +0100 Subject: [PATCH 096/161] Fix test in release. --- features/logout/impl/build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/features/logout/impl/build.gradle.kts b/features/logout/impl/build.gradle.kts index 6193e3fba4..699d6c93b8 100644 --- a/features/logout/impl/build.gradle.kts +++ b/features/logout/impl/build.gradle.kts @@ -57,6 +57,7 @@ dependencies { testImplementation(libs.test.robolectric) testImplementation(libs.test.junitext) testImplementation(libs.androidx.compose.ui.test.junit) + testReleaseImplementation(libs.androidx.compose.ui.test.manifest) testImplementation(projects.libraries.matrix.test) testImplementation(projects.libraries.featureflag.test) testImplementation(projects.tests.testutils) From eca6921ad86ec64a8f7182c25f95ea62fe94d4e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 6 Jan 2024 01:36:49 +0000 Subject: [PATCH 097/161] Update anvil to v2.4.9-1-8 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b4b7ecc6bd..cfde2c1d94 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,7 +42,7 @@ wysiwyg = "2.24.0" # DI dagger = "2.50" -anvil = "2.4.8-1-8" +anvil = "2.4.9-1-8" # Auto service autoservice = "1.1.1" From c3681c4c080b7f627d652b08aaa527b97210c153 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 7 Jan 2024 16:52:17 +0000 Subject: [PATCH 098/161] Update dependency com.freeletics.flowredux:compose to v1.2.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b4b7ecc6bd..d326c2ecd8 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -162,7 +162,7 @@ unifiedpush = "com.github.UnifiedPush:android-connector:2.1.1" otaliastudios_transcoder = "com.otaliastudios:transcoder:0.10.5" vanniktech_blurhash = "com.vanniktech:blurhash:0.2.0" telephoto_zoomableimage = "me.saket.telephoto:zoomable-image-coil:0.7.1" -statemachine = "com.freeletics.flowredux:compose:1.2.0" +statemachine = "com.freeletics.flowredux:compose:1.2.1" maplibre = "org.maplibre.gl:android-sdk:10.2.0" maplibre_ktx = "org.maplibre.gl:android-sdk-ktx-v7:2.0.2" maplibre_annotation = "org.maplibre.gl:android-plugin-annotation-v9:2.0.2" From 06db67abe8b309c5ff9e7ee9f72059b1f1f37be4 Mon Sep 17 00:00:00 2001 From: bmarty Date: Mon, 8 Jan 2024 00:10:36 +0000 Subject: [PATCH 099/161] Sync Strings from Localazy --- .../impl/src/main/res/values-de/translations.xml | 2 +- .../impl/src/main/res/values-de/translations.xml | 6 +++--- .../impl/src/main/res/values-de/translations.xml | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/features/lockscreen/impl/src/main/res/values-de/translations.xml b/features/lockscreen/impl/src/main/res/values-de/translations.xml index 5ece7d2914..a6159ede0d 100644 --- a/features/lockscreen/impl/src/main/res/values-de/translations.xml +++ b/features/lockscreen/impl/src/main/res/values-de/translations.xml @@ -19,7 +19,7 @@ "PIN entfernen?" "%1$s zulassen" "Ich möchte diese PIN verwenden." - "Spare dir etwas Zeit und benutze %1$s, um die App jedes Mal zu entsperren" + "Spare dir etwas Zeit und benutze %1$s, um die App zu entsperren" "PIN wählen" "PIN bestätigen" "Aus Sicherheitsgründen kann dieser PIN-Code nicht verwendet werden." diff --git a/features/messages/impl/src/main/res/values-de/translations.xml b/features/messages/impl/src/main/res/values-de/translations.xml index 4798aaf696..c7e7ec276b 100644 --- a/features/messages/impl/src/main/res/values-de/translations.xml +++ b/features/messages/impl/src/main/res/values-de/translations.xml @@ -34,10 +34,10 @@ "Du bist allein in diesem Chat" "Nachricht wurde kopiert" "Du bist nicht berechtigt, in diesem Raum zu posten" - "Benutzerdefinierte Einstellung zulassen" + "Benutzerdefinierte Einstellungen verwenden" "Wenn du diese Option aktivierst, wird deine Standardeinstellung außer Kraft gesetzt." "Benachrichtige mich in diesem Chat bei" - "Du kannst das in deinem %1$s ändern." + "Zum Anpassen der Standardeinstellungen gehe zu: %1$s" "Globale Einstellungen" "Standardeinstellung" "Benutzerdefinierte Einstellung entfernen" @@ -55,7 +55,7 @@ "Weniger anzeigen" "Zum Aufnehmen gedrückt halten" "Alle" - "Benutzer sperren" + "Benutzer blockieren" "Fehler beim Verarbeiten des hochgeladenen Mediums. Bitte versuche es erneut." "Nur Erwähnungen und Schlüsselwörter" diff --git a/features/roomdetails/impl/src/main/res/values-de/translations.xml b/features/roomdetails/impl/src/main/res/values-de/translations.xml index 9a096e55ae..dbf2742e10 100644 --- a/features/roomdetails/impl/src/main/res/values-de/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-de/translations.xml @@ -13,7 +13,7 @@ "Raum bearbeiten" "Es ist ein unbekannter Fehler aufgetreten und die Informationen konnten nicht geändert werden." "Raum kann nicht aktualisiert werden" - "Nachrichten sind mit Schlössern gesichert. Nur du und die Empfänger haben die eindeutigen Schlüssel, um sie zu entsperren." + "Nachrichten und Anrufe sind Ende-zu-Ende verschlüsselt. Nur du und die Empfänger haben die eindeutigen Schlüssel, um sie zu entsperren." "Nachrichtenverschlüsselung aktiviert" "Beim Laden der Benachrichtigungseinstellungen ist ein Fehler aufgetreten." "Die Stummschaltung dieses Raums ist fehlgeschlagen, bitte versuche es erneut." @@ -27,10 +27,10 @@ "Raum wird aktualisiert…" "Ausstehend" "Raummitglieder" - "Benutzerdefinierte Einstellung zulassen" + "Benutzerdefinierte Einstellungen verwenden" "Wenn du diese Option aktivierst, wird deine Standardeinstellung außer Kraft gesetzt." "Benachrichtige mich in diesem Chat bei" - "Du kannst das in deinem %1$s ändern." + "Zum Anpassen der Standardeinstellungen gehe zu: %1$s" "Globale Einstellungen" "Standardeinstellung" "Benutzerdefinierte Einstellung entfernen" @@ -41,12 +41,12 @@ "Alle Nachrichten" "Benachrichtige mich in diesem Raum bei" "Beim Versuch, einen Chat zu starten, ist ein Fehler aufgetreten" - "Sperren" - "Gesperrte Benutzer können dir keine Nachrichten senden und alle ihre Nachrichten werden ausgeblendet. Du kannst sie jederzeit entsperren." - "Benutzer sperren" - "Entsperren" + "Blockieren" + "Blockierte Benutzer können Dir keine Nachrichten senden und alle ihre alten Nachrichten werden ausgeblendet. Die Blockierung kann jederzeit aufgehoben werden." + "Benutzer blockieren" + "Blockierung aufheben" "Du kannst dann wieder alle Nachrichten von ihnen sehen." - "Benutzer entsperren" + "Blockierung aufheben" "Raum verlassen" "Sicherheit" "Thema" From ec022e707b20842940d50c37c3ae4f216e14ef15 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:51:51 +0100 Subject: [PATCH 100/161] Update plugin dependencycheck to v9.0.8 (#2179) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b4b7ecc6bd..359dbd2638 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -212,7 +212,7 @@ anvil = { id = "com.squareup.anvil", version.ref = "anvil" } detekt = "io.gitlab.arturbosch.detekt:1.23.4" ktlint = "org.jlleitschuh.gradle.ktlint:12.0.3" dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12" -dependencycheck = "org.owasp.dependencycheck:9.0.7" +dependencycheck = "org.owasp.dependencycheck:9.0.8" dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" } paparazzi = "app.cash.paparazzi:1.3.1" kover = "org.jetbrains.kotlinx.kover:0.6.1" From da0a7965950c90d384278390fcbeade26356797f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 09:29:04 +0100 Subject: [PATCH 101/161] Use Anvil for Kotlin 1.9 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cfde2c1d94..7376b9df6f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,7 +42,7 @@ wysiwyg = "2.24.0" # DI dagger = "2.50" -anvil = "2.4.9-1-8" +anvil = "2.4.9" # Auto service autoservice = "1.1.1" From 6b2f79959d7a26aaaf3073776abc4fa545b406d8 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 09:35:14 +0100 Subject: [PATCH 102/161] Improve assertion message. --- .../io/element/android/tests/testutils/EnsureNeverCalled.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt index 9a106c86ad..e98c025238 100644 --- a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureNeverCalled.kt @@ -24,6 +24,6 @@ class EnsureNeverCalled : () -> Unit { class EnsureNeverCalledWithParam : (T) -> Unit { override fun invoke(p1: T) { - throw AssertionError("Should not be called") + throw AssertionError("Should not be called and is called with $p1") } } From 6798352fb712e683703a02af36d779a98814ac67 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 09:50:08 +0100 Subject: [PATCH 103/161] Use string resource instead of hard-coded strings. --- .../features/logout/impl/LogoutViewTest.kt | 19 ++++++++++--------- tests/testutils/build.gradle.kts | 1 + ...nticsNodeInteractionsProviderExtensions.kt | 15 +++++++++++++-- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt index 6193f67d48..7fcad59795 100644 --- a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt @@ -16,17 +16,18 @@ package io.element.android.features.logout.impl -import androidx.compose.ui.test.hasContentDescription -import androidx.compose.ui.test.junit4.createComposeRule -import androidx.compose.ui.test.performClick +import androidx.activity.ComponentActivity +import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.test.ext.junit.runners.AndroidJUnit4 import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.ui.strings.CommonStrings import io.element.android.tests.testutils.EnsureCalledOnce import io.element.android.tests.testutils.EnsureCalledOnceWithParam import io.element.android.tests.testutils.EnsureNeverCalled import io.element.android.tests.testutils.EnsureNeverCalledWithParam import io.element.android.tests.testutils.EventsRecorder import io.element.android.tests.testutils.clickOn +import io.element.android.tests.testutils.pressBack import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -34,7 +35,7 @@ import org.junit.runner.RunWith @RunWith(AndroidJUnit4::class) class LogoutViewTest { - @get:Rule val rule = createComposeRule() + @get:Rule val rule = createAndroidComposeRule() @Test fun `clicking on logout sends a LogoutEvents`() { @@ -49,7 +50,7 @@ class LogoutViewTest { onSuccessLogout = EnsureNeverCalledWithParam(), ) } - rule.clickOn("Sign out") + rule.clickOn(CommonStrings.action_signout) eventsRecorder.assertSingle(LogoutEvents.Logout(false)) } @@ -67,7 +68,7 @@ class LogoutViewTest { onSuccessLogout = EnsureNeverCalledWithParam(), ) } - rule.onNode(hasContentDescription("Back")).performClick() + rule.pressBack() callback.assertSuccess() } @@ -85,7 +86,7 @@ class LogoutViewTest { onSuccessLogout = EnsureNeverCalledWithParam(), ) } - rule.clickOn("Sign out anyway") + rule.clickOn(CommonStrings.action_signout_anyway) eventsRecorder.assertSingle(LogoutEvents.Logout(true)) } @@ -103,7 +104,7 @@ class LogoutViewTest { onSuccessLogout = EnsureNeverCalledWithParam(), ) } - rule.clickOn("Cancel") + rule.clickOn(CommonStrings.action_cancel) eventsRecorder.assertSingle(LogoutEvents.CloseDialogs) } @@ -141,7 +142,7 @@ class LogoutViewTest { onSuccessLogout = EnsureNeverCalledWithParam(), ) } - rule.clickOn("Settings") + rule.clickOn(CommonStrings.common_settings) callback.assertSuccess() } } diff --git a/tests/testutils/build.gradle.kts b/tests/testutils/build.gradle.kts index f81db46f2a..4b586043dc 100644 --- a/tests/testutils/build.gradle.kts +++ b/tests/testutils/build.gradle.kts @@ -31,6 +31,7 @@ dependencies { implementation(libs.test.truth) implementation(libs.coroutines.test) implementation(projects.libraries.core) + implementation(projects.libraries.uiStrings) implementation(libs.test.turbine) implementation(libs.molecule.runtime) implementation(libs.androidx.compose.ui.test.junit) diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt index 2a42bd115b..e99825c265 100644 --- a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt @@ -16,12 +16,23 @@ package io.element.android.tests.testutils -import androidx.compose.ui.test.SemanticsNodeInteractionsProvider +import androidx.activity.ComponentActivity +import androidx.annotation.StringRes import androidx.compose.ui.test.hasClickAction +import androidx.compose.ui.test.hasContentDescription import androidx.compose.ui.test.hasText +import androidx.compose.ui.test.junit4.AndroidComposeTestRule import androidx.compose.ui.test.performClick +import io.element.android.libraries.ui.strings.CommonStrings +import org.junit.rules.TestRule -fun SemanticsNodeInteractionsProvider.clickOn(text: String) { +fun AndroidComposeTestRule.clickOn(@StringRes res: Int) { + val text = activity.getString(res) onNode(hasText(text) and hasClickAction()) .performClick() } + +fun AndroidComposeTestRule.pressBack() { + val text = activity.getString(CommonStrings.action_back) + onNode(hasContentDescription(text)).performClick() +} From 0552f8e9d949433a6d592481fb85afa7002d4a12 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 08:58:09 +0000 Subject: [PATCH 104/161] Update dependency com.posthog:posthog-android to v3.1.0 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 1b54c9ed02..c85c934d44 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -170,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.1" +posthog = "com.posthog:posthog-android:3.1.0" sentry = "io.sentry:sentry-android:7.1.0" matrix_analytics_events = "com.github.matrix-org:matrix-analytics-events:aa14cbcdf81af2746d20a71779ec751f971e1d7f" From ba2c297118ac8f02a2f79929615dd8d930023184 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 09:55:22 +0100 Subject: [PATCH 105/161] Add `run` method to EnsureCalledOnce and EnsureCalledOnceWithParam to ensure that `assertSuccess` is always called. --- .../features/logout/impl/LogoutViewTest.kt | 74 +++++++++---------- .../tests/testutils/EnsureCalledOnce.kt | 10 +++ 2 files changed, 47 insertions(+), 37 deletions(-) diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt index 7fcad59795..f0abf45234 100644 --- a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt @@ -57,19 +57,19 @@ class LogoutViewTest { @Test fun `clicking on back invoke back callback`() { val eventsRecorder = EventsRecorder(expectEvents = false) - val callback = EnsureCalledOnce() - rule.setContent { - LogoutView( - aLogoutState( - eventSink = eventsRecorder - ), - onChangeRecoveryKeyClicked = EnsureNeverCalled(), - onBackClicked = callback, - onSuccessLogout = EnsureNeverCalledWithParam(), - ) + EnsureCalledOnce().run { callback -> + rule.setContent { + LogoutView( + aLogoutState( + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = callback, + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.pressBack() } - rule.pressBack() - callback.assertSuccess() } @Test @@ -112,37 +112,37 @@ class LogoutViewTest { fun `success logout invoke onSuccessLogout`() { val data = "data" val eventsRecorder = EventsRecorder(expectEvents = false) - val callback = EnsureCalledOnceWithParam(data) - rule.setContent { - LogoutView( - aLogoutState( - logoutAction = AsyncAction.Success(data), - eventSink = eventsRecorder - ), - onChangeRecoveryKeyClicked = EnsureNeverCalled(), - onBackClicked = EnsureNeverCalled(), - onSuccessLogout = callback, - ) + EnsureCalledOnceWithParam(data).run { callback -> + rule.setContent { + LogoutView( + aLogoutState( + logoutAction = AsyncAction.Success(data), + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = callback, + ) + } } - callback.assertSuccess() } @Test fun `last session setting button invoke onChangeRecoveryKeyClicked`() { val eventsRecorder = EventsRecorder(expectEvents = false) - val callback = EnsureCalledOnce() - rule.setContent { - LogoutView( - aLogoutState( - isLastSession = true, - eventSink = eventsRecorder - ), - onChangeRecoveryKeyClicked = callback, - onBackClicked = EnsureNeverCalled(), - onSuccessLogout = EnsureNeverCalledWithParam(), - ) + EnsureCalledOnce().run { callback -> + rule.setContent { + LogoutView( + aLogoutState( + isLastSession = true, + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = callback, + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.clickOn(CommonStrings.common_settings) } - rule.clickOn(CommonStrings.common_settings) - callback.assertSuccess() } } diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt index 721ced9dcb..a29c320a00 100644 --- a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt @@ -27,6 +27,11 @@ class EnsureCalledOnce : () -> Unit { throw AssertionError("Expected to be called once, but was called $counter times") } } + + fun run(block: (callback: EnsureCalledOnce) -> Unit) { + block(this) + assertSuccess() + } } class EnsureCalledOnceWithParam( @@ -45,4 +50,9 @@ class EnsureCalledOnceWithParam( throw AssertionError("Expected to be called once, but was called $counter times") } } + + fun run(block: (callback: EnsureCalledOnceWithParam) -> Unit) { + block(this) + assertSuccess() + } } From 0628ceabc1f1196b613abef2fd2c6c84e184953a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 10:07:48 +0100 Subject: [PATCH 106/161] Iterate on EnsureCalledOnce devX --- .../features/logout/impl/LogoutViewTest.kt | 10 +++++----- .../tests/testutils/EnsureCalledOnce.kt | 20 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt index f0abf45234..4958afabe7 100644 --- a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt @@ -21,12 +21,12 @@ import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.test.ext.junit.runners.AndroidJUnit4 import io.element.android.libraries.architecture.AsyncAction import io.element.android.libraries.ui.strings.CommonStrings -import io.element.android.tests.testutils.EnsureCalledOnce -import io.element.android.tests.testutils.EnsureCalledOnceWithParam import io.element.android.tests.testutils.EnsureNeverCalled import io.element.android.tests.testutils.EnsureNeverCalledWithParam import io.element.android.tests.testutils.EventsRecorder import io.element.android.tests.testutils.clickOn +import io.element.android.tests.testutils.ensureCalledOnce +import io.element.android.tests.testutils.ensureCalledOnceWithParam import io.element.android.tests.testutils.pressBack import org.junit.Rule import org.junit.Test @@ -57,7 +57,7 @@ class LogoutViewTest { @Test fun `clicking on back invoke back callback`() { val eventsRecorder = EventsRecorder(expectEvents = false) - EnsureCalledOnce().run { callback -> + ensureCalledOnce { callback -> rule.setContent { LogoutView( aLogoutState( @@ -112,7 +112,7 @@ class LogoutViewTest { fun `success logout invoke onSuccessLogout`() { val data = "data" val eventsRecorder = EventsRecorder(expectEvents = false) - EnsureCalledOnceWithParam(data).run { callback -> + ensureCalledOnceWithParam(data) { callback -> rule.setContent { LogoutView( aLogoutState( @@ -130,7 +130,7 @@ class LogoutViewTest { @Test fun `last session setting button invoke onChangeRecoveryKeyClicked`() { val eventsRecorder = EventsRecorder(expectEvents = false) - EnsureCalledOnce().run { callback -> + ensureCalledOnce { callback -> rule.setContent { LogoutView( aLogoutState( diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt index a29c320a00..ddc8e22a5c 100644 --- a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/EnsureCalledOnce.kt @@ -27,11 +27,12 @@ class EnsureCalledOnce : () -> Unit { throw AssertionError("Expected to be called once, but was called $counter times") } } +} - fun run(block: (callback: EnsureCalledOnce) -> Unit) { - block(this) - assertSuccess() - } +fun ensureCalledOnce(block: (callback: EnsureCalledOnce) -> Unit) { + val callback = EnsureCalledOnce() + block(callback) + callback.assertSuccess() } class EnsureCalledOnceWithParam( @@ -50,9 +51,10 @@ class EnsureCalledOnceWithParam( throw AssertionError("Expected to be called once, but was called $counter times") } } - - fun run(block: (callback: EnsureCalledOnceWithParam) -> Unit) { - block(this) - assertSuccess() - } +} + +fun ensureCalledOnceWithParam(param: T, block: (callback: EnsureCalledOnceWithParam) -> Unit) { + val callback = EnsureCalledOnceWithParam(param) + block(callback) + callback.assertSuccess() } From 66201c6e58f4133f3a80197525b5a2ab37437796 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 11:26:50 +0100 Subject: [PATCH 107/161] Do not use sublist as it crashes if `index > items.count()`. Using range is safer. Fix https://github.com/element-hq/element-x-android-rageshakes/issues/1301 --- .../features/messages/impl/timeline/TimelinePresenter.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt index 37d2d7d2a6..aff187d233 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt @@ -247,7 +247,8 @@ class TimelinePresenter @AssistedInject constructor( } private fun getLastEventIdBeforeOrAt(index: Int, items: ImmutableList): EventId? { - for (item in items.subList(index, items.count())) { + for (i in index..items.count()) { + val item = items[i] if (item is TimelineItem.Event) { return item.eventId } From a424cb0a6aecd23378a83f2a4e434d3ef3169332 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 11:41:29 +0100 Subject: [PATCH 108/161] exclude `items.count()`, which is not a valid index for the list. --- .../features/messages/impl/timeline/TimelinePresenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt index aff187d233..31e36e86f9 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelinePresenter.kt @@ -247,7 +247,7 @@ class TimelinePresenter @AssistedInject constructor( } private fun getLastEventIdBeforeOrAt(index: Int, items: ImmutableList): EventId? { - for (i in index..items.count()) { + for (i in index until items.count()) { val item = items[i] if (item is TimelineItem.Event) { return item.eventId From cc13df3efc2f5ee42bc080139f11d8fe4244ad06 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:19:15 +0000 Subject: [PATCH 109/161] Update dependency io.mockk:mockk to v1.13.9 (#2185) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c85c934d44..fe540c5b10 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -127,7 +127,7 @@ test_arch_core = "androidx.arch.core:core-testing:2.2.0" test_junit = "junit:junit:4.13.2" test_runner = "androidx.test:runner:1.5.2" test_junitext = "androidx.test.ext:junit:1.1.5" -test_mockk = "io.mockk:mockk:1.13.8" +test_mockk = "io.mockk:mockk:1.13.9" test_konsist = "com.lemonappdev:konsist:0.13.0" test_turbine = "app.cash.turbine:turbine:1.0.0" test_truth = "com.google.truth:truth:1.2.0" From 3954612a72f0222722dfd5a38dde2394a5a542f5 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Mon, 8 Jan 2024 14:02:57 +0100 Subject: [PATCH 110/161] Hide keyboard when tapping on a message in the timeline (#2187) * Hide keyboard when tapping on a message in the timeline if it would result in navigating to another screen --- changelog.d/2182.bugfix | 1 + .../features/messages/impl/MessagesFlowNode.kt | 18 +++++++++++++----- .../features/messages/impl/MessagesNode.kt | 9 +++++---- .../features/messages/impl/MessagesView.kt | 9 ++++++--- 4 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 changelog.d/2182.bugfix diff --git a/changelog.d/2182.bugfix b/changelog.d/2182.bugfix new file mode 100644 index 0000000000..427eb3b402 --- /dev/null +++ b/changelog.d/2182.bugfix @@ -0,0 +1 @@ +Hide keyboard when tapping on a message in the timeline. 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 7343e56529..1edafdd992 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 @@ -139,8 +139,8 @@ class MessagesFlowNode @AssistedInject constructor( callback?.onRoomDetailsClicked() } - override fun onEventClicked(event: TimelineItem.Event) { - processEventClicked(event) + override fun onEventClicked(event: TimelineItem.Event): Boolean { + return processEventClicked(event) } override fun onPreviewAttachments(attachments: ImmutableList) { @@ -239,8 +239,8 @@ class MessagesFlowNode @AssistedInject constructor( } } - private fun processEventClicked(event: TimelineItem.Event) { - when (event.content) { + private fun processEventClicked(event: TimelineItem.Event): Boolean { + return when (event.content) { is TimelineItemImageContent -> { val navTarget = NavTarget.MediaViewer( mediaInfo = MediaInfo( @@ -253,6 +253,7 @@ class MessagesFlowNode @AssistedInject constructor( thumbnailSource = event.content.thumbnailSource, ) overlay.show(navTarget) + true } is TimelineItemStickerContent -> { /* Sticker may have an empty url and no thumbnail @@ -269,6 +270,9 @@ class MessagesFlowNode @AssistedInject constructor( thumbnailSource = event.content.thumbnailSource, ) overlay.show(navTarget) + true + } else { + false } } is TimelineItemVideoContent -> { @@ -283,6 +287,7 @@ class MessagesFlowNode @AssistedInject constructor( thumbnailSource = event.content.thumbnailSource, ) overlay.show(navTarget) + true } is TimelineItemFileContent -> { val navTarget = NavTarget.MediaViewer( @@ -296,6 +301,7 @@ class MessagesFlowNode @AssistedInject constructor( thumbnailSource = event.content.thumbnailSource, ) overlay.show(navTarget) + true } is TimelineItemAudioContent -> { val navTarget = NavTarget.MediaViewer( @@ -309,6 +315,7 @@ class MessagesFlowNode @AssistedInject constructor( thumbnailSource = null, ) overlay.show(navTarget) + true } is TimelineItemLocationContent -> { val navTarget = NavTarget.LocationViewer( @@ -316,8 +323,9 @@ class MessagesFlowNode @AssistedInject constructor( description = event.content.description, ) overlay.show(navTarget) + true } - else -> Unit + else -> false } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt index 09883779e8..9e871b9b25 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt @@ -31,6 +31,7 @@ import io.element.android.features.messages.impl.attachments.Attachment import io.element.android.features.messages.impl.timeline.di.LocalTimelineItemPresenterFactories import io.element.android.features.messages.impl.timeline.di.TimelineItemPresenterFactories import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.libraries.core.bool.orFalse import io.element.android.libraries.mediaplayer.api.MediaPlayer import io.element.android.libraries.di.RoomScope import io.element.android.libraries.matrix.api.core.EventId @@ -48,7 +49,7 @@ class MessagesNode @AssistedInject constructor( @Assisted plugins: List, private val room: MatrixRoom, private val analyticsService: AnalyticsService, - private val presenterFactory: MessagesPresenter.Factory, + presenterFactory: MessagesPresenter.Factory, private val timelineItemPresenterFactories: TimelineItemPresenterFactories, private val mediaPlayer: MediaPlayer, ) : Node(buildContext, plugins = plugins), MessagesNavigator { @@ -58,7 +59,7 @@ class MessagesNode @AssistedInject constructor( interface Callback : Plugin { fun onRoomDetailsClicked() - fun onEventClicked(event: TimelineItem.Event) + fun onEventClicked(event: TimelineItem.Event): Boolean fun onPreviewAttachments(attachments: ImmutableList) fun onUserDataClicked(userId: UserId) fun onShowEventDebugInfoClicked(eventId: EventId?, debugInfo: TimelineItemDebugInfo) @@ -85,8 +86,8 @@ class MessagesNode @AssistedInject constructor( callback?.onRoomDetailsClicked() } - private fun onEventClicked(event: TimelineItem.Event) { - callback?.onEventClicked(event) + private fun onEventClicked(event: TimelineItem.Event): Boolean { + return callback?.onEventClicked(event).orFalse() } private fun onPreviewAttachments(attachments: ImmutableList) { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt index d6556c9a8c..96af343a5a 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt @@ -117,7 +117,7 @@ fun MessagesView( state: MessagesState, onBackPressed: () -> Unit, onRoomDetailsClicked: () -> Unit, - onEventClicked: (event: TimelineItem.Event) -> Unit, + onEventClicked: (event: TimelineItem.Event) -> Boolean, onUserDataClicked: (UserId) -> Unit, onPreviewAttachments: (ImmutableList) -> Unit, onSendLocationClicked: () -> Unit, @@ -148,7 +148,10 @@ fun MessagesView( fun onMessageClicked(event: TimelineItem.Event) { Timber.v("OnMessageClicked= ${event.id}") - onEventClicked(event) + val hideKeyboard = onEventClicked(event) + if (hideKeyboard) { + localView.hideKeyboard() + } } fun onMessageLongClicked(event: TimelineItem.Event) { @@ -569,7 +572,7 @@ internal fun MessagesViewPreview(@PreviewParameter(MessagesStateProvider::class) state = state, onBackPressed = {}, onRoomDetailsClicked = {}, - onEventClicked = {}, + onEventClicked = { false }, onPreviewAttachments = {}, onUserDataClicked = {}, onSendLocationClicked = {}, From 7ab3e968bfd24e81766aaacc75615097e65475b9 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 9 Nov 2023 17:57:04 +0100 Subject: [PATCH 111/161] Let Renovate upgrade Kover again. --- .github/renovate.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/renovate.json b/.github/renovate.json index b3d57b233b..724e223383 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -18,12 +18,6 @@ ], "groupName" : "kotlin" }, - { - "matchPackageNames" : [ - "org.jetbrains.kotlinx.kover" - ], - "enabled" : false - }, { "matchPackagePatterns" : [ "^org.maplibre" From 89762f20be6ed20e5ed107b200f7ad0383d1160a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Mon, 8 Jan 2024 16:12:03 +0100 Subject: [PATCH 112/161] Fix crash when sending image with latest posthog --- app/proguard-rules.pro | 5 +++++ changelog.d/+crash-sending-image-with-latest-posthog.bugfix | 1 + 2 files changed, 6 insertions(+) create mode 100644 changelog.d/+crash-sending-image-with-latest-posthog.bugfix diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 52929a81cf..c800b9d996 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -35,3 +35,8 @@ -dontwarn org.conscrypt.** -dontwarn org.bouncycastle.** -dontwarn org.openjsse.** + +# Needed for Posthog +-keepclassmembers class android.view.JavaViewSpy { + static int windowAttachCount(android.view.View); +} diff --git a/changelog.d/+crash-sending-image-with-latest-posthog.bugfix b/changelog.d/+crash-sending-image-with-latest-posthog.bugfix new file mode 100644 index 0000000000..1b299991bb --- /dev/null +++ b/changelog.d/+crash-sending-image-with-latest-posthog.bugfix @@ -0,0 +1 @@ +Fix crash sending image with latest Posthog because of an usage of an internal Android method. From b377da22ad8d5bd2e68a0bc209c1f3ff4742ffe3 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 15:38:15 +0100 Subject: [PATCH 113/161] Remove empty test module --- features/messages/impl/build.gradle.kts | 1 - libraries/textcomposer/test/build.gradle.kts | 28 -------------------- 2 files changed, 29 deletions(-) delete mode 100644 libraries/textcomposer/test/build.gradle.kts diff --git a/features/messages/impl/build.gradle.kts b/features/messages/impl/build.gradle.kts index 4428103105..897dc36faa 100644 --- a/features/messages/impl/build.gradle.kts +++ b/features/messages/impl/build.gradle.kts @@ -91,7 +91,6 @@ dependencies { testImplementation(projects.libraries.mediapickers.test) testImplementation(projects.libraries.permissions.test) testImplementation(projects.libraries.preferences.test) - testImplementation(projects.libraries.textcomposer.test) testImplementation(projects.libraries.voicerecorder.test) testImplementation(projects.libraries.mediaplayer.test) testImplementation(projects.libraries.mediaviewer.test) diff --git a/libraries/textcomposer/test/build.gradle.kts b/libraries/textcomposer/test/build.gradle.kts deleted file mode 100644 index 04e36e337d..0000000000 --- a/libraries/textcomposer/test/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ - -plugins { - id("io.element.android-compose-library") -} - -android { - namespace = "io.element.android.libraries.textcomposer.test" -} - -dependencies { - api(projects.libraries.textcomposer.impl) - implementation(projects.tests.testutils) -} From 4f872b31896612c979467d2ac143526283a1adf7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jan 2024 10:05:05 +0100 Subject: [PATCH 114/161] Remove empty module --- libraries/coroutines/.gitignore | 1 - libraries/coroutines/build.gradle.kts | 28 --------------------------- 2 files changed, 29 deletions(-) delete mode 100644 libraries/coroutines/.gitignore delete mode 100644 libraries/coroutines/build.gradle.kts diff --git a/libraries/coroutines/.gitignore b/libraries/coroutines/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/libraries/coroutines/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/libraries/coroutines/build.gradle.kts b/libraries/coroutines/build.gradle.kts deleted file mode 100644 index f9a585ec95..0000000000 --- a/libraries/coroutines/build.gradle.kts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -plugins { - id("java-library") - alias(libs.plugins.kotlin.jvm) -} - -java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 -} - -dependencies { - implementation(libs.coroutines.core) -} From b727312040a8b27e1048309e5b0ec169abb84580 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jan 2024 10:49:42 +0100 Subject: [PATCH 115/161] Upgrade Kover to 0.7.5 --- .github/workflows/nightlyReports.yml | 4 +- .github/workflows/tests.yml | 6 +- app/build.gradle.kts | 193 +++++++++++++++++++++++++++ build.gradle.kts | 158 +--------------------- changelog.d/1782.misc | 1 + docs/_developer_onboarding.md | 10 +- gradle/libs.versions.toml | 2 +- 7 files changed, 210 insertions(+), 164 deletions(-) create mode 100644 changelog.d/1782.misc diff --git a/.github/workflows/nightlyReports.yml b/.github/workflows/nightlyReports.yml index 3cb4119f99..a7eaee7828 100644 --- a/.github/workflows/nightlyReports.yml +++ b/.github/workflows/nightlyReports.yml @@ -33,7 +33,7 @@ jobs: run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: 📈 Generate kover report and verify coverage - run: ./gradlew koverMergedReport koverMergedVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true + run: ./gradlew :app:koverHtmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true - name: ✅ Upload kover report if: always() @@ -41,7 +41,7 @@ jobs: with: name: kover-results path: | - **/build/reports/kover/merged + **/build/reports/kover - name: 🔊 Publish results to Sonar env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6188145d67..680a3a05ea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,7 +55,7 @@ jobs: run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: 📈Generate kover report and verify coverage - run: ./gradlew koverMergedReport koverMergedVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true + run: ./gradlew :app:koverHtmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true - name: 🚫 Upload kover failed coverage reports if: failure() @@ -63,7 +63,7 @@ jobs: with: name: kover-error-report path: | - **/kover/merged/verification/errors.txt + app/build/reports/kover/verify.err - name: ✅ Upload kover report (disabled) if: always() @@ -83,4 +83,4 @@ jobs: if: always() uses: codecov/codecov-action@v3 # with: - # files: build/reports/kover/merged/xml/report.xml + # files: build/reports/kover/xml/report.xml diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 91f924af91..c9c0603b3e 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -190,6 +190,199 @@ knit { } } +/** + * Kover configuration + */ + +dependencies { + // Add all sub projects to kover except some of them + project.rootProject.subprojects + .filter { + it.project.projectDir.resolve("build.gradle.kts").exists() + } + .map { it.path } + .sorted() + .filter { + it !in listOf( + ":app", + ":samples", + ":anvilannotations", + ":anvilcodegen", + ":samples:minimal", + ":tests:testutils", + // Exclude `:libraries:matrix:impl` module, it contains only wrappers to access the Rust Matrix + // SDK api, so it is not really relevant to unit test it: there is no logic to test. + ":libraries:matrix:impl", + // Exclude modules which are not Android libraries + // See https://github.com/Kotlin/kotlinx-kover/issues/312 + ":appconfig", + ":libraries:core", + ":libraries:coroutines", + ":libraries:di", + ":libraries:rustsdk", + ":libraries:textcomposer:lib", + ) + } + .forEach { + // println("Add $it to kover") + kover(project(it)) + } +} + +// https://kotlin.github.io/kotlinx-kover/ +// Run `./gradlew :app:koverHtmlReport` to get report at ./app/build/reports/kover +// Run `./gradlew :app:koverXmlReport` to get XML report +koverReport { + filters { + excludes { + classes( + // Exclude generated classes. + "*_ModuleKt", + "anvil.hint.binding.io.element.*", + "anvil.hint.merge.*", + "anvil.hint.multibinding.io.element.*", + "anvil.module.*", + "com.airbnb.android.showkase*", + "io.element.android.libraries.designsystem.showkase.*", + "io.element.android.x.di.DaggerAppComponent*", + "*_Factory", + "*_Factory_Impl", + "*_Factory$*", + "*_Module", + "*_Module$*", + "*Module_Provides*", + "Dagger*Component*", + "*ComposableSingletons$*", + "*_AssistedFactory_Impl*", + "*BuildConfig", + // Generated by Showkase + "*Ioelementandroid*PreviewKt$*", + "*Ioelementandroid*PreviewKt", + // Other + // We do not cover Nodes (normally covered by maestro, but code coverage is not computed with maestro) + "*Node", + "*Node$*", + "*Presenter\$present\$*", + // Forked from compose + "io.element.android.libraries.designsystem.theme.components.bottomsheet.*", + ) + annotatedBy( + "io.element.android.libraries.designsystem.preview.PreviewsDayNight", + "io.element.android.libraries.designsystem.preview.PreviewWithLargeHeight", + ) + } + } + + defaults { + // add reports of 'release' Android build variant to default reports + mergeWith("release") + + verify { + onCheck = true + // General rule: minimum code coverage. + rule("Global minimum code coverage.") { + isEnabled = true + entity = kotlinx.kover.gradle.plugin.dsl.GroupingEntityType.APPLICATION + bound { + minValue = 65 + // Setting a max value, so that if coverage is bigger, it means that we have to change minValue. + // For instance if we have minValue = 20 and maxValue = 30, and current code coverage is now 31.32%, update + // minValue to 25 and maxValue to 35. + maxValue = 75 + metric = kotlinx.kover.gradle.plugin.dsl.MetricType.INSTRUCTION + aggregation = kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE + } + } + // Rule to ensure that coverage of Presenters is sufficient. + rule("Check code coverage of presenters") { + isEnabled = true + entity = kotlinx.kover.gradle.plugin.dsl.GroupingEntityType.CLASS + filters { + includes { + classes( + "*Presenter", + ) + } + excludes { + classes( + "*Fake*Presenter", + "io.element.android.appnav.loggedin.LoggedInPresenter$*", + // Some options can't be tested at the moment + "io.element.android.features.preferences.impl.developer.DeveloperSettingsPresenter$*", + "*Presenter\$present\$*", + ) + } + } + bound { + minValue = 85 + metric = kotlinx.kover.gradle.plugin.dsl.MetricType.INSTRUCTION + aggregation = kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE + } + } + // Rule to ensure that coverage of States is sufficient. + rule("Check code coverage of states") { + isEnabled = true + entity = kotlinx.kover.gradle.plugin.dsl.GroupingEntityType.CLASS + filters { + includes { + classes( + "^*State$", + ) + } + excludes { + classes( + "io.element.android.appnav.root.RootNavState*", + "io.element.android.libraries.matrix.api.timeline.item.event.OtherState$*", + "io.element.android.libraries.matrix.api.timeline.item.event.EventSendState$*", + "io.element.android.libraries.matrix.api.room.RoomMembershipState*", + "io.element.android.libraries.matrix.api.room.MatrixRoomMembersState*", + "io.element.android.libraries.push.impl.notifications.NotificationState*", + "io.element.android.features.messages.impl.media.local.pdf.PdfViewerState", + "io.element.android.features.messages.impl.media.local.LocalMediaViewState", + "io.element.android.features.location.impl.map.MapState*", + "io.element.android.libraries.matrix.api.timeline.item.event.LocalEventSendState*", + "io.element.android.libraries.designsystem.swipe.SwipeableActionsState*", + "io.element.android.features.messages.impl.timeline.components.ExpandableState*", + "io.element.android.features.messages.impl.timeline.model.bubble.BubbleState*", + "io.element.android.libraries.maplibre.compose.CameraPositionState*", + "io.element.android.libraries.maplibre.compose.SaveableCameraPositionState", + "io.element.android.libraries.maplibre.compose.SymbolState*", + "io.element.android.features.ftue.api.state.*", + "io.element.android.features.ftue.impl.welcome.state.*", + ) + } + } + bound { + minValue = 90 + metric = kotlinx.kover.gradle.plugin.dsl.MetricType.INSTRUCTION + aggregation = kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE + } + } + // Rule to ensure that coverage of Views is sufficient (deactivated for now). + rule("Check code coverage of views") { + isEnabled = true + entity = kotlinx.kover.gradle.plugin.dsl.GroupingEntityType.CLASS + filters { + includes { + classes( + "*ViewKt", + ) + } + } + bound { + // TODO Update this value, for now there are too many missing tests. + minValue = 0 + metric = kotlinx.kover.gradle.plugin.dsl.MetricType.INSTRUCTION + aggregation = kotlinx.kover.gradle.plugin.dsl.AggregationType.COVERED_PERCENTAGE + } + } + } + } + + androidReports("release") { + } +} + dependencies { allLibrariesImpl() allServicesImpl() diff --git a/build.gradle.kts b/build.gradle.kts index 4356d1ac1e..09e1f5880f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,4 @@ import com.google.devtools.ksp.gradle.KspTask -import kotlinx.kover.api.KoverTaskExtension import org.apache.tools.ant.taskdefs.optional.ReplaceRegExp import org.jetbrains.kotlin.cli.common.toBooleanLenient @@ -41,7 +40,7 @@ plugins { alias(libs.plugins.ktlint) alias(libs.plugins.dependencygraph) alias(libs.plugins.sonarqube) - alias(libs.plugins.kover) + alias(libs.plugins.kover) apply false } tasks.register("clean").configure { @@ -164,156 +163,7 @@ allprojects { } allprojects { - apply(plugin = "kover") -} - -// https://kotlin.github.io/kotlinx-kover/ -// Run `./gradlew koverMergedHtmlReport` to get report at ./build/reports/kover -// Run `./gradlew koverMergedReport` to also get XML report -koverMerged { - enable() - - filters { - classes { - excludes.addAll( - listOf( - // Exclude generated classes. - "*_ModuleKt", - "anvil.hint.binding.io.element.*", - "anvil.hint.merge.*", - "anvil.hint.multibinding.io.element.*", - "anvil.module.*", - "com.airbnb.android.showkase*", - "io.element.android.libraries.designsystem.showkase.*", - "io.element.android.x.di.DaggerAppComponent*", - "*_Factory", - "*_Factory_Impl", - "*_Factory$*", - "*_Module", - "*_Module$*", - "*Module_Provides*", - "Dagger*Component*", - "*ComposableSingletons$*", - "*_AssistedFactory_Impl*", - "*BuildConfig", - // Generated by Showkase - "*Ioelementandroid*PreviewKt$*", - "*Ioelementandroid*PreviewKt", - // Other - // We do not cover Nodes (normally covered by maestro, but code coverage is not computed with maestro) - "*Node", - "*Node$*", - // Exclude `:libraries:matrix:impl` module, it contains only wrappers to access the Rust Matrix SDK api, so it is not really relevant to unit test it: there is no logic to test. - "io.element.android.libraries.matrix.impl.*", - "*Presenter\$present\$*", - // Forked from compose - "io.element.android.libraries.designsystem.theme.components.bottomsheet.*", - ) - ) - } - - annotations { - excludes.addAll( - listOf( - "*Preview", - ) - ) - } - - projects { - excludes.addAll( - listOf( - ":anvilannotations", - ":anvilcodegen", - ":samples:minimal", - ":tests:testutils", - ) - ) - } - } - - // Run ./gradlew koverMergedVerify to check the rules. - verify { - // Does not seems to work, so also run the task manually on the workflow. - onCheck.set(true) - // General rule: minimum code coverage. - rule { - name = "Global minimum code coverage." - target = kotlinx.kover.api.VerificationTarget.ALL - bound { - minValue = 65 - // Setting a max value, so that if coverage is bigger, it means that we have to change minValue. - // For instance if we have minValue = 20 and maxValue = 30, and current code coverage is now 31.32%, update - // minValue to 25 and maxValue to 35. - maxValue = 75 - counter = kotlinx.kover.api.CounterType.INSTRUCTION - valueType = kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE - } - } - // Rule to ensure that coverage of Presenters is sufficient. - rule { - name = "Check code coverage of presenters" - target = kotlinx.kover.api.VerificationTarget.CLASS - overrideClassFilter { - includes += "*Presenter" - excludes += "*Fake*Presenter" - excludes += "io.element.android.appnav.loggedin.LoggedInPresenter$*" - // Some options can't be tested at the moment - excludes += "io.element.android.features.preferences.impl.developer.DeveloperSettingsPresenter$*" - excludes += "*Presenter\$present\$*" - } - bound { - minValue = 85 - counter = kotlinx.kover.api.CounterType.INSTRUCTION - valueType = kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE - } - } - // Rule to ensure that coverage of States is sufficient. - rule { - name = "Check code coverage of states" - target = kotlinx.kover.api.VerificationTarget.CLASS - overrideClassFilter { - includes += "^*State$" - excludes += "io.element.android.appnav.root.RootNavState*" - excludes += "io.element.android.libraries.matrix.api.timeline.item.event.OtherState$*" - excludes += "io.element.android.libraries.matrix.api.timeline.item.event.EventSendState$*" - excludes += "io.element.android.libraries.matrix.api.room.RoomMembershipState*" - excludes += "io.element.android.libraries.matrix.api.room.MatrixRoomMembersState*" - excludes += "io.element.android.libraries.push.impl.notifications.NotificationState*" - excludes += "io.element.android.features.messages.impl.media.local.pdf.PdfViewerState" - excludes += "io.element.android.features.messages.impl.media.local.LocalMediaViewState" - excludes += "io.element.android.features.location.impl.map.MapState*" - excludes += "io.element.android.libraries.matrix.api.timeline.item.event.LocalEventSendState*" - excludes += "io.element.android.libraries.designsystem.swipe.SwipeableActionsState*" - excludes += "io.element.android.features.messages.impl.timeline.components.ExpandableState*" - excludes += "io.element.android.features.messages.impl.timeline.model.bubble.BubbleState*" - excludes += "io.element.android.libraries.maplibre.compose.CameraPositionState*" - excludes += "io.element.android.libraries.maplibre.compose.SaveableCameraPositionState" - excludes += "io.element.android.libraries.maplibre.compose.SymbolState*" - excludes += "io.element.android.features.ftue.api.state.*" - excludes += "io.element.android.features.ftue.impl.welcome.state.*" - } - bound { - minValue = 90 - counter = kotlinx.kover.api.CounterType.INSTRUCTION - valueType = kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE - } - } - // Rule to ensure that coverage of Views is sufficient (deactivated for now). - rule { - name = "Check code coverage of views" - target = kotlinx.kover.api.VerificationTarget.CLASS - overrideClassFilter { - includes += "*ViewKt" - } - bound { - // TODO Update this value, for now there are too many missing tests. - minValue = 0 - counter = kotlinx.kover.api.CounterType.INSTRUCTION - valueType = kotlinx.kover.api.VerificationValueType.COVERED_PERCENTAGE - } - } - } + apply(plugin = "org.jetbrains.kotlinx.kover") } // When running on the CI, run only debug test variants @@ -328,10 +178,12 @@ if (isCiBuild) { allprojects { afterEvaluate { tasks.withType().configureEach { + /* TODO extensions.configure { val enabled = name.contains("debug", ignoreCase = true) - isDisabled.set(!enabled) + disabledForProject.set(!enabled) } + */ } } } diff --git a/changelog.d/1782.misc b/changelog.d/1782.misc new file mode 100644 index 0000000000..2e716795d9 --- /dev/null +++ b/changelog.d/1782.misc @@ -0,0 +1 @@ +Migrate to Kover 0.7.X diff --git a/docs/_developer_onboarding.md b/docs/_developer_onboarding.md index b4ea411710..9d5bdafb7a 100644 --- a/docs/_developer_onboarding.md +++ b/docs/_developer_onboarding.md @@ -344,26 +344,26 @@ implementation of our interfaces. Mocking can be used to mock Android framework [kover](https://github.com/Kotlin/kotlinx-kover) is used to compute code coverage. Only have unit tests can produce code coverage result. Running Maestro does not participate to the code coverage results. -Kover configuration is defined in the main [build.gradle.kts](../build.gradle.kts) file. +Kover configuration is defined in the app [build.gradle.kts](../app/build.gradle.kts) file. To compute the code coverage, run: ```bash -./gradlew koverMergedReport +./gradlew :app:koverHtmlReport ``` -and open the Html report: [../build/reports/kover/merged/html/index.html](../build/reports/kover/merged/html/index.html) +and open the Html report: [../app/build/reports/kover/html/index.html](../app/build/reports/kover/html/index.html) To ensure that the code coverage threshold are OK, you can run ```bash -./gradlew koverMergedVerify +./gradlew :app:koverVerify ``` Note that the CI performs this check on every pull requests. Also, if the rule `Global minimum code coverage.` is in error because code coverage is `> maxValue`, `minValue` and `maxValue` can be updated for this rule in -the file [build.gradle.kts](../build.gradle.kts) (you will see further instructions there). +the file [build.gradle.kts](../app/build.gradle.kts) (you will see further instructions there). ### Other points diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fe540c5b10..411d16ed8c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -215,7 +215,7 @@ dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12" dependencycheck = "org.owasp.dependencycheck:9.0.8" dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" } paparazzi = "app.cash.paparazzi:1.3.1" -kover = "org.jetbrains.kotlinx.kover:0.6.1" +kover = "org.jetbrains.kotlinx.kover:0.7.5" sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } firebaseAppDistribution = { id = "com.google.firebase.appdistribution", version.ref = "firebaseAppDistribution" } knit = { id = "org.jetbrains.kotlinx.knit", version = "0.5.0" } From 8f2a1e9e2d25a18f367eafca3646d60db9eb1271 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jan 2024 11:04:28 +0100 Subject: [PATCH 116/161] Migrate "When running on the CI, run only debug test variants". Following notice here: https://github.com/Kotlin/kotlinx-kover/blob/v0.7.0/docs/gradle-plugin/migrations/migration-to-0.7.0.md#using-isdisabled-boolean-is-an-error-kover-test-task-config-was-removed --- app/build.gradle.kts | 21 +++++++++++++++++++++ build.gradle.kts | 24 ------------------------ 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c9c0603b3e..3b978b7935 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -20,6 +20,7 @@ import com.android.build.api.variant.FilterConfiguration.FilterType.ABI import extension.allFeaturesImpl import extension.allLibrariesImpl import extension.allServicesImpl +import org.jetbrains.kotlin.cli.common.toBooleanLenient plugins { id("io.element.android-compose-application") @@ -229,6 +230,26 @@ dependencies { } } +val ciBuildProperty = "ci-build" +val isCiBuild = if (project.hasProperty(ciBuildProperty)) { + val raw = project.property(ciBuildProperty) as? String + raw?.toBooleanLenient() == true || raw?.toIntOrNull() == 1 +} else { + false +} + +kover { + // When running on the CI, run only debug test variants + if (isCiBuild) { + excludeTests { + // Disable instrumentation for debug test tasks + tasks( + "testDebugUnitTest", + ) + } + } +} + // https://kotlin.github.io/kotlinx-kover/ // Run `./gradlew :app:koverHtmlReport` to get report at ./app/build/reports/kover // Run `./gradlew :app:koverXmlReport` to get XML report diff --git a/build.gradle.kts b/build.gradle.kts index 09e1f5880f..3031f0b4e7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,6 +1,5 @@ import com.google.devtools.ksp.gradle.KspTask import org.apache.tools.ant.taskdefs.optional.ReplaceRegExp -import org.jetbrains.kotlin.cli.common.toBooleanLenient buildscript { dependencies { @@ -166,29 +165,6 @@ allprojects { apply(plugin = "org.jetbrains.kotlinx.kover") } -// When running on the CI, run only debug test variants -val ciBuildProperty = "ci-build" -val isCiBuild = if (project.hasProperty(ciBuildProperty)) { - val raw = project.property(ciBuildProperty) as? String - raw?.toBooleanLenient() == true || raw?.toIntOrNull() == 1 -} else { - false -} -if (isCiBuild) { - allprojects { - afterEvaluate { - tasks.withType().configureEach { - /* TODO - extensions.configure { - val enabled = name.contains("debug", ignoreCase = true) - disabledForProject.set(!enabled) - } - */ - } - } - } -} - // Register quality check tasks. tasks.register("runQualityChecks") { project.subprojects { From 7008b403c00bed493deb114e826a8eeea3ff8d8b Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Tue, 9 Jan 2024 12:07:10 +0100 Subject: [PATCH 117/161] Fix mention selector getting stuck when quickly deleting the prompt (#2195) * Fix mention selector getting stuck when quickly deleting the prompt --- changelog.d/2192.bugfix | 1 + .../messages/impl/messagecomposer/MessageComposerPresenter.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2192.bugfix diff --git a/changelog.d/2192.bugfix b/changelog.d/2192.bugfix new file mode 100644 index 0000000000..0138f3508c --- /dev/null +++ b/changelog.d/2192.bugfix @@ -0,0 +1 @@ +Mention selector gets stuck when quickly deleting the prompt. diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index 2e9aeaf6e6..11d1e96a1f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -192,7 +192,7 @@ class MessageComposerPresenter @Inject constructor( // This will trigger a search immediately when `@` is typed val mentionStartTrigger = suggestionSearchTrigger.filter { it?.text.isNullOrEmpty() } // This will start a search when the user changes the text after the `@` with a debounce to prevent too much wasted work - val mentionCompletionTrigger = suggestionSearchTrigger.filter { !it?.text.isNullOrEmpty() }.debounce(0.3.seconds) + val mentionCompletionTrigger = suggestionSearchTrigger.debounce(0.3.seconds).filter { !it?.text.isNullOrEmpty() } merge(mentionStartTrigger, mentionCompletionTrigger) .combine(room.membersStateFlow) { suggestion, roomMembersState -> memberSuggestions.clear() From 507d7b03d123392049529f55c38f632705f8c1a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 9 Jan 2024 13:16:24 +0000 Subject: [PATCH 118/161] Update dependency io.nlopez.compose.rules:detekt to v0.3.9 --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4356d1ac1e..36bc2e4a50 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -62,7 +62,7 @@ allprojects { config.from(files("$rootDir/tools/detekt/detekt.yml")) } dependencies { - detektPlugins("io.nlopez.compose.rules:detekt:0.3.8") + detektPlugins("io.nlopez.compose.rules:detekt:0.3.9") } // KtLint From ffa59333a1c58c9c84655833967ac30fab14a807 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jan 2024 14:15:50 +0100 Subject: [PATCH 119/161] Fix the wrong coverage report It wasn't taking into account any test result from the debug runs or screenshot tests Co-authored-by: Jorge Martin Espinosa --- app/build.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 3b978b7935..fc95fe14a2 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -295,7 +295,8 @@ koverReport { } defaults { - // add reports of 'release' Android build variant to default reports + // add reports of both 'debug' and 'release' Android build variants to default reports + mergeWith("debug") mergeWith("release") verify { From b40d661acd5f66b1c75ed8f48a3a43e4fcca07ea Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jan 2024 17:15:37 +0100 Subject: [PATCH 120/161] Kover: we need Xml report as well. --- .github/workflows/nightlyReports.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightlyReports.yml b/.github/workflows/nightlyReports.yml index a7eaee7828..7861425e28 100644 --- a/.github/workflows/nightlyReports.yml +++ b/.github/workflows/nightlyReports.yml @@ -33,7 +33,7 @@ jobs: run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: 📈 Generate kover report and verify coverage - run: ./gradlew :app:koverHtmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true + run: ./gradlew :app:koverHtmlReport :app:koverXmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true - name: ✅ Upload kover report if: always() diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 680a3a05ea..bf0379f6b6 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,7 +55,7 @@ jobs: run: ./gradlew verifyPaparazziDebug $CI_GRADLE_ARG_PROPERTIES - name: 📈Generate kover report and verify coverage - run: ./gradlew :app:koverHtmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true + run: ./gradlew :app:koverHtmlReport :app:koverXmlReport :app:koverVerify $CI_GRADLE_ARG_PROPERTIES -Pci-build=true - name: 🚫 Upload kover failed coverage reports if: failure() From 7baaac09baa02a5cbebb2bda2d8d484e89f0fa99 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 8 Jan 2024 12:34:28 +0100 Subject: [PATCH 121/161] Add missing test for LogoutView --- .../features/logout/impl/LogoutViewTest.kt | 20 +++++++++++++++++++ ...nticsNodeInteractionsProviderExtensions.kt | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt index 4958afabe7..d0f0b3f6a0 100644 --- a/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt +++ b/features/logout/impl/src/test/kotlin/io/element/android/features/logout/impl/LogoutViewTest.kt @@ -20,6 +20,7 @@ import androidx.activity.ComponentActivity import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.test.ext.junit.runners.AndroidJUnit4 import io.element.android.libraries.architecture.AsyncAction +import io.element.android.libraries.testtags.TestTags import io.element.android.libraries.ui.strings.CommonStrings import io.element.android.tests.testutils.EnsureNeverCalled import io.element.android.tests.testutils.EnsureNeverCalledWithParam @@ -28,6 +29,7 @@ import io.element.android.tests.testutils.clickOn import io.element.android.tests.testutils.ensureCalledOnce import io.element.android.tests.testutils.ensureCalledOnceWithParam import io.element.android.tests.testutils.pressBack +import io.element.android.tests.testutils.pressTag import org.junit.Rule import org.junit.Test import org.junit.runner.RunWith @@ -54,6 +56,24 @@ class LogoutViewTest { eventsRecorder.assertSingle(LogoutEvents.Logout(false)) } + @Test + fun `confirming logout sends a LogoutEvents`() { + val eventsRecorder = EventsRecorder() + rule.setContent { + LogoutView( + aLogoutState( + logoutAction = AsyncAction.Confirming, + eventSink = eventsRecorder + ), + onChangeRecoveryKeyClicked = EnsureNeverCalled(), + onBackClicked = EnsureNeverCalled(), + onSuccessLogout = EnsureNeverCalledWithParam(), + ) + } + rule.pressTag(TestTags.dialogPositive.value) + eventsRecorder.assertSingle(LogoutEvents.Logout(false)) + } + @Test fun `clicking on back invoke back callback`() { val eventsRecorder = EventsRecorder(expectEvents = false) diff --git a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt index e99825c265..7cf00ca88a 100644 --- a/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt +++ b/tests/testutils/src/main/kotlin/io/element/android/tests/testutils/SemanticsNodeInteractionsProviderExtensions.kt @@ -18,8 +18,10 @@ package io.element.android.tests.testutils import androidx.activity.ComponentActivity import androidx.annotation.StringRes +import androidx.compose.ui.test.SemanticsNodeInteractionsProvider import androidx.compose.ui.test.hasClickAction import androidx.compose.ui.test.hasContentDescription +import androidx.compose.ui.test.hasTestTag import androidx.compose.ui.test.hasText import androidx.compose.ui.test.junit4.AndroidComposeTestRule import androidx.compose.ui.test.performClick @@ -36,3 +38,7 @@ fun AndroidComposeTestRule.pressBack() { val text = activity.getString(CommonStrings.action_back) onNode(hasContentDescription(text)).performClick() } + +fun SemanticsNodeInteractionsProvider.pressTag(tag: String) { + onNode(hasTestTag(tag)).performClick() +} From 7fbe848243e77160a3ee4219d65b267fcde4cfe5 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 9 Jan 2024 11:25:06 +0100 Subject: [PATCH 122/161] Exclude `ContentToPreview` from coverage, either by using annotation @ExcludeFromCoverage, or by inlining it. --- app/build.gradle.kts | 2 ++ .../SearchMultipleUsersResultItem.kt | 5 +---- .../components/SearchSingleUserResultItem.kt | 5 +---- .../coverage/ExcludeFromCoverage.kt | 21 +++++++++++++++++++ .../components/ClickableLinkText.kt | 7 +------ .../components/LabelledCheckbox.kt | 5 +---- .../designsystem/components/ProgressDialog.kt | 5 +---- .../preferences/PreferenceCategory.kt | 5 +---- .../preferences/PreferenceCheckbox.kt | 5 +---- .../preferences/PreferenceDivider.kt | 5 +---- .../components/preferences/PreferenceRow.kt | 5 +---- .../components/preferences/PreferenceSlide.kt | 5 +---- .../preferences/PreferenceSwitch.kt | 5 +---- .../designsystem/theme/components/Checkbox.kt | 5 +---- .../components/CircularProgressIndicator.kt | 5 +---- .../theme/components/DropdownMenuItem.kt | 5 +---- .../theme/components/FloatingActionButton.kt | 6 +----- .../theme/components/HorizontalDivider.kt | 7 +------ .../designsystem/theme/components/Icon.kt | 6 +----- .../theme/components/IconButton.kt | 6 +----- .../theme/components/IconToggleButton.kt | 5 +---- .../components/LinearProgressIndicator.kt | 5 +---- .../theme/components/MediumTopAppBar.kt | 8 ++----- .../theme/components/ModalBottomSheet.kt | 2 ++ .../components/ModalBottomSheetLayout.kt | 2 ++ .../theme/components/OutlinedTextField.kt | 2 ++ .../theme/components/RadioButton.kt | 5 +---- .../designsystem/theme/components/Slider.kt | 5 +---- .../designsystem/theme/components/Surface.kt | 6 +----- .../designsystem/theme/components/Text.kt | 2 ++ .../theme/components/TextField.kt | 2 ++ .../theme/components/TopAppBar.kt | 8 ++----- .../components/previews/DatePickerPreview.kt | 2 ++ 33 files changed, 62 insertions(+), 112 deletions(-) create mode 100644 libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/coverage/ExcludeFromCoverage.kt diff --git a/app/build.gradle.kts b/app/build.gradle.kts index fc95fe14a2..da6a852877 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -288,6 +288,8 @@ koverReport { "io.element.android.libraries.designsystem.theme.components.bottomsheet.*", ) annotatedBy( + "androidx.compose.ui.tooling.preview.Preview", + "io.element.android.libraries.architecture.coverage.ExcludeFromCoverage", "io.element.android.libraries.designsystem.preview.PreviewsDayNight", "io.element.android.libraries.designsystem.preview.PreviewWithLargeHeight", ) diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchMultipleUsersResultItem.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchMultipleUsersResultItem.kt index 20f2c78d8a..b53c8a7170 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchMultipleUsersResultItem.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchMultipleUsersResultItem.kt @@ -57,10 +57,7 @@ fun SearchMultipleUsersResultItem( @Preview @Composable -internal fun SearchMultipleUsersResultItemPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun SearchMultipleUsersResultItemPreview() = ElementThemedPreview { Column { SearchMultipleUsersResultItem( searchResult = UserSearchResult( diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchSingleUserResultItem.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchSingleUserResultItem.kt index dc4f936acb..c71ef06b99 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchSingleUserResultItem.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/SearchSingleUserResultItem.kt @@ -53,10 +53,7 @@ fun SearchSingleUserResultItem( @Preview @Composable -internal fun SearchSingleUserResultItemPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun SearchSingleUserResultItemPreview() = ElementThemedPreview { Column { SearchSingleUserResultItem( searchResult = UserSearchResult(aMatrixUser(), isUnresolved = false), diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/coverage/ExcludeFromCoverage.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/coverage/ExcludeFromCoverage.kt new file mode 100644 index 0000000000..559c3f99c8 --- /dev/null +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/coverage/ExcludeFromCoverage.kt @@ -0,0 +1,21 @@ +/* + * 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.coverage + +@Retention(AnnotationRetention.RUNTIME) +@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS) +annotation class ExcludeFromCoverage diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt index 701d2945ba..eb916345d1 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt @@ -171,11 +171,7 @@ fun AnnotatedString.linkify(linkStyle: SpanStyle): AnnotatedString { @Preview(group = PreviewGroup.Text) @Composable -internal fun ClickableLinkTextPreview() = - ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun ClickableLinkTextPreview() = ElementThemedPreview { ClickableLinkText( annotatedString = AnnotatedString("Hello", ParagraphStyle()), linkAnnotationTag = "", @@ -184,4 +180,3 @@ private fun ContentToPreview() { interactionSource = remember { MutableInteractionSource() }, ) } - diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt index 4076be8653..7a45fc2dda 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledCheckbox.kt @@ -54,10 +54,7 @@ fun LabelledCheckbox( @Preview(group = PreviewGroup.Toggles) @Composable -internal fun LabelledCheckboxPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun LabelledCheckboxPreview() = ElementThemedPreview { LabelledCheckbox( checked = true, onCheckedChange = {}, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt index e678f7817c..f2dc8f470e 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt @@ -141,10 +141,7 @@ private fun ProgressDialogContent( @Preview(group = PreviewGroup.Dialogs) @Composable -internal fun ProgressDialogPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun ProgressDialogPreview() = ElementThemedPreview { DialogPreview { ProgressDialogContent(text = "test dialog content", isCancellable = true) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt index 03631634a6..2c7efb0680 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt @@ -68,10 +68,7 @@ private fun PreferenceCategoryTitle(title: String, modifier: Modifier = Modifier @Preview(group = PreviewGroup.Preferences) @Composable -internal fun PreferenceCategoryPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun PreferenceCategoryPreview() = ElementThemedPreview { PreferenceCategory( title = "Category title", ) { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCheckbox.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCheckbox.kt index 68a29c9795..579223cace 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCheckbox.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCheckbox.kt @@ -95,10 +95,7 @@ fun PreferenceCheckbox( @Preview(group = PreviewGroup.Preferences) @Composable -internal fun PreferenceCheckboxPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun PreferenceCheckboxPreview() = ElementThemedPreview { Column { PreferenceCheckbox( title = "Checkbox", diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt index 1727c68ca5..83757ca2f7 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt @@ -36,9 +36,6 @@ fun PreferenceDivider( @Preview(group = PreviewGroup.Preferences) @Composable -internal fun PreferenceDividerPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun PreferenceDividerPreview() = ElementThemedPreview { PreferenceDivider() } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceRow.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceRow.kt index ef1c6ac09a..80813a2d1a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceRow.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceRow.kt @@ -50,10 +50,7 @@ fun PreferenceRow( @Preview(group = PreviewGroup.Preferences) @Composable -internal fun PreferenceRowPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun PreferenceRowPreview() = ElementThemedPreview { PreferenceRow { Text(text = "Content") } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt index 4b125480f7..f0ad10efcb 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSlide.kt @@ -90,10 +90,7 @@ fun PreferenceSlide( @Preview(group = PreviewGroup.Preferences) @Composable -internal fun PreferenceSlidePreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun PreferenceSlidePreview() = ElementThemedPreview { PreferenceSlide( iconResourceId = CompoundDrawables.ic_user_profile, title = "Slide", diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt index 3d0ceb87c2..5e2a2c267a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceSwitch.kt @@ -102,10 +102,7 @@ fun PreferenceSwitch( @Preview(group = PreviewGroup.Preferences) @Composable -internal fun PreferenceSwitchPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun PreferenceSwitchPreview() = ElementThemedPreview { PreferenceSwitch( title = "Switch", subtitle = "Subtitle Switch", diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt index 95cf0b412e..caa2314b0d 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt @@ -90,10 +90,7 @@ private fun compoundErrorCheckBoxColors(): CheckboxColors { @Preview(group = PreviewGroup.Toggles) @Composable -internal fun CheckboxesPreview() = ElementThemedPreview(vertical = false) { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun CheckboxesPreview() = ElementThemedPreview(vertical = false) { Column { // Unchecked Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt index 5c869db9eb..88d8d83078 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt @@ -69,10 +69,7 @@ fun CircularProgressIndicator( @Preview(group = PreviewGroup.Progress) @Composable -internal fun CircularProgressIndicatorPreview() = ElementThemedPreview(vertical = false) { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun CircularProgressIndicatorPreview() = ElementThemedPreview(vertical = false) { Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { // Indeterminate progress CircularProgressIndicator( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DropdownMenuItem.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DropdownMenuItem.kt index 3e49018166..e9b65c5041 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DropdownMenuItem.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/DropdownMenuItem.kt @@ -78,10 +78,7 @@ internal object DropDownMenuItemDefaults { @Preview(group = PreviewGroup.Menus) @Composable -internal fun DropdownMenuItemPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun DropdownMenuItemPreview() = ElementThemedPreview { Column { DropdownMenuItem( text = { Text(text = "Item") }, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt index 9a01cfe69c..15893cb610 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/FloatingActionButton.kt @@ -59,11 +59,7 @@ fun FloatingActionButton( @Preview(group = PreviewGroup.FABs) @Composable -internal fun FloatingActionButtonPreview() = - ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun FloatingActionButtonPreview() = ElementThemedPreview { Box(modifier = Modifier.padding(8.dp)) { FloatingActionButton(onClick = {}) { Icon(imageVector = CompoundIcons.Close, contentDescription = null) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/HorizontalDivider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/HorizontalDivider.kt index 1a3f91a431..87f51e4665 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/HorizontalDivider.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/HorizontalDivider.kt @@ -50,11 +50,6 @@ object ElementDividerDefaults { @Composable internal fun HorizontalDividerPreview() = ElementThemedPreview { Box(Modifier.padding(vertical = 10.dp), contentAlignment = Alignment.Center) { - ContentToPreview() + HorizontalDivider() } } - -@Composable -private fun ContentToPreview() { - HorizontalDivider() -} diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt index fb36f5e3e6..a4a893f3c1 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Icon.kt @@ -140,10 +140,6 @@ fun Icon( @Preview(group = PreviewGroup.Icons) @Composable -internal fun IconImageVectorPreview() = - ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun IconImageVectorPreview() = ElementThemedPreview { Icon(imageVector = CompoundIcons.Close, contentDescription = null) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt index f0a9c12ac0..f2de08b00a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconButton.kt @@ -58,11 +58,7 @@ fun IconButton( @Preview(group = PreviewGroup.Buttons) @Composable -internal fun IconButtonPreview() = - ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun IconButtonPreview() = ElementThemedPreview { Column { CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconPrimary) { Row { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconToggleButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconToggleButton.kt index 92bc5c7605..b6ac1a4cf7 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconToggleButton.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/IconToggleButton.kt @@ -59,10 +59,7 @@ fun IconToggleButton( @Preview(group = PreviewGroup.Toggles) @Composable -internal fun IconToggleButtonPreview() = ElementThemedPreview(vertical = false) { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun IconToggleButtonPreview() = ElementThemedPreview(vertical = false) { var checked by remember { mutableStateOf(false) } Column { Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt index 6d081da298..0c4dbd68fc 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt @@ -74,10 +74,7 @@ fun LinearProgressIndicator( @Preview(group = PreviewGroup.Progress) @Composable -internal fun LinearProgressIndicatorPreview() = ElementThemedPreview(vertical = false) { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun LinearProgressIndicatorPreview() = ElementThemedPreview(vertical = false) { Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { // Indeterminate progress LinearProgressIndicator( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt index 754c5dde9c..131b2bb8ca 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/MediumTopAppBar.kt @@ -59,14 +59,10 @@ fun MediumTopAppBar( ) } +@OptIn(ExperimentalMaterial3Api::class) @Preview(group = PreviewGroup.AppBars) @Composable -internal fun MediumTopAppBarPreview() = - ElementThemedPreview { ContentToPreview() } - -@OptIn(ExperimentalMaterial3Api::class) -@Composable -private fun ContentToPreview() { +internal fun MediumTopAppBarPreview() = ElementThemedPreview { MediumTopAppBar( title = { Text(text = "Title") }, navigationIcon = { BackButton(onClick = {}) }, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt index 234a0e0b60..c4fa7f00e8 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt @@ -39,6 +39,7 @@ import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.PreviewGroup import io.element.android.libraries.designsystem.preview.sheetStateForPreview import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -93,6 +94,7 @@ internal fun ModalBottomSheetDarkPreview() = ElementPreviewDark { ContentToPreview() } @OptIn(ExperimentalMaterial3Api::class) +@ExcludeFromCoverage @Composable private fun ContentToPreview() { Box( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt index 30e5882f26..64f7b4c1f3 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt @@ -47,6 +47,7 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage import io.element.android.libraries.designsystem.modifiers.applyIf import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight @@ -110,6 +111,7 @@ internal fun ModalBottomSheetLayoutDarkPreview() = ElementPreviewDark { ContentToPreview() } @OptIn(ExperimentalMaterialApi::class) +@ExcludeFromCoverage @Composable private fun ContentToPreview() { ModalBottomSheetLayout( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt index 2c7318c447..f05c72be20 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/OutlinedTextField.kt @@ -43,6 +43,7 @@ import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.PreviewGroup @@ -166,6 +167,7 @@ internal fun OutlinedTextFieldsPreview() = ElementPreviewLight { ContentToPrevie internal fun OutlinedTextFieldsDarkPreview() = ElementPreviewDark { ContentToPreview() } @Composable +@ExcludeFromCoverage private fun ContentToPreview() { Column(modifier = Modifier.padding(4.dp)) { allBooleans.forEach { isError -> diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt index 038e74d982..789b7dbd5a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt @@ -66,10 +66,7 @@ internal fun compoundRadioButtonColors(): RadioButtonColors { @Preview(group = PreviewGroup.Toggles) @Composable -internal fun RadioButtonPreview() = ElementThemedPreview(vertical = false) { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun RadioButtonPreview() = ElementThemedPreview(vertical = false) { var checked by remember { mutableStateOf(false) } Column { Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt index 2041d7998d..1bdbcf82cf 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Slider.kt @@ -58,10 +58,7 @@ fun Slider( @Preview(group = PreviewGroup.Sliders) @Composable -internal fun SlidersPreview() = ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun SlidersPreview() = ElementThemedPreview { var value by remember { mutableFloatStateOf(0.33f) } Column { Slider(onValueChange = { value = it }, value = value, enabled = true) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt index db7ab7fc08..cda49bdd61 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Surface.kt @@ -56,11 +56,7 @@ fun Surface( @Preview @Composable -internal fun SurfacePreview() = - ElementThemedPreview { ContentToPreview() } - -@Composable -private fun ContentToPreview() { +internal fun SurfacePreview() = ElementThemedPreview { Surface { Spacer(modifier = Modifier.size(64.dp)) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt index 21330d0726..08b8860e08 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Text.kt @@ -42,6 +42,7 @@ import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import io.element.android.compound.utils.toHrf +import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.PreviewGroup @@ -120,6 +121,7 @@ internal fun TextLightPreview() = ElementPreviewLight { ContentToPreview() } @Composable internal fun TextDarkPreview() = ElementPreviewDark { ContentToPreview() } +@ExcludeFromCoverage @Composable private fun ContentToPreview() { val colors = mapOf( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt index 2ad41887aa..e5f0434c50 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TextField.kt @@ -44,6 +44,7 @@ import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.PreviewGroup @@ -154,6 +155,7 @@ internal fun TextFieldLightPreview() = internal fun TextFieldDarkPreview() = ElementPreviewDark { ContentToPreview() } +@ExcludeFromCoverage @Composable private fun ContentToPreview() { Column(modifier = Modifier.padding(4.dp)) { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt index d8bf1d7016..74dcad4fea 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/TopAppBar.kt @@ -59,14 +59,10 @@ fun TopAppBar( ) } +@OptIn(ExperimentalMaterial3Api::class) @Preview(group = PreviewGroup.AppBars) @Composable -internal fun TopAppBarPreview() = - ElementThemedPreview { ContentToPreview() } - -@OptIn(ExperimentalMaterial3Api::class) -@Composable -private fun ContentToPreview() { +internal fun TopAppBarPreview() = ElementThemedPreview { TopAppBar( title = { Text(text = "Title") }, navigationIcon = { BackButton(onClick = {}) }, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt index 1b2bfd2188..cace4b5aa3 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt @@ -23,6 +23,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.rememberDatePickerState import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview +import io.element.android.libraries.architecture.coverage.ExcludeFromCoverage import io.element.android.libraries.designsystem.theme.components.AlertDialogContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight @@ -41,6 +42,7 @@ internal fun DatePickerDarkPreview() { } @OptIn(ExperimentalMaterial3Api::class) +@ExcludeFromCoverage @Composable private fun ContentToPreview() { val state = rememberDatePickerState( From e762584a37b22fc000f06e861793ac4e412907cd Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Tue, 9 Jan 2024 18:07:23 +0100 Subject: [PATCH 123/161] Improve rendering of voice messages in the timeline in large displays (#2199) * Improve rendering of voice messages in the timeline in large displays --------- Co-authored-by: ElementBot --- changelog.d/2156.bugfix | 1 + .../components/event/TimelineItemVoiceView.kt | 4 +-- .../media/DrawScopeWaveformExtensions.kt | 7 ++-- .../components/media/WaveformPlaybackView.kt | 33 +++++++++++-------- .../components/LiveWaveformView.kt | 7 ++-- ...Unified-Day-46_46_null,NEXUS_5,1.0,en].png | 4 +-- ...ified-Night-46_47_null,NEXUS_5,1.0,en].png | 4 +-- ...View-Day-45_45_null_11,NEXUS_5,1.0,en].png | 4 +-- ...View-Day-45_45_null_12,NEXUS_5,1.0,en].png | 4 +-- ...View-Day-45_45_null_13,NEXUS_5,1.0,en].png | 4 +-- ...eView-Day-45_45_null_2,NEXUS_5,1.0,en].png | 4 +-- ...eView-Day-45_45_null_3,NEXUS_5,1.0,en].png | 4 +-- ...eView-Day-45_45_null_6,NEXUS_5,1.0,en].png | 4 +-- ...eView-Day-45_45_null_7,NEXUS_5,1.0,en].png | 4 +-- ...eView-Day-45_45_null_8,NEXUS_5,1.0,en].png | 4 +-- ...eView-Day-45_45_null_9,NEXUS_5,1.0,en].png | 4 +-- ...ew-Night-45_46_null_11,NEXUS_5,1.0,en].png | 4 +-- ...ew-Night-45_46_null_12,NEXUS_5,1.0,en].png | 4 +-- ...ew-Night-45_46_null_13,NEXUS_5,1.0,en].png | 4 +-- ...iew-Night-45_46_null_2,NEXUS_5,1.0,en].png | 4 +-- ...iew-Night-45_46_null_3,NEXUS_5,1.0,en].png | 4 +-- ...iew-Night-45_46_null_6,NEXUS_5,1.0,en].png | 4 +-- ...iew-Night-45_46_null_7,NEXUS_5,1.0,en].png | 4 +-- ...iew-Night-45_46_null_8,NEXUS_5,1.0,en].png | 4 +-- ...iew-Night-45_46_null_9,NEXUS_5,1.0,en].png | 4 +-- ...laybackView-Day_0_null,NEXUS_5,1.0,en].png | 4 +-- ...ybackView-Night_1_null,NEXUS_5,1.0,en].png | 4 +-- ...Preview-Day-15_16_null,NEXUS_5,1.0,en].png | 4 +-- ...eview-Night-15_17_null,NEXUS_5,1.0,en].png | 4 +-- ...oserVoice-Day-4_5_null,NEXUS_5,1.0,en].png | 4 +-- ...erVoice-Night-4_6_null,NEXUS_5,1.0,en].png | 4 +-- 31 files changed, 80 insertions(+), 76 deletions(-) create mode 100644 changelog.d/2156.bugfix diff --git a/changelog.d/2156.bugfix b/changelog.d/2156.bugfix new file mode 100644 index 0000000000..45c7d882c6 --- /dev/null +++ b/changelog.d/2156.bugfix @@ -0,0 +1 @@ +Improve rendering of voice messages in the timeline in large displays diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt index 1b1976e908..befb09728a 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVoiceView.kt @@ -110,9 +110,7 @@ fun TimelineItemVoiceView( showCursor = state.showCursor, playbackProgress = state.progress, waveform = content.waveform, - modifier = Modifier - .height(34.dp) - .weight(1f), + modifier = Modifier.height(34.dp), seekEnabled = !context.isScreenReaderEnabled(), onSeek = { state.eventSink(VoiceMessageEvents.Seek(it)) }, ) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/DrawScopeWaveformExtensions.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/DrawScopeWaveformExtensions.kt index 9e09d97471..4723c8ffa9 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/DrawScopeWaveformExtensions.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/DrawScopeWaveformExtensions.kt @@ -23,23 +23,22 @@ import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.graphics.drawscope.Fill import androidx.compose.ui.unit.Dp -import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp import kotlinx.collections.immutable.ImmutableList import kotlin.math.max fun DrawScope.drawWaveform( waveformData: ImmutableList, - canvasSize: DpSize, + canvasSizePx: Size, brush: Brush, minimumGraphAmplitude: Float = 2F, lineWidth: Dp = 2.dp, linePadding: Dp = 2.dp, ) { - val centerY = canvasSize.height.toPx() / 2 + val centerY = canvasSizePx.height / 2 val cornerRadius = lineWidth / 2 waveformData.forEachIndexed { index, amplitude -> - val drawingAmplitude = max(minimumGraphAmplitude, amplitude * (canvasSize.height.toPx() - 2)) + val drawingAmplitude = max(minimumGraphAmplitude, amplitude * (canvasSizePx.height - 2)) drawRoundRect( brush = brush, topLeft = Offset( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt index 6921c7f809..0672ee68b5 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt @@ -40,12 +40,13 @@ import androidx.compose.ui.graphics.drawscope.Fill import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.input.pointer.RequestDisallowInterceptTouchEvent import androidx.compose.ui.input.pointer.pointerInteropFilter +import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.compound.theme.ElementTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toPersistentList @@ -58,7 +59,7 @@ private const val DEFAULT_GRAPHICS_LAYER_ALPHA: Float = 0.99F * * @param playbackProgress The current playback progress, between 0 and 1. * @param showCursor Whether to show the cursor or not. - * @param waveform The waveform to display. Use [FakeWaveformFactory] to generate a fake waveform. + * @param waveform The waveform to display. Use [createFakeWaveform] to generate a fake waveform. * @param onSeek Callback when the user seeks the waveform. Called with a value between 0 and 1. * @param modifier The modifier to be applied to the view. * @param seekEnabled Whether the user can seek the waveform or not. @@ -103,6 +104,11 @@ fun WaveformPlaybackView( } } + val density = LocalDensity.current + val waveformWidthPx by remember { + derivedStateOf { with(density) { normalizedWaveformData.size * (lineWidth + linePadding).roundToPx().toFloat() } } + } + val requestDisallowInterceptTouchEvent = remember { RequestDisallowInterceptTouchEvent() } Canvas( modifier = Modifier @@ -110,19 +116,18 @@ fun WaveformPlaybackView( .graphicsLayer(alpha = DEFAULT_GRAPHICS_LAYER_ALPHA) .let { if (!seekEnabled) return@let it - it.pointerInteropFilter(requestDisallowInterceptTouchEvent = requestDisallowInterceptTouchEvent) { e -> return@pointerInteropFilter when (e.action) { MotionEvent.ACTION_DOWN -> { - if (e.x in 0F..canvasSizePx.width) { + if (e.x in 0F..waveformWidthPx) { requestDisallowInterceptTouchEvent.invoke(true) - seekProgress.value = e.x / canvasSizePx.width + seekProgress.value = e.x / waveformWidthPx true } else false } MotionEvent.ACTION_MOVE -> { - if (e.x in 0F..canvasSizePx.width) { - seekProgress.value = e.x / canvasSizePx.width + if (e.x in 0F..waveformWidthPx) { + seekProgress.value = e.x / waveformWidthPx } true } @@ -140,11 +145,11 @@ fun WaveformPlaybackView( ) { canvasSize = size.toDpSize() canvasSizePx = size - val centerY = canvasSize.height.toPx() / 2 val cornerRadius = lineWidth / 2 + // Calculate the size of the waveform by summing the width of all the lines and paddings drawWaveform( waveformData = normalizedWaveformData, - canvasSize = canvasSize, + canvasSizePx = canvasSizePx, brush = brush, lineWidth = lineWidth, linePadding = linePadding @@ -152,8 +157,8 @@ fun WaveformPlaybackView( drawRect( brush = progressBrush, size = Size( - width = progressAnimated.value * canvasSize.width.toPx(), - height = canvasSize.height.toPx() + width = progressAnimated.value * waveformWidthPx, + height = canvasSizePx.height ), blendMode = BlendMode.SrcAtop ) @@ -161,12 +166,12 @@ fun WaveformPlaybackView( drawRoundRect( brush = cursorBrush, topLeft = Offset( - x = progressAnimated.value * canvasSize.width.toPx(), - y = centerY - (canvasSize.height.toPx() - 2) / 2 + x = progressAnimated.value * waveformWidthPx, + y = 1f ), size = Size( width = lineWidth.toPx(), - height = canvasSize.height.toPx() - 2 + height = canvasSizePx.height - 2 ), cornerRadius = CornerRadius(cornerRadius.toPx(), cornerRadius.toPx()), style = Fill diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt index 03bf4554f6..afd10d49d7 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt @@ -31,6 +31,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Brush import androidx.compose.ui.graphics.SolidColor import androidx.compose.ui.graphics.graphicsLayer @@ -66,7 +67,6 @@ fun LiveWaveformView( } } - Box(contentAlignment = Alignment.CenterEnd, modifier = modifier .fillMaxWidth() @@ -79,11 +79,12 @@ fun LiveWaveformView( .graphicsLayer(alpha = DEFAULT_GRAPHICS_LAYER_ALPHA) .then(modifier) ) { - canvasSize = DpSize(Dp(min(waveformWidth, parentWidth.toFloat())), size.height.toDp()) + val width = min(waveformWidth, parentWidth.toFloat()) + canvasSize = DpSize(width.dp, size.height.toDp()) val countThatFitsWidth = (parentWidth.toFloat() / (lineWidth.toPx() + linePadding.toPx())).toInt() drawWaveform( waveformData = levels.takeLast(countThatFitsWidth).toPersistentList(), - canvasSize = canvasSize, + canvasSizePx = Size(canvasSize.width.toPx(), size.height), brush = brush, lineWidth = lineWidth, linePadding = linePadding, diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png index 2f20c70358..021cd12fe9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Day-46_46_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:298c750f283995af2552ac72f86fe4747287a781b8c25e890616efd08b4ae54e -size 45436 +oid sha256:070f5cc86ef672c0999e0c926bcdee09a4d8b8c70d89152a61abfe34e2289a66 +size 44929 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png index 45663f47d9..0b48f503c9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceViewUnified_null_TimelineItemVoiceViewUnified-Night-46_47_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6871183e7bba8fc9574dc838ef10626a7d573d21cea6d0a1a4219ac928c8697 -size 44211 +oid sha256:b8b86b0ff5d34a8f9223cd4a33a95494321540102ed0515d19437911abe387ac +size 43742 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png index eb9c6f5b59..172fc7bfa5 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc14498cb4178dbf6a103159eabe6e0c7f4458f2e10350eacd58a9c0beefff10 -size 10056 +oid sha256:0df1912bae9bdfb9778bfe9c8cc10c2f12a09d6b26f0d379cbec3ce5fac0a0cf +size 10050 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png index 1f07d497c6..a06ed31c56 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9df0b76dd3d46022243b03d5c5f1accabf2345b9412d2cf1f9d3e6e7d5bb18f4 -size 9565 +oid sha256:6d2949f01b23ffca6eac0eb6a21768caf27a5fc8cbca501ac691160276d32636 +size 9626 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png index 3cc13a71e9..75ef0f2bb2 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:260e882a9a068b5a81a251cfd20c6c99473fc7d905551f1e8de12d0d6165538d -size 9919 +oid sha256:0facb6fd321f293b6856724bbae2f4f686f7a87ce6229e17202b1d283b6c6f0e +size 9921 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png index 6496375c3a..b6fe17e775 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e0772d6c4f9b994d2b32de900b80faccb5598774db46fc161009a4774d6efd2 -size 5531 +oid sha256:2897384e35af54220b8f2555a376c20f289173448a5afb027fedd82a5b868966 +size 5783 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png index 5786c505b4..e707837fb9 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:438d24d36310528695e0f79d9a515a599ae27fa028c2290477a0df622240ab87 -size 6077 +oid sha256:a765606c839ce01c256aaf334e2db3bb9bb05616b5f817ea5c91b40ba2443e63 +size 6021 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png index f189640668..86b89b09d3 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:52ae85fdd9eeb0e3d81336c38147d8251079e2ae61364ca7f7cd573676dc2c57 -size 7085 +oid sha256:748b45d63f0614fe78e569474a4b18bb53656a023518b382d7143b8f6f95c8e9 +size 7094 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_7,NEXUS_5,1.0,en].png index 9d622e9a3d..18fe4c7c08 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a0f92bf5702aa5c05be66bfd03f2a4437385abe20e8d397c21aaa329018f38ee -size 6617 +oid sha256:db4dd789fa9205a59551ee15e2f08d7a37711257c5a35df4169aed8e057f87e1 +size 6729 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png index c6493ffa03..cb7d03c3f8 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:212d6a2efc1d6464086a4fbf60922efc6285705d0365752e5d264c1b19c1f97c -size 7063 +oid sha256:4845646cc19c7077373de85485a5be098d1cf1e6ab98ac80dd32de683d3595cc +size 6686 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png index a100d9b639..464bce5253 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Day-45_45_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:219a6f8e4032493f96a4df0e1072ad8ddfcd5d77c15878f26c4ffd462417b2d0 -size 7303 +oid sha256:fd11dd439776c390f18614152a34b0845a2ab99ff6c9e482cd50437c85a22b31 +size 6782 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png index 424216fd0a..5c74d5ff7b 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_11,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1dfdaca0c643c81a281658b4cee4d0e938d542a57964c3831496d04db543da45 -size 9827 +oid sha256:842aac7dfd6cf1a7f0100583508bfcf2d2cf636a3b77d175252d90260868f985 +size 9822 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png index fe41f74e9e..70b793d492 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_12,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f4b748360d95b3898a471c38ca6f1440a6b83590ebd297abdeb59539e08f25a0 -size 9535 +oid sha256:a87b958c2d5b0bc4826339ecd33eb5bbe68326b8dbe2cff8242796d031323ac1 +size 9585 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png index 8d0842cfff..f1a86e879a 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_13,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01a918a5cbe544f7f0536373b94e41673fa0dfb70a1616aebdab385b9f5e6b74 -size 9635 +oid sha256:e7ff4f4b2f76c58d94d8f31f1b86a0679d786037efa4e0077f2c7eb59bd14901 +size 9640 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png index 4b5de27180..f3d22d7c95 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_2,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c4578011963fa9d2d0a6c5e7278cabf301450e8f2b350ede3cf0b7a175657dcc -size 5519 +oid sha256:d2f8cb28bc614e73a70b5192c4c13a1ec580d0aeafa89b096443b514691d26ab +size 5749 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png index ce8785b979..d4002da274 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_3,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b3c5a7bfa1564787ee64d967e77ca84793f365e3a6d77beeba19106192eb26a3 -size 6011 +oid sha256:7d2a6926520c23d086b25bd05231943a5f094d3afe8705027b4266e4d17393a9 +size 5966 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png index 4e5b8e146d..4204d7dd78 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_6,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3817e348ba2775528e3805ad6f5eed044f82b241f73692180c0638c95fb79fa2 -size 7076 +oid sha256:c669c896158bc19ae916b0e6f1d12f42fe86506323c5bea55e0dd12d9d077153 +size 7090 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_7,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_7,NEXUS_5,1.0,en].png index b744ff24ea..10872ecda5 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_7,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_7,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7aabc26dcb237a1d87c8f888812643e472cff9f082a5fb18d800698762becb63 -size 6636 +oid sha256:457a91cca308177ac9fb46479c711e4c0863f212e0d20b82008db34a1fb6bb7a +size 6732 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png index aa42c543f5..0c5b5c460b 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_8,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:11a48af25f2b2f656a3e6ce323d2a4b392cf180555f06423c2ecc0044ef9de22 -size 6901 +oid sha256:a119b19c49aa8fc5aa092cf3a195dbd1ba48e858b7ecf4c9a922624dde9e3213 +size 6590 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png index b8da66b39c..58a6b9304d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.messages.impl.timeline.components.event_TimelineItemVoiceView_null_TimelineItemVoiceView-Night-45_46_null_9,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ce011eeb89741dcdb9c98edfd3f0daf4268e0e02b013caf12fec9b4a33d20b05 -size 7132 +oid sha256:2154ae0f36cb0b220e8f3b644a16d9a4a61f143d5edcb62f3c962a8136cce577 +size 6670 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Day_0_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Day_0_null,NEXUS_5,1.0,en].png index e762d06dd7..50560a971f 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Day_0_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Day_0_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dbe3214d0b8c497f563957c9df870aa7b6cbf981e174a7f9481cc1555af50533 -size 10247 +oid sha256:62b94ac085616506e2433b451259d209751fadd43d4442dacc49bf479329dc42 +size 10227 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Night_1_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Night_1_null,NEXUS_5,1.0,en].png index b4f6fc2a60..7d1a8158cc 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Night_1_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.designsystem.components.media_WaveformPlaybackView_null_WaveformPlaybackView-Night_1_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:876ac7c1ac9f3a188bd4ebcc4faef6fd363e166b1ec3d5a844872f7a0cf676aa -size 9969 +oid sha256:db18e528fa11b3800dfb48b68b5618edcc8d019320db68e4be5bcf5ad7d8f736 +size 9948 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Day-15_16_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Day-15_16_null,NEXUS_5,1.0,en].png index a1f501e591..1920efd1af 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Day-15_16_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Day-15_16_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1040e8767f3ce29d40842cb054dea64dc0d355b91ae86b1d25280b9308cdbda7 -size 24517 +oid sha256:e03637c50b40c8509dac9ff7c06077183945e024ee2a3d6ead14fca5cf79353f +size 24522 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Night-15_17_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Night-15_17_null,NEXUS_5,1.0,en].png index 9251738861..6367b0fd16 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Night-15_17_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer.components_VoiceMessagePreview_null_VoiceMessagePreview-Night-15_17_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:162a6b2a725ecfda754f8fe8bc06da0bd6b7efd7eb217a2e77b1ece57f89d5d6 -size 22936 +oid sha256:6a6c39ffde0c5db010ec4df376b4dc89949d4e023afbd5771a0880144c478b6f +size 22920 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Day-4_5_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Day-4_5_null,NEXUS_5,1.0,en].png index 54ba757f3e..a61313620d 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Day-4_5_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Day-4_5_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6ae5e1ef943fb5f0e0badf41d4ce6317117ab15c8ce8d1bb3a1712260f7f637b -size 28703 +oid sha256:a3559b8bbdf1127ab39b884d472c5690ae51d36811e5b27a0e6140aa58480977 +size 28661 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Night-4_6_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Night-4_6_null,NEXUS_5,1.0,en].png index 68a5a8fe7e..e6f25b5388 100644 --- a/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Night-4_6_null,NEXUS_5,1.0,en].png +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[l.textcomposer_TextComposerVoice_null_TextComposerVoice-Night-4_6_null,NEXUS_5,1.0,en].png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3a498224c5657212ae19d2854c687a6057735f12521c2a97db9f5754fb23ecfd -size 27828 +oid sha256:c144bbc058d1dfe3b75640e017c8e91f455ad86075ef415fa1e25d69d46899ee +size 27816 From 7e9cda3aa9a677a979e0c6bcda9649f84dff9824 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 10 Jan 2024 16:22:24 +0100 Subject: [PATCH 124/161] Update plugin ktlint to v12.1.0 (#2200) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update plugin ktlint to v12.1.0 * Run `./gradlew ktlintFormat` and fix some issues manually. * Fix other issues reproted by Ktlint * Limit false positives, KtLint removes unnecessary curly brace in String templates. * Remove useless Unit * Minor improvements over ktlint changes * Restore `AlertDialogContent` behaviour * Update screenshots --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Benoit Marty Co-authored-by: Jorge Martín Co-authored-by: ElementBot --- .editorconfig | 2 +- .../kotlin/io/element/android/x/MainNode.kt | 1 - .../io/element/android/x/di/AppComponent.kt | 5 +- .../io/element/android/appnav/BackstackExt.kt | 1 - .../android/appnav/LoggedInFlowNode.kt | 2 +- .../io/element/android/appnav/RootFlowNode.kt | 3 +- .../android/appnav/di/MatrixClientsHolder.kt | 3 +- .../android/appnav/loggedin/SyncStateView.kt | 8 +- .../android/appnav/room/RoomFlowNode.kt | 1 - .../room/LoadingRoomStateFlowFactoryTest.kt | 12 +- build.gradle.kts | 6 +- .../preferences/AnalyticsPreferencesView.kt | 2 +- .../impl/AnalyticsOptInStateProvider.kt | 3 +- .../impl/AnalyticsOptInPresenterTest.kt | 1 - .../AnalyticsPreferencesPresenterTest.kt | 1 - .../features/call/data/WidgetMessage.kt | 2 + .../features/call/ui/CallScreenPresenter.kt | 2 - .../utils/WebViewWidgetMessageInterceptor.kt | 2 +- .../call/ui/CallScreenPresenterTest.kt | 2 +- .../call/ui/FakeCallScreenNavigator.kt | 10 +- .../call/utils/CallIntentDataParserTest.kt | 22 +- .../call/utils/FakeCallWidgetProvider.kt | 26 +- .../utils/FakeWidgetMessageInterceptor.kt | 18 +- .../impl/DefaultCreateRoomEntryPoint.kt | 1 - .../impl/addpeople/AddPeoplePresenter.kt | 1 - .../AddPeopleUserListStateProvider.kt | 12 +- .../impl/components/RoomPrivacyOption.kt | 4 +- .../impl/configureroom/RoomPrivacyItem.kt | 2 +- .../impl/root/CreateRoomRootStateProvider.kt | 1 - .../impl/root/CreateRoomRootView.kt | 2 +- .../impl/addpeople/AddPeoplePresenterTests.kt | 1 - .../ConfigureRoomPresenterTests.kt | 1 - .../impl/root/CreateRoomRootPresenterTests.kt | 1 - .../impl/migration/MigrationScreenView.kt | 3 +- .../SharedPrefsMigrationScreenStore.kt | 1 - .../NotificationsOptInPresenter.kt | 4 +- .../ftue/impl/state/DefaultFtueState.kt | 36 +- .../features/ftue/impl/welcome/WelcomeNode.kt | 1 - .../invitelist/api/InviteListEntryPoint.kt | 1 - .../impl/DefaultSeenInvitesStore.kt | 2 - .../invitelist/impl/InviteListEvents.kt | 8 +- .../invitelist/impl/InviteListPresenter.kt | 36 +- .../invitelist/impl/InviteListView.kt | 10 +- .../impl/components/InviteSummaryRow.kt | 2 +- .../features/leaveroom/api/LeaveRoomView.kt | 2 +- .../internal/MapTilerStaticMapUrlBuilder.kt | 2 +- .../MapTilerTileServerStyleUriBuilder.kt | 2 +- .../features/location/api/LocationKtTest.kt | 2 +- .../impl/send/SendLocationEntryPointImpl.kt | 3 +- .../impl/send/SendLocationPresenter.kt | 7 +- .../impl/send/SendLocationPresenterTest.kt | 10 +- .../impl/DefaultLockScreenEntryPoint.kt | 1 - .../impl/DefaultLockScreenService.kt | 2 +- .../DefaultBiometricUnlockManager.kt | 8 +- .../impl/components/PinEntryTextField.kt | 5 +- .../settings/LockScreenSettingsFlowNode.kt | 1 - .../impl/settings/LockScreenSettingsView.kt | 5 +- .../biometric/SetupBiometricPresenter.kt | 1 - .../setup/biometric/SetupBiometricView.kt | 1 - .../impl/setup/pin/SetupPinStateProvider.kt | 1 - .../impl/storage/EncryptedPinCodeStorage.kt | 1 - .../lockscreen/impl/unlock/PinUnlockState.kt | 6 +- .../lockscreen/impl/unlock/PinUnlockView.kt | 4 +- .../impl/unlock/keypad/PinKeypad.kt | 4 +- .../impl/setup/pin/SetupPinPresenterTest.kt | 2 +- .../AccountProviderDataSource.kt | 3 +- .../accountprovider/AccountProviderView.kt | 8 +- .../impl/changeserver/ChangeServerView.kt | 8 +- .../login/impl/oidc/webview/OidcEvents.kt | 2 +- .../login/impl/resolver/HomeserverResolver.kt | 6 +- .../resolver/network/WellKnownBaseConfig.kt | 4 +- .../network/WellKnownSlidingSyncConfig.kt | 4 +- .../loginpassword/LoginPasswordView.kt | 4 +- .../SearchAccountProviderView.kt | 4 +- .../screens/waitlistscreen/WaitListView.kt | 1 - .../logout/impl/DefaultLogoutEntryPoint.kt | 1 - .../features/logout/impl/LogoutPresenter.kt | 2 +- .../logout/impl/LogoutPresenterTest.kt | 1 - .../DefaultDirectLogoutPresenterTest.kt | 1 - .../impl/ExpandableBottomSheetScaffold.kt | 6 +- .../features/messages/impl/MessagesNode.kt | 2 +- .../impl/actionlist/ActionListView.kt | 13 +- .../preview/AttachmentsPreviewPresenter.kt | 1 - .../preview/AttachmentsPreviewState.kt | 1 - .../AttachmentsPreviewStateProvider.kt | 3 +- .../preview/AttachmentsPreviewView.kt | 2 - .../mentions/MentionSuggestionsProcessor.kt | 4 +- .../messagecomposer/AttachmentsBottomSheet.kt | 8 +- .../MessageComposerPresenter.kt | 1 - .../RichTextEditorStateFactory.kt | 1 - .../timeline/DefaultHtmlConverterProvider.kt | 4 +- .../impl/timeline/TimelineStateProvider.kt | 4 +- .../messages/impl/timeline/TimelineView.kt | 4 +- .../components/MessagesReactionButton.kt | 4 +- .../components/ReplySwipeIndicator.kt | 2 +- .../components/TimelineItemEventRow.kt | 4 +- ...imelineItemEventRowForDirectRoomPreview.kt | 1 - ...ineItemEventRowWithManyReactionsPreview.kt | 1 - .../TimelineItemGroupedEventsRow.kt | 2 +- .../components/TimelineItemReactionsLayout.kt | 2 +- .../components/TimelineItemReactionsView.kt | 15 +- .../components/TimelineItemVirtualRow.kt | 3 +- .../customreaction/CustomReactionPresenter.kt | 11 +- .../customreaction/CustomReactionState.kt | 1 - .../DefaultEmojibaseProvider.kt | 3 +- .../timeline/components/event/ExtraPadding.kt | 2 +- .../event/TimelineItemInformativeView.kt | 2 +- .../event/TimelineItemLocationView.kt | 3 +- .../components/event/TimelineItemStateView.kt | 4 +- .../components/event/TimelineItemTextView.kt | 1 - .../components/event/TimelineItemVideoView.kt | 2 +- .../ReactionSummaryPresenter.kt | 19 +- .../reactionsummary/ReactionSummaryState.kt | 3 +- .../reactionsummary/ReactionSummaryView.kt | 6 +- .../receipt/TimelineItemReadReceiptView.kt | 46 +-- .../ReadReceiptBottomSheetPresenter.kt | 3 +- .../retrysendmenu/RetrySendMenuEvents.kt | 2 +- .../retrysendmenu/RetrySendMessageMenu.kt | 4 +- .../virtual/TimelineItemDaySeparatorView.kt | 4 +- .../virtual/TimelineItemReadMarkerView.kt | 2 +- .../virtual/TimelineItemRoomBeginningView.kt | 2 +- .../virtual/TimelineLoadingMoreIndicator.kt | 2 +- .../TimelineItemContentMessageFactory.kt | 2 +- .../TimelineItemContentStickerFactory.kt | 1 - .../model/TimelineItemGroupPosition.kt | 1 - .../TimelineItemLocationContentProvider.kt | 1 - .../voicemessages/VoiceMessageException.kt | 9 +- .../composer/VoiceMessageComposerEvents.kt | 18 +- .../composer/VoiceMessageComposerPlayer.kt | 1 - .../composer/VoiceMessageComposerPresenter.kt | 4 +- .../composer/VoiceMessageComposerState.kt | 1 - .../VoiceMessageComposerStateProvider.kt | 2 - .../timeline/VoiceMessagePresenter.kt | 1 - .../actionlist/ActionListPresenterTest.kt | 1 - ...tachment.kt => MediaAttachmentFixtures.kt} | 0 ...essageEvent.kt => MessageEventFixtures.kt} | 0 ...ory.kt => TimelineItemsFactoryFixtures.kt} | 0 .../CustomReactionPresenterTests.kt | 1 - .../customreaction/FakeEmojibaseProvider.kt | 2 +- .../ReactionSummaryPresenterTests.kt | 3 +- .../TimelineItemContentMessageFactoryTest.kt | 5 +- .../VoiceMessageComposerPresenterTest.kt | 1 - .../timeline/DefaultVoiceMessagePlayerTest.kt | 6 +- .../timeline/FakeHtmlConverterProvider.kt | 2 +- .../api/ui/ConnectivityIndicatorView.kt | 2 +- .../poll/api/pollcontent/PollContentView.kt | 18 +- .../actions/DefaultSendPollResponseAction.kt | 1 - .../poll/impl/create/CreatePollException.kt | 6 +- .../poll/impl/create/CreatePollPresenter.kt | 3 +- .../poll/impl/history/PollHistoryFlowNode.kt | 1 - .../poll/impl/history/PollHistoryPresenter.kt | 1 - .../poll/impl/history/PollHistoryView.kt | 2 - .../history/model/PollHistoryItemsFactory.kt | 1 - .../impl/create/PollFormStateSaverTest.kt | 1 + .../poll/impl/create/PollFormStateTest.kt | 1 - .../PollContentStateFactoryTest.kt | 18 +- .../preferences/api/PreferencesEntryPoint.kt | 1 + .../preferences/impl/about/AboutNode.kt | 2 +- .../preferences/impl/about/AboutPresenter.kt | 1 - .../preferences/impl/about/AboutView.kt | 4 +- .../impl/advanced/AdvancedSettingsView.kt | 4 +- .../impl/analytics/AnalyticsSettingsView.kt | 2 +- .../impl/developer/DeveloperSettingsEvents.kt | 2 +- .../developer/DeveloperSettingsPresenter.kt | 3 - .../NotificationSettingsState.kt | 4 - .../notifications/NotificationSettingsView.kt | 1 - .../SystemNotificationsEnabledProvider.kt | 4 +- .../edit/DefaultNotificationSettingOption.kt | 6 +- ...itDefaultNotificationSettingStateEvents.kt | 4 +- .../EditDefaultNotificationSettingView.kt | 2 - .../preferences/impl/user/UserPreferences.kt | 2 +- .../user/editprofile/EditUserProfileView.kt | 5 +- .../advanced/AdvancedSettingsPresenterTest.kt | 2 +- .../tracing/ConfigureTracingPresenterTest.kt | 1 + ...faultNotificationSettingsPresenterTests.kt | 1 - .../FakeSystemNotificationsEnabledProvider.kt | 2 +- .../NotificationSettingsPresenterTests.kt | 2 +- .../rageshake/api/crash/CrashDetectionView.kt | 2 +- .../api/detection/RageshakeDetectionView.kt | 2 +- .../preferences/RageshakePreferencesView.kt | 2 +- .../bugreport/DefaultBugReportEntryPoint.kt | 1 - .../crash/DefaultCrashDetectionPresenter.kt | 2 +- .../rageshake/impl/logs/VectorFileLogger.kt | 4 +- .../impl/reporter/DefaultBugReporter.kt | 4 +- .../crash/ui/CrashDetectionPresenterTest.kt | 1 - .../RageshakeDetectionPresenterTest.kt | 1 - .../RageshakePreferencesPresenterTest.kt | 1 - .../impl/RoomDetailsStateProvider.kt | 3 +- .../impl/edit/RoomDetailsEditPresenter.kt | 6 +- .../impl/edit/RoomDetailsEditView.kt | 4 +- .../impl/invite/RoomInviteMembersPresenter.kt | 1 - .../impl/invite/RoomInviteMembersView.kt | 4 +- .../impl/members/RoomMemberListDataSource.kt | 5 +- .../impl/members/RoomMemberListPresenter.kt | 16 +- .../impl/members/RoomMemberListView.kt | 1 - .../RoomNotificationSettingsEvents.kt | 8 +- .../RoomNotificationSettingsStateProvider.kt | 3 +- .../RoomNotificationSettingsView.kt | 6 +- ...edRoomNotificationSettingsStateProvider.kt | 3 +- .../roomdetails/RoomDetailsPresenterTests.kt | 2 - .../RoomNotificationSettingsPresenterTests.kt | 6 +- .../roomlist/api/RoomListEntryPoint.kt | 1 - .../impl/DefaultRoomListEntryPoint.kt | 2 - .../roomlist/impl/InvitesEntryPointView.kt | 8 +- .../roomlist/impl/RoomListStateProvider.kt | 3 +- .../impl/components/RoomListTopBar.kt | 12 +- .../components/RoomSummaryPlaceholderRow.kt | 4 +- .../impl/datasource/InviteStateDataSource.kt | 1 - .../features/securebackup/impl/LoggerTag.kt | 1 - .../impl/root/SecureBackupRootView.kt | 2 +- .../impl/setup/SecureBackupSetupNode.kt | 5 +- .../setup/SecureBackupSetupStateMachine.kt | 3 +- .../impl/setup/SecureBackupSetupView.kt | 10 +- .../impl/setup/views/RecoveryKeyView.kt | 9 +- .../tools/RecoveryKeyVisualTransformation.kt | 5 +- .../signedout/api/SignedOutEntryPoint.kt | 1 - .../features/signedout/impl/SignedOutView.kt | 2 +- .../impl/VerifySelfSessionViewEvents.kt | 12 +- gradle/libs.versions.toml | 2 +- .../androidutils/accessibility/ContextExt.kt | 1 - .../libraries/androidutils/compat/Compat.kt | 2 +- .../{compressFile.kt => FileCompression.kt} | 0 .../{vibrator.kt => VibratorTools.kt} | 0 .../libraries/androidutils/hash/Hash.kt | 4 +- .../filesize/AndroidFileSizeFormatterTest.kt | 2 +- .../overlay/HideOverlayBackPressHandler.kt | 4 +- .../AESEncryptionDecryptionServiceTest.kt | 1 - .../impl/di/DateFormatterModule.kt | 2 +- .../deeplink/usecase/InviteFriendsUseCase.kt | 2 +- .../atomic/atoms/ElementLogoAtom.kt | 3 +- .../atomic/atoms/PlaceholderAtom.kt | 6 +- .../atomic/atoms/RedIndicatorAtom.kt | 2 +- .../atomic/atoms/RoundedIconAtom.kt | 4 +- .../atomic/atoms/UnreadIndicatorAtom.kt | 6 +- .../atomic/molecules/ButtonColumnMolecule.kt | 2 +- .../atomic/molecules/ButtonRowMolecule.kt | 2 +- .../atomic/organisms/InfoListOrganism.kt | 2 +- .../atomic/pages/HeaderFooterPage.kt | 2 +- .../atomic/pages/OnBoardingPage.kt | 8 +- .../designsystem/colors/AvatarColors.kt | 1 - .../components/ClickableLinkText.kt | 1 - .../components/LabelledOutlinedTextField.kt | 5 +- .../components/LabelledTextField.kt | 4 +- .../designsystem/components/PinIcon.kt | 8 +- .../designsystem/components/ProgressDialog.kt | 2 +- .../components/async/AsyncFailure.kt | 2 +- .../components/async/AsyncLoading.kt | 2 +- .../dialogs/MultipleSelectionDialog.kt | 2 +- .../dialogs/SingleSelectionDialog.kt | 2 +- .../list/SingleSelectionListItem.kt | 2 +- .../components/list/TextFieldListItem.kt | 2 +- .../components/media/WaveformPlaybackView.kt | 4 +- .../preferences/PreferenceCategory.kt | 4 +- .../preferences/PreferenceDivider.kt | 2 +- .../designsystem/icons/IconsPreview.kt | 8 +- .../designsystem/modifiers/CircularReveal.kt | 5 +- .../designsystem/preview/ElementPreview.kt | 2 +- .../designsystem/ruler/HorizontalRuler.kt | 2 +- .../designsystem/ruler/VerticalRuler.kt | 2 +- .../designsystem/ruler/WithRulers.kt | 2 +- .../libraries/designsystem/text/DpScale.kt | 2 +- .../designsystem/theme/ColorAliases.kt | 6 +- .../theme/components/AlertDialogContent.kt | 20 +- .../theme/components/BottomSheetDragHandle.kt | 3 +- .../designsystem/theme/components/Button.kt | 25 +- .../designsystem/theme/components/Checkbox.kt | 2 +- .../components/CircularProgressIndicator.kt | 3 +- .../components/LinearProgressIndicator.kt | 3 +- .../designsystem/theme/components/ListItem.kt | 10 +- .../theme/components/ListSectionHeader.kt | 2 +- .../theme/components/ModalBottomSheet.kt | 2 +- .../components/ModalBottomSheetLayout.kt | 9 +- .../theme/components/RadioButton.kt | 2 +- .../designsystem/theme/components/Switch.kt | 2 +- .../bottomsheet/CustomBottomSheetScaffold.kt | 4 +- .../bottomsheet/CustomSheetState.kt | 25 +- .../components/previews/DatePickerPreview.kt | 2 +- .../components/previews/TimePickerPreview.kt | 2 +- ...{CommonResources.kt => CommonDrawables.kt} | 0 .../utils/snackbar/SnackbarHost.kt | 4 +- .../utils/snackbar/SnackbarDispatcherTests.kt | 1 - .../impl/DefaultRoomLastMessageFormatter.kt | 70 ++-- .../featureflag/impl/FeatureFlagProvider.kt | 1 - .../featureflag/impl/di/FeatureFlagModule.kt | 2 +- .../featureflag/ui/FeatureListView.kt | 2 +- .../libraries/maplibre/compose/MapUpdater.kt | 1 + .../libraries/maplibre/compose/MapboxMap.kt | 12 +- .../api/auth/MatrixHomeServerDetails.kt | 2 +- .../libraries/matrix/api/core/SpaceId.kt | 4 +- .../libraries/matrix/api/core/ThreadId.kt | 4 +- .../matrix/api/encryption/BackupState.kt | 2 +- .../NotificationSettingsService.kt | 2 +- .../matrix/api/permalink/PermalinkParser.kt | 4 +- .../matrix/api/room/MatrixRoomMembersState.kt | 2 - .../libraries/matrix/api/room/Mention.kt | 6 +- .../matrix/api/room/StateEventType.kt | 2 +- .../room/powerlevels/MatrixRoomPowerLevels.kt | 1 - .../matrix/api/timeline/MatrixTimelineItem.kt | 1 - .../matrix/api/timeline/ReceiptType.kt | 2 +- .../api/timeline/item/event/EventType.kt | 14 +- .../timeline/item/event/MembershipChange.kt | 2 +- .../api/timeline/item/event/ReactionSender.kt | 1 - .../item/event/TimelineItemEventOrigin.kt | 2 +- .../matrix/api/auth/AuthErrorCodeTest.kt | 1 - .../api/permalink/MatrixToConverterTest.kt | 1 - .../matrix/api/permalink/PermalinkDataTest.kt | 9 +- .../api/permalink/PermalinkParserTest.kt | 18 +- .../libraries/matrix/impl/RustMatrixClient.kt | 6 +- .../impl/media/MediaUploadHandlerImpl.kt | 2 +- .../matrix/impl/room/MatrixRoomInfoMapper.kt | 6 +- .../matrix/impl/room/RustMatrixRoom.kt | 2 +- .../matrix/impl/roomlist/RoomListFactory.kt | 1 - .../roomlist/RoomSummaryDetailsFactory.kt | 1 - .../impl/timeline/RustMatrixTimeline.kt | 4 +- .../item/event/EventTimelineItemMapper.kt | 10 +- .../item/event/TimelineEventContentMapper.kt | 2 +- .../matrix/impl/tracing/LogEventLocation.kt | 1 - .../matrix/impl/widget/RustWidgetDriver.kt | 2 +- .../AuthenticationExceptionMappingTest.kt | 4 +- .../test/roomlist/SimplePagedRoomList.kt | 4 +- .../matrix/test/timeline/TimelineFixture.kt | 4 +- .../ui/components/AvatarActionBottomSheet.kt | 2 +- .../matrix/ui/components/MatrixUserHeader.kt | 4 +- .../components/MatrixUserHeaderPlaceholder.kt | 4 +- .../matrix/ui/components/MatrixUserRow.kt | 2 +- .../matrix/ui/components/UnsavedAvatar.kt | 4 +- .../matrix/ui/media/MediaRequestData.kt | 1 - .../matrix/ui/media/MediaRequestDataKeyer.kt | 2 +- .../matrix/ui/messages/ToHtmlDocument.kt | 20 +- .../matrix/ui/messages/ToPlainText.kt | 2 +- .../matrix/ui/room/MatrixRoomState.kt | 1 - .../matrixui/messages/ToPlainTextTest.kt | 9 +- .../libraries/mediapickers/PickerTypeTest.kt | 1 - .../mediapickers/impl/PickerProviderImpl.kt | 2 +- .../mediaupload/api/MediaPreProcessor.kt | 1 - .../impl/AndroidMediaPreProcessor.kt | 2 - ...ze.kt => FileExtensionAndSizeFormatter.kt} | 0 .../api/local/LocalMediaActions.kt | 1 - .../mediaviewer/api/local/LocalMediaView.kt | 8 +- .../mediaviewer/api/local/MediaInfo.kt | 25 +- .../mediaviewer/api/local/pdf/PdfPage.kt | 7 +- .../api/local/pdf/PdfViewerState.kt | 4 +- .../api/viewer/MediaViewerEvents.kt | 6 +- .../api/viewer/MediaViewerPresenter.kt | 9 +- .../mediaviewer/api/viewer/MediaViewerView.kt | 1 - .../mediaviewer/MediaViewerPresenterTest.kt | 7 +- .../impl/local/AndroidLocalMediaFactory.kt | 1 - .../mediaviewer/test/FakeLocalMediaActions.kt | 2 +- .../mediaviewer/test/FakeLocalMediaFactory.kt | 2 +- .../test/viewer/{media.kt => LocalMedia.kt} | 1 - .../interceptors/FormattedJsonHttpLogger.kt | 8 +- .../permissions/api/PermissionsView.kt | 2 +- .../impl/DefaultPermissionStateProvider.kt | 2 +- .../impl/FakePermissionStateProvider.kt | 2 +- .../notifications/FilteredEventDetector.kt | 2 +- .../impl/notifications/NotificationAction.kt | 6 +- .../notifications/OutdatedEventDetector.kt | 2 +- .../SummaryGroupMessageCreator.kt | 5 +- .../channels/NotificationChannels.kt | 12 +- .../model/NotifiableMessageEvent.kt | 8 +- .../push/impl/pushgateway/PushGatewayAPI.kt | 1 - .../NotifiableEventProcessorTest.kt | 2 +- .../notifications/NotificationFactoryTest.kt | 4 +- .../notifications/NotificationRendererTest.kt | 6 +- .../unifiedpush/UnifiedPushGatewayResolver.kt | 2 +- .../UnregisterUnifiedPushUseCase.kt | 6 +- .../libraries/pushstore/api/UserPushStore.kt | 1 - .../pushstore/impl/UserPushStoreDataStore.kt | 2 +- .../test/userpushstore/FakeUserPushStore.kt | 3 +- .../userpushstore/FakeUserPushStoreFactory.kt | 3 +- .../roomselect/api/RoomSelectEntryPoint.kt | 1 - .../impl/DefaultRoomSelectEntryPoint.kt | 1 - .../roomselect/impl/RoomSelectPresenter.kt | 2 +- .../roomselect/impl/RoomSelectState.kt | 2 +- .../impl/RoomSelectPresenterTests.kt | 2 +- .../impl/di/SessionStorageModule.kt | 4 +- .../android/libraries/testtags/TestTags.kt | 2 - .../ElementRichTextEditorStyle.kt | 2 +- .../libraries/textcomposer/TextComposer.kt | 322 +++++++++--------- .../textcomposer/TextComposerLinkDialog.kt | 3 +- .../components/ComposerOptionsButton.kt | 3 +- .../components/DismissTextFormattingButton.kt | 3 +- .../components/FormattingOption.kt | 3 +- .../components/FormattingOptionState.kt | 1 - .../components/LiveWaveformView.kt | 7 +- .../textcomposer/components/TextFormatting.kt | 1 - .../components/VoiceMessagePreview.kt | 2 +- .../components/VoiceMessageRecorderButton.kt | 5 +- .../components/VoiceMessageRecording.kt | 2 +- .../textcomposer/model/MessageComposerMode.kt | 2 +- .../textcomposer/model/Suggestion.kt | 2 +- .../model/VoiceMessagePlayerEvent.kt | 6 +- .../model/VoiceMessageRecorderEvent.kt | 6 +- .../textcomposer/model/VoiceMessageState.kt | 6 +- .../usersearch/api/UserListDataSource.kt | 2 +- .../usersearch/impl/MatrixUserRepository.kt | 3 +- .../impl/MatrixUserRepositoryTest.kt | 1 - .../usersearch/test/FakeUserRepository.kt | 1 - .../voicerecorder/impl/VoiceRecorderImpl.kt | 3 +- .../impl/audio/AndroidAudioReader.kt | 3 +- .../voicerecorder/impl/audio/AudioReader.kt | 1 - .../impl/audio/DefaultEncoder.kt | 2 +- .../impl/VoiceRecorderImplTest.kt | 2 +- .../test/FakeAudioRecorderFactory.kt | 2 +- .../voicerecorder/test/FakeFileSystem.kt | 2 +- .../voicerecorder/test/FakeVoiceRecorder.kt | 3 +- .../android/samples/minimal/MainActivity.kt | 1 - .../analytics/api/AnalyticsService.kt | 2 +- .../analytics/api/extensions/JoinedRoomExt.kt | 8 +- .../analytics/api/extensions/ViewRoomExt.kt | 10 +- .../analytics/impl/store/AnalyticsStore.kt | 16 +- .../analytics/noop/NoopAnalyticsService.kt | 3 +- .../analytics/test/FakeAnalyticsService.kt | 2 +- .../api/AnalyticsProvider.kt | 2 +- .../posthog/extensions/InteractionExt.kt | 8 +- .../apperror/api/AppErrorStateService.kt | 1 - .../services/apperror/impl/AppErrorView.kt | 2 +- .../impl/DefaultAppErrorStateServiceTest.kt | 1 - .../api/AppNavigationStateService.kt | 1 - .../appnavstate/impl/di/AppNavStateModule.kt | 1 - .../api/sdk/BuildVersionSdkIntProvider.kt | 4 +- .../src/main/kotlin/ui/ShowkaseNavigation.kt | 6 +- .../test/kotlin/ui/ComponentTestPreview.kt | 1 - ...ionView-Day-0_1_null_0,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-0_1_null_3,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-0_1_null_4,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-0_2_null_0,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-0_2_null_3,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-0_2_null_4,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-1_2_null_0,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-1_2_null_3,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-1_2_null_4,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-1_2_null_5,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-1_2_null_6,NEXUS_5,1.0,en].png | 4 +- ...ionView-Day-1_2_null_7,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-1_3_null_0,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-1_3_null_3,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-1_3_null_4,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-1_3_null_5,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-1_3_null_6,NEXUS_5,1.0,en].png | 4 +- ...nView-Night-1_3_null_7,NEXUS_5,1.0,en].png | 4 +- tools/check/forbidden_strings_in_code.txt | 4 +- 442 files changed, 1091 insertions(+), 1081 deletions(-) rename features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/{aMediaAttachment.kt => MediaAttachmentFixtures.kt} (100%) rename features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/{aMessageEvent.kt => MessageEventFixtures.kt} (100%) rename features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/{timelineItemsFactory.kt => TimelineItemsFactoryFixtures.kt} (100%) rename libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/{compressFile.kt => FileCompression.kt} (100%) rename libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hardware/{vibrator.kt => VibratorTools.kt} (100%) rename libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/{CommonResources.kt => CommonDrawables.kt} (100%) rename libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/helper/{fileExtensionAndSize.kt => FileExtensionAndSizeFormatter.kt} (100%) rename libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/{media.kt => LocalMedia.kt} (99%) diff --git a/.editorconfig b/.editorconfig index 3682168027..04a5a88483 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,7 +17,7 @@ ij_wrap_on_typing = false # Ktlint rule, for more information see https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this ktlint_standard_wrapping = disabled ktlint_standard_trailing-comma-on-call-site = disabled - +ktlint_standard_spacing-between-declarations-with-annotations = disabled [*.java] ij_java_align_consecutive_assignments = false diff --git a/app/src/main/kotlin/io/element/android/x/MainNode.kt b/app/src/main/kotlin/io/element/android/x/MainNode.kt index 94cd7fa7e1..6abd0add67 100644 --- a/app/src/main/kotlin/io/element/android/x/MainNode.kt +++ b/app/src/main/kotlin/io/element/android/x/MainNode.kt @@ -68,5 +68,4 @@ class MainNode( @Parcelize object RootNavTarget : Parcelable - } diff --git a/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt b/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt index d614556413..80e61d96d4 100644 --- a/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt +++ b/app/src/main/kotlin/io/element/android/x/di/AppComponent.kt @@ -31,6 +31,9 @@ interface AppComponent : NodeFactoriesBindings { @Component.Factory interface Factory { - fun create(@ApplicationContext @BindsInstance context: Context): AppComponent + fun create( + @ApplicationContext @BindsInstance + context: Context + ): AppComponent } } diff --git a/appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt b/appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt index 36b267debb..b42330795a 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/BackstackExt.kt @@ -40,4 +40,3 @@ fun BackStack.removeLast(element: T) { } ?: return accept(Remove(lastExpectedNavElement.key)) } - diff --git a/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt index 884681766e..566855ec72 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/LoggedInFlowNode.kt @@ -138,7 +138,7 @@ class LoggedInFlowNode @AssistedInject constructor( }, onStop = { coroutineScope.launch { - //Counterpart startSync is done in observeSyncStateAndNetworkStatus method. + // Counterpart startSync is done in observeSyncStateAndNetworkStatus method. syncService.stopSync() } }, diff --git a/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt index c9dcd62048..836947ef21 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/RootFlowNode.kt @@ -268,10 +268,9 @@ class RootFlowNode @AssistedInject constructor( } private suspend fun attachSession(sessionId: SessionId): LoggedInAppScopeFlowNode { - //TODO handle multi-session + // TODO handle multi-session return waitForChildAttached { navTarget -> navTarget is NavTarget.LoggedInFlow && navTarget.sessionId == sessionId } } } - diff --git a/appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt b/appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt index f75725b1bb..c330d522d0 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/di/MatrixClientsHolder.kt @@ -65,8 +65,9 @@ class MatrixClientsHolder @Inject constructor(private val authenticationService: @Suppress("UNCHECKED_CAST") fun restoreWithSavedState(state: SavedStateMap?) { Timber.d("Restore state") - if (state == null || sessionIdsToMatrixClient.isNotEmpty()) return Unit.also { + if (state == null || sessionIdsToMatrixClient.isNotEmpty()) { Timber.w("Restore with non-empty map") + return } val sessionIds = state[SAVE_INSTANCE_KEY] as? Array Timber.d("Restore matrix session keys = ${sessionIds?.map { it.value }}") diff --git a/appnav/src/main/kotlin/io/element/android/appnav/loggedin/SyncStateView.kt b/appnav/src/main/kotlin/io/element/android/appnav/loggedin/SyncStateView.kt index 43b770f327..9522d8835f 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/loggedin/SyncStateView.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/loggedin/SyncStateView.kt @@ -59,15 +59,15 @@ fun SyncStateView( ) { Row( modifier = Modifier - .background(color = ElementTheme.colors.bgSubtleSecondary) - .padding(horizontal = 24.dp, vertical = 10.dp), + .background(color = ElementTheme.colors.bgSubtleSecondary) + .padding(horizontal = 24.dp, vertical = 10.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp) ) { CircularProgressIndicator( modifier = Modifier - .progressSemantics() - .size(12.dp), + .progressSemantics() + .size(12.dp), color = ElementTheme.colors.textPrimary, strokeWidth = 1.5.dp, ) diff --git a/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt b/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt index be9ca0ce4b..4cbb7facc8 100644 --- a/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt +++ b/appnav/src/main/kotlin/io/element/android/appnav/room/RoomFlowNode.kt @@ -136,4 +136,3 @@ class RoomFlowNode @AssistedInject constructor( ) } } - diff --git a/appnav/src/test/kotlin/io/element/android/appnav/room/LoadingRoomStateFlowFactoryTest.kt b/appnav/src/test/kotlin/io/element/android/appnav/room/LoadingRoomStateFlowFactoryTest.kt index 6997f07233..f2de790709 100644 --- a/appnav/src/test/kotlin/io/element/android/appnav/room/LoadingRoomStateFlowFactoryTest.kt +++ b/appnav/src/test/kotlin/io/element/android/appnav/room/LoadingRoomStateFlowFactoryTest.kt @@ -31,22 +31,22 @@ class LoadingRoomStateFlowFactoryTest { @Test fun `flow should emit Loading and then Loaded when there is a room in cache`() = runTest { - val room = FakeMatrixRoom(sessionId= A_SESSION_ID, roomId = A_ROOM_ID) + val room = FakeMatrixRoom(sessionId = A_SESSION_ID, roomId = A_ROOM_ID) val matrixClient = FakeMatrixClient(A_SESSION_ID).apply { givenGetRoomResult(A_ROOM_ID, room) } val flowFactory = LoadingRoomStateFlowFactory(matrixClient) flowFactory .create(this, A_ROOM_ID) - .test { - assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loading) - assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loaded(room)) - } + .test { + assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loading) + assertThat(awaitItem()).isEqualTo(LoadingRoomState.Loaded(room)) + } } @Test fun `flow should emit Loading and then Loaded when there is a room in cache after SS is loaded`() = runTest { - val room = FakeMatrixRoom(sessionId= A_SESSION_ID, roomId = A_ROOM_ID) + val room = FakeMatrixRoom(sessionId = A_SESSION_ID, roomId = A_ROOM_ID) val roomListService = FakeRoomListService() val matrixClient = FakeMatrixClient(A_SESSION_ID, roomListService = roomListService) val flowFactory = LoadingRoomStateFlowFactory(matrixClient) diff --git a/build.gradle.kts b/build.gradle.kts index 561a35223e..0ef9844d86 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -216,13 +216,15 @@ subprojects { if (project.findProperty("composeCompilerReports") == "true") { freeCompilerArgs += listOf( "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler" + "plugin:androidx.compose.compiler.plugins.kotlin:reportsDestination=" + + "${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler" ) } if (project.findProperty("composeCompilerMetrics") == "true") { freeCompilerArgs += listOf( "-P", - "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler" + "plugin:androidx.compose.compiler.plugins.kotlin:metricsDestination=" + + "${project.layout.buildDirectory.asFile.get().absolutePath}/compose_compiler" ) } } diff --git a/features/analytics/api/src/main/kotlin/io/element/android/features/analytics/api/preferences/AnalyticsPreferencesView.kt b/features/analytics/api/src/main/kotlin/io/element/android/features/analytics/api/preferences/AnalyticsPreferencesView.kt index 9678068a3c..c9820c6556 100644 --- a/features/analytics/api/src/main/kotlin/io/element/android/features/analytics/api/preferences/AnalyticsPreferencesView.kt +++ b/features/analytics/api/src/main/kotlin/io/element/android/features/analytics/api/preferences/AnalyticsPreferencesView.kt @@ -25,8 +25,8 @@ import io.element.android.features.analytics.api.AnalyticsOptInEvents import io.element.android.features.analytics.api.R import io.element.android.libraries.designsystem.components.LINK_TAG import io.element.android.libraries.designsystem.components.list.ListItemContent -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.buildAnnotatedStringWithStyledPart import io.element.android.libraries.designsystem.theme.components.ListItem import io.element.android.libraries.designsystem.theme.components.ListSupportingText diff --git a/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInStateProvider.kt b/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInStateProvider.kt index 544e4a5649..a66ad2a176 100644 --- a/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInStateProvider.kt +++ b/features/analytics/impl/src/main/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInStateProvider.kt @@ -19,8 +19,7 @@ package io.element.android.features.analytics.impl import androidx.compose.ui.tooling.preview.PreviewParameterProvider import javax.inject.Inject -open class AnalyticsOptInStateProvider @Inject constructor( -) : PreviewParameterProvider { +open class AnalyticsOptInStateProvider @Inject constructor() : PreviewParameterProvider { override val values: Sequence get() = sequenceOf( aAnalyticsOptInState(), diff --git a/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenterTest.kt b/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenterTest.kt index 3dcb4674df..ad9c3c85af 100644 --- a/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenterTest.kt +++ b/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/AnalyticsOptInPresenterTest.kt @@ -70,4 +70,3 @@ class AnalyticsOptInPresenterTest { } } } - diff --git a/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenterTest.kt b/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenterTest.kt index 494468c530..b02a516f74 100644 --- a/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenterTest.kt +++ b/features/analytics/impl/src/test/kotlin/io/element/android/features/analytics/impl/preferences/AnalyticsPreferencesPresenterTest.kt @@ -82,4 +82,3 @@ class AnalyticsPreferencesPresenterTest { } } } - diff --git a/features/call/src/main/kotlin/io/element/android/features/call/data/WidgetMessage.kt b/features/call/src/main/kotlin/io/element/android/features/call/data/WidgetMessage.kt index 2b38f6850b..0d13c845b9 100644 --- a/features/call/src/main/kotlin/io/element/android/features/call/data/WidgetMessage.kt +++ b/features/call/src/main/kotlin/io/element/android/features/call/data/WidgetMessage.kt @@ -33,6 +33,7 @@ data class WidgetMessage( enum class Direction { @SerialName("fromWidget") FromWidget, + @SerialName("toWidget") ToWidget } @@ -41,6 +42,7 @@ data class WidgetMessage( enum class Action { @SerialName("im.vector.hangup") HangUp, + @SerialName("send_event") SendEvent, } 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 d43557c6b1..a7dfe5a33a 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 @@ -224,6 +224,4 @@ class CallScreenPresenter @AssistedInject constructor( navigator.close() widgetDriver?.close() } - } - diff --git a/features/call/src/main/kotlin/io/element/android/features/call/utils/WebViewWidgetMessageInterceptor.kt b/features/call/src/main/kotlin/io/element/android/features/call/utils/WebViewWidgetMessageInterceptor.kt index e11529f068..92e5f67d51 100644 --- a/features/call/src/main/kotlin/io/element/android/features/call/utils/WebViewWidgetMessageInterceptor.kt +++ b/features/call/src/main/kotlin/io/element/android/features/call/utils/WebViewWidgetMessageInterceptor.kt @@ -56,7 +56,7 @@ class WebViewWidgetMessageInterceptor( || !message.data.response && message.data.api == "fromWidget") { let json = JSON.stringify(event.data) ${"console.log('message sent: ' + json);".takeIf { BuildConfig.DEBUG } } - ${LISTENER_NAME}.postMessage(json); + $LISTENER_NAME.postMessage(json); } else { ${"console.log('message received (ignored): ' + JSON.stringify(event.data));".takeIf { BuildConfig.DEBUG } } } 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 2b5365118e..98e941b876 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 @@ -191,7 +191,7 @@ class CallScreenPresenterTest { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - consumeItemsUntilTimeout() + consumeItemsUntilTimeout() assertThat(matrixClient.syncService().syncState.value).isEqualTo(SyncState.Running) diff --git a/features/call/src/test/kotlin/io/element/android/features/call/ui/FakeCallScreenNavigator.kt b/features/call/src/test/kotlin/io/element/android/features/call/ui/FakeCallScreenNavigator.kt index 498503cb15..23e0cf9027 100644 --- a/features/call/src/test/kotlin/io/element/android/features/call/ui/FakeCallScreenNavigator.kt +++ b/features/call/src/test/kotlin/io/element/android/features/call/ui/FakeCallScreenNavigator.kt @@ -17,10 +17,10 @@ package io.element.android.features.call.ui class FakeCallScreenNavigator : CallScreenNavigator { - var closeCalled = false - private set + var closeCalled = false + private set - override fun close() { - closeCalled = true - } + override fun close() { + closeCalled = true } +} diff --git a/features/call/src/test/kotlin/io/element/android/features/call/utils/CallIntentDataParserTest.kt b/features/call/src/test/kotlin/io/element/android/features/call/utils/CallIntentDataParserTest.kt index eb8e756182..1de1554846 100644 --- a/features/call/src/test/kotlin/io/element/android/features/call/utils/CallIntentDataParserTest.kt +++ b/features/call/src/test/kotlin/io/element/android/features/call/utils/CallIntentDataParserTest.kt @@ -117,7 +117,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url extra param appPrompt gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}&appPrompt=true", + url = "$VALID_CALL_URL_WITH_PARAM&appPrompt=true", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS" ) } @@ -125,7 +125,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url extra param in fragment appPrompt gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#?appPrompt=true", + url = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=true", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=false&confineToRoom=true" ) } @@ -133,7 +133,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url extra param in fragment appPrompt and other gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#?appPrompt=true&otherParam=maybe", + url = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=true&otherParam=maybe", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?appPrompt=false&otherParam=maybe&confineToRoom=true" ) } @@ -141,7 +141,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url extra param confineToRoom gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}&confineToRoom=false", + url = "$VALID_CALL_URL_WITH_PARAM&confineToRoom=false", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS" ) } @@ -149,7 +149,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url extra param in fragment confineToRoom gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#?confineToRoom=false", + url = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=false", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=true&appPrompt=false" ) } @@ -157,7 +157,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url extra param in fragment confineToRoom and more gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#?confineToRoom=false&otherParam=maybe", + url = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=false&otherParam=maybe", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?confineToRoom=true&otherParam=maybe&appPrompt=false" ) } @@ -165,7 +165,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url fragment gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#fragment", + url = "$VALID_CALL_URL_WITH_PARAM#fragment", expectedResult = "$VALID_CALL_URL_WITH_PARAM#fragment?$EXTRA_PARAMS" ) } @@ -173,7 +173,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url fragment with params gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#fragment?otherParam=maybe", + url = "$VALID_CALL_URL_WITH_PARAM#fragment?otherParam=maybe", expectedResult = "$VALID_CALL_URL_WITH_PARAM#fragment?otherParam=maybe&$EXTRA_PARAMS" ) } @@ -181,7 +181,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with url fragment with other params gets url extracted`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#?otherParam=maybe", + url = "$VALID_CALL_URL_WITH_PARAM#?otherParam=maybe", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?otherParam=maybe&$EXTRA_PARAMS" ) } @@ -189,7 +189,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with empty fragment`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#", + url = "$VALID_CALL_URL_WITH_PARAM#", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS" ) } @@ -197,7 +197,7 @@ class CallIntentDataParserTest { @Test fun `Element Call url with empty fragment query`() { doTest( - url = "${VALID_CALL_URL_WITH_PARAM}#?", + url = "$VALID_CALL_URL_WITH_PARAM#?", expectedResult = "$VALID_CALL_URL_WITH_PARAM#?$EXTRA_PARAMS" ) } diff --git a/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt b/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt index 69ae340648..e7a40d70ca 100644 --- a/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt +++ b/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeCallWidgetProvider.kt @@ -24,19 +24,19 @@ import io.element.android.libraries.matrix.test.widget.FakeWidgetDriver class FakeCallWidgetProvider( private val widgetDriver: FakeWidgetDriver = FakeWidgetDriver(), private val url: String = "https://call.element.io", - ) : CallWidgetProvider { +) : CallWidgetProvider { - var getWidgetCalled = false - private set + var getWidgetCalled = false + private set - override suspend fun getWidget( - sessionId: SessionId, - roomId: RoomId, - clientId: String, - languageTag: String?, - theme: String? - ): Result> { - getWidgetCalled = true - return Result.success(widgetDriver to url) - } + override suspend fun getWidget( + sessionId: SessionId, + roomId: RoomId, + clientId: String, + languageTag: String?, + theme: String? + ): Result> { + getWidgetCalled = true + return Result.success(widgetDriver to url) } +} diff --git a/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeWidgetMessageInterceptor.kt b/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeWidgetMessageInterceptor.kt index 6e36dfff81..5a312250b0 100644 --- a/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeWidgetMessageInterceptor.kt +++ b/features/call/src/test/kotlin/io/element/android/features/call/utils/FakeWidgetMessageInterceptor.kt @@ -19,15 +19,15 @@ package io.element.android.features.call.utils import kotlinx.coroutines.flow.MutableSharedFlow class FakeWidgetMessageInterceptor : WidgetMessageInterceptor { - val sentMessages = mutableListOf() + val sentMessages = mutableListOf() - override val interceptedMessages = MutableSharedFlow(extraBufferCapacity = 1) + override val interceptedMessages = MutableSharedFlow(extraBufferCapacity = 1) - override fun sendMessage(message: String) { - sentMessages += message - } - - fun givenInterceptedMessage(message: String) { - interceptedMessages.tryEmit(message) - } + override fun sendMessage(message: String) { + sentMessages += message } + + fun givenInterceptedMessage(message: String) { + interceptedMessages.tryEmit(message) + } +} diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt index 34e514be3e..cdb0ef41ef 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/DefaultCreateRoomEntryPoint.kt @@ -29,7 +29,6 @@ import javax.inject.Inject class DefaultCreateRoomEntryPoint @Inject constructor() : CreateRoomEntryPoint { override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): CreateRoomEntryPoint.NodeBuilder { - val plugins = ArrayList() return object : CreateRoomEntryPoint.NodeBuilder { diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenter.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenter.kt index e3f90943c1..a3b249e274 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenter.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenter.kt @@ -45,4 +45,3 @@ class AddPeoplePresenter @Inject constructor( return userListPresenter.present() } } - diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleUserListStateProvider.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleUserListStateProvider.kt index 79969eeac7..9c7991de6b 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleUserListStateProvider.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeopleUserListStateProvider.kt @@ -37,11 +37,13 @@ open class AddPeopleUserListStateProvider : PreviewParameterProvider - UserSearchResult(matrixUser, index % 2 == 0) - } - .toImmutableList()), + searchResults = SearchBarResultState.Results( + aMatrixUserList() + .mapIndexed { index, matrixUser -> + UserSearchResult(matrixUser, index % 2 == 0) + } + .toImmutableList() + ), selectedUsers = aListOfSelectedUsers(), isSearchActive = true, selectionMode = SelectionMode.Multiple, diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/RoomPrivacyOption.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/RoomPrivacyOption.kt index a7f7c80912..1fe10df315 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/RoomPrivacyOption.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/components/RoomPrivacyOption.kt @@ -29,14 +29,14 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.semantics.Role import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.features.createroom.impl.configureroom.RoomPrivacyItem import io.element.android.features.createroom.impl.configureroom.roomPrivacyItems -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.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.RadioButton import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable fun RoomPrivacyOption( diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/RoomPrivacyItem.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/RoomPrivacyItem.kt index ea5ce36192..0dee7e5828 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/RoomPrivacyItem.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/configureroom/RoomPrivacyItem.kt @@ -19,8 +19,8 @@ package io.element.android.features.createroom.impl.configureroom import androidx.annotation.DrawableRes import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource -import io.element.android.libraries.designsystem.icons.CompoundDrawables import io.element.android.features.createroom.impl.R +import io.element.android.libraries.designsystem.icons.CompoundDrawables import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList 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 59980b7561..723c650793 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 @@ -19,7 +19,6 @@ 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.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.ui.components.aMatrixUser import io.element.android.libraries.usersearch.api.UserSearchResult diff --git a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt index 59decf9129..24b1145e2e 100644 --- a/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt +++ b/features/createroom/impl/src/main/kotlin/io/element/android/features/createroom/impl/root/CreateRoomRootView.kt @@ -106,7 +106,7 @@ fun CreateRoomRootView( onRetry = { state.userListState.selectedUsers.firstOrNull() ?.let { state.eventSink(CreateRoomRootEvents.StartDM(it)) } - // Cancel start DM if there is no more selected user (should not happen) + // Cancel start DM if there is no more selected user (should not happen) ?: state.eventSink(CreateRoomRootEvents.CancelStartDM) }, onErrorDismiss = { state.eventSink(CreateRoomRootEvents.CancelStartDM) }, diff --git a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenterTests.kt b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenterTests.kt index 968b2a1b57..9aa13af081 100644 --- a/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenterTests.kt +++ b/features/createroom/impl/src/test/kotlin/io/element/android/features/createroom/impl/addpeople/AddPeoplePresenterTests.kt @@ -57,4 +57,3 @@ class AddPeoplePresenterTests { } } } - 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 1834c0aee7..085ba16da3 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 @@ -316,4 +316,3 @@ class ConfigureRoomPresenterTests { } } } - 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 63241a3a50..ea91773efd 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 @@ -80,7 +80,6 @@ class CreateRoomRootPresenterTests { awaitItem().also { state -> assertThat(state.startDmAction).isEqualTo(startDMSuccessResult) } - } } diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/MigrationScreenView.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/MigrationScreenView.kt index bf93aa2272..d2674e3f98 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/MigrationScreenView.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/MigrationScreenView.kt @@ -50,5 +50,6 @@ fun MigrationScreenView( internal fun MigrationViewPreview() = ElementPreview { MigrationScreenView( migrationState = MigrationScreenState(isMigrating = true), - onMigrationFinished = {}) + onMigrationFinished = {} + ) } diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/SharedPrefsMigrationScreenStore.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/SharedPrefsMigrationScreenStore.kt index c39a535e7d..5e37bcb42c 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/SharedPrefsMigrationScreenStore.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/migration/SharedPrefsMigrationScreenStore.kt @@ -58,4 +58,3 @@ class SharedPrefsMigrationScreenStore @Inject constructor( private const val IS_MIGRATION_SCREEN_SHOWN_PREFIX = "is_migration_screen_shown_" } } - diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt index 5d3ac6c88f..f90dad228a 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/notifications/NotificationsOptInPresenter.kt @@ -77,8 +77,8 @@ class NotificationsOptInPresenter @AssistedInject constructor( } LaunchedEffect(notificationsPermissionsState) { - if (notificationsPermissionsState.permissionGranted - || notificationsPermissionsState.permissionAlreadyDenied) { + if (notificationsPermissionsState.permissionGranted || + notificationsPermissionsState.permissionAlreadyDenied) { callback.onNotificationsOptInFinished() } } diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt index b1abee90bc..a65d354065 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/state/DefaultFtueState.kt @@ -40,7 +40,7 @@ import javax.inject.Inject @ContributesBinding(SessionScope::class) class DefaultFtueState @Inject constructor( private val sdkVersionProvider: BuildVersionSdkIntProvider, - private val coroutineScope: CoroutineScope, + coroutineScope: CoroutineScope, private val analyticsService: AnalyticsService, private val welcomeScreenState: WelcomeScreenState, private val migrationScreenStore: MigrationScreenStore, @@ -68,21 +68,31 @@ class DefaultFtueState @Inject constructor( fun getNextStep(currentStep: FtueStep? = null): FtueStep? = when (currentStep) { - null -> if (shouldDisplayMigrationScreen()) FtueStep.MigrationScreen else getNextStep( + null -> if (shouldDisplayMigrationScreen()) { FtueStep.MigrationScreen - ) - FtueStep.MigrationScreen -> if (shouldDisplayWelcomeScreen()) FtueStep.WelcomeScreen else getNextStep( + } else { + getNextStep(FtueStep.MigrationScreen) + } + FtueStep.MigrationScreen -> if (shouldDisplayWelcomeScreen()) { FtueStep.WelcomeScreen - ) - FtueStep.WelcomeScreen -> if (shouldAskNotificationPermissions()) FtueStep.NotificationsOptIn else getNextStep( + } else { + getNextStep(FtueStep.WelcomeScreen) + } + FtueStep.WelcomeScreen -> if (shouldAskNotificationPermissions()) { FtueStep.NotificationsOptIn - ) - FtueStep.NotificationsOptIn -> if (shouldDisplayLockscreenSetup()) FtueStep.LockscreenSetup else getNextStep( + } else { + getNextStep(FtueStep.NotificationsOptIn) + } + FtueStep.NotificationsOptIn -> if (shouldDisplayLockscreenSetup()) { FtueStep.LockscreenSetup - ) - FtueStep.LockscreenSetup -> if (needsAnalyticsOptIn()) FtueStep.AnalyticsOptIn else getNextStep( + } else { + getNextStep(FtueStep.LockscreenSetup) + } + FtueStep.LockscreenSetup -> if (needsAnalyticsOptIn()) { FtueStep.AnalyticsOptIn - ) + } else { + getNextStep(FtueStep.AnalyticsOptIn) + } FtueStep.AnalyticsOptIn -> null } @@ -115,7 +125,9 @@ class DefaultFtueState @Inject constructor( val isPermissionDenied = runBlocking { permissionStateProvider.isPermissionDenied(permission).first() } val isPermissionGranted = permissionStateProvider.isPermissionGranted(permission) !isPermissionGranted && !isPermissionDenied - } else false + } else { + false + } } private fun shouldDisplayLockscreenSetup(): Boolean { diff --git a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/welcome/WelcomeNode.kt b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/welcome/WelcomeNode.kt index f4e0d9f640..43dc08cac2 100644 --- a/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/welcome/WelcomeNode.kt +++ b/features/ftue/impl/src/main/kotlin/io/element/android/features/ftue/impl/welcome/WelcomeNode.kt @@ -50,5 +50,4 @@ class WelcomeNode @AssistedInject constructor( modifier = modifier ) } - } diff --git a/features/invitelist/api/src/main/kotlin/io/element/android/features/invitelist/api/InviteListEntryPoint.kt b/features/invitelist/api/src/main/kotlin/io/element/android/features/invitelist/api/InviteListEntryPoint.kt index 790aac39be..376e705475 100644 --- a/features/invitelist/api/src/main/kotlin/io/element/android/features/invitelist/api/InviteListEntryPoint.kt +++ b/features/invitelist/api/src/main/kotlin/io/element/android/features/invitelist/api/InviteListEntryPoint.kt @@ -37,4 +37,3 @@ interface InviteListEntryPoint : FeatureEntryPoint { fun onInviteAccepted(roomId: RoomId) } } - diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/DefaultSeenInvitesStore.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/DefaultSeenInvitesStore.kt index 848a4e2ba7..70b1e17658 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/DefaultSeenInvitesStore.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/DefaultSeenInvitesStore.kt @@ -34,7 +34,6 @@ import javax.inject.Inject private val Context.dataStore: DataStore by preferencesDataStore(name = "elementx_seeninvites") private val seenInvitesKey = stringSetPreferencesKey("seenInvites") - @ContributesBinding(SessionScope::class) class DefaultSeenInvitesStore @Inject constructor( @ApplicationContext context: Context @@ -55,5 +54,4 @@ class DefaultSeenInvitesStore @Inject constructor( prefs[seenInvitesKey] = roomIds.map { it.value }.toSet() } } - } diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListEvents.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListEvents.kt index 38055b7090..ae4b74bb2c 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListEvents.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/InviteListEvents.kt @@ -22,9 +22,9 @@ sealed interface InviteListEvents { data class AcceptInvite(val invite: InviteListInviteSummary) : InviteListEvents data class DeclineInvite(val invite: InviteListInviteSummary) : InviteListEvents - data object ConfirmDeclineInvite: InviteListEvents - data object CancelDeclineInvite: InviteListEvents + data object ConfirmDeclineInvite : InviteListEvents + data object CancelDeclineInvite : InviteListEvents - data object DismissAcceptError: InviteListEvents - data object DismissDeclineError: InviteListEvents + data object DismissAcceptError : InviteListEvents + data object DismissDeclineError : InviteListEvents } 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 403f312a22..a8db7da4ff 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 @@ -159,25 +159,27 @@ class InviteListPresenter @Inject constructor( private fun RoomSummary.Filled.toInviteSummary(seen: Boolean) = details.run { val i = inviter - val avatarData = if (isDirect && i != null) + val avatarData = if (isDirect && i != null) { AvatarData( id = i.userId.value, name = i.displayName, url = i.avatarUrl, size = AvatarSize.RoomInviteItem, ) - else + } else { AvatarData( id = roomId.value, name = name, url = avatarURLString, size = AvatarSize.RoomInviteItem, ) + } - val alias = if (isDirect) + val alias = if (isDirect) { inviter?.userId?.value - else + } else { canonicalAlias + } InviteListInviteSummary( roomId = roomId, @@ -186,18 +188,20 @@ class InviteListPresenter @Inject constructor( roomAvatarData = avatarData, isDirect = isDirect, isNew = !seen, - sender = if (isDirect) null else inviter?.run { - InviteSender( - userId = userId, - displayName = displayName ?: "", - avatarData = AvatarData( - id = userId.value, - name = displayName, - url = avatarUrl, - size = AvatarSize.InviteSender, - ), - ) - }, + sender = inviter + ?.takeIf { !isDirect } + ?.run { + InviteSender( + userId = userId, + displayName = displayName ?: "", + avatarData = AvatarData( + id = userId.value, + name = displayName, + url = avatarUrl, + size = AvatarSize.InviteSender, + ), + ) + }, ) } } 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 3a804de7bc..28ecf4938d 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 @@ -69,15 +69,17 @@ fun InviteListView( ) if (state.declineConfirmationDialog is InviteDeclineConfirmationDialog.Visible) { - val contentResource = if (state.declineConfirmationDialog.isDirect) + val contentResource = if (state.declineConfirmationDialog.isDirect) { R.string.screen_invites_decline_direct_chat_message - else + } else { R.string.screen_invites_decline_chat_message + } - val titleResource = if (state.declineConfirmationDialog.isDirect) + val titleResource = if (state.declineConfirmationDialog.isDirect) { R.string.screen_invites_decline_direct_chat_title - else + } else { R.string.screen_invites_decline_chat_title + } ConfirmationDialog( content = stringResource(contentResource, state.declineConfirmationDialog.name), diff --git a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/components/InviteSummaryRow.kt b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/components/InviteSummaryRow.kt index 193b78f594..7c3c1ad1db 100644 --- a/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/components/InviteSummaryRow.kt +++ b/features/invitelist/impl/src/main/kotlin/io/element/android/features/invitelist/impl/components/InviteSummaryRow.kt @@ -39,6 +39,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextOverflow 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.R import io.element.android.features.invitelist.impl.model.InviteListInviteSummary import io.element.android.features.invitelist.impl.model.InviteListInviteSummaryProvider @@ -51,7 +52,6 @@ import io.element.android.libraries.designsystem.theme.components.Button import io.element.android.libraries.designsystem.theme.components.ButtonSize import io.element.android.libraries.designsystem.theme.components.OutlinedButton import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings private val minHeight = 72.dp diff --git a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt index 22b5fcfd03..0006ae1251 100644 --- a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt +++ b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt @@ -27,8 +27,8 @@ import androidx.compose.ui.unit.dp 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.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.ui.strings.CommonStrings diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt index 927e890248..0d06bf2c48 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerStaticMapUrlBuilder.kt @@ -65,7 +65,7 @@ internal class MapTilerStaticMapUrlBuilder( // image smaller than the available space in pixels. // The resulting image will have to be scaled to fit the available space in order // to keep the perceived content size constant at the expense of sharpness. - return "$MAPTILER_BASE_URL/${mapId}/static/${lon},${lat},${finalZoom}/${finalWidth}x${finalHeight}${scale}.webp?key=${apiKey}&attribution=bottomleft" + return "$MAPTILER_BASE_URL/$mapId/static/$lon,$lat,$finalZoom/${finalWidth}x${finalHeight}$scale.webp?key=$apiKey&attribution=bottomleft" } } diff --git a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt index 6972e45330..4220135399 100644 --- a/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt +++ b/features/location/api/src/main/kotlin/io/element/android/features/location/api/internal/MapTilerTileServerStyleUriBuilder.kt @@ -34,6 +34,6 @@ internal class MapTilerTileServerStyleUriBuilder( override fun build(darkMode: Boolean): String { val mapId = if (darkMode) darkMapId else lightMapId - return "${MAPTILER_BASE_URL}/${mapId}/style.json?key=${apiKey}" + return "$MAPTILER_BASE_URL/$mapId/style.json?key=$apiKey" } } diff --git a/features/location/api/src/test/kotlin/io/element/android/features/location/api/LocationKtTest.kt b/features/location/api/src/test/kotlin/io/element/android/features/location/api/LocationKtTest.kt index f3d1f72f22..95606fb84f 100644 --- a/features/location/api/src/test/kotlin/io/element/android/features/location/api/LocationKtTest.kt +++ b/features/location/api/src/test/kotlin/io/element/android/features/location/api/LocationKtTest.kt @@ -78,7 +78,7 @@ internal class LocationKtTest { @Test fun `encode geoUri - returns geoUri from a Location`() { - assertThat(Location(1.0,2.0,3.0f).toGeoUri()) + assertThat(Location(1.0, 2.0, 3.0f).toGeoUri()) .isEqualTo("geo:1.0,2.0;u=3.0") } } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationEntryPointImpl.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationEntryPointImpl.kt index 9edf195e28..fb5ff1c1c7 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationEntryPointImpl.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationEntryPointImpl.kt @@ -27,6 +27,7 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class SendLocationEntryPointImpl @Inject constructor() : SendLocationEntryPoint { override fun createNode( - parentNode: Node, buildContext: BuildContext + parentNode: Node, + buildContext: BuildContext ): SendLocationNode = parentNode.createNode(buildContext) } diff --git a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt index 94af55c01c..61ac5f9500 100644 --- a/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt +++ b/features/location/impl/src/main/kotlin/io/element/android/features/location/impl/send/SendLocationPresenter.kt @@ -55,8 +55,11 @@ class SendLocationPresenter @Inject constructor( val permissionsState: PermissionsState = permissionsPresenter.present() var mode: SendLocationState.Mode by remember { mutableStateOf( - if (permissionsState.isAnyGranted) SendLocationState.Mode.SenderLocation - else SendLocationState.Mode.PinLocation + if (permissionsState.isAnyGranted) { + SendLocationState.Mode.SenderLocation + } else { + SendLocationState.Mode.PinLocation + } ) } val appName by remember { derivedStateOf { buildMeta.applicationName } } diff --git a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/send/SendLocationPresenterTest.kt b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/send/SendLocationPresenterTest.kt index cfa52c4269..328f465000 100644 --- a/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/send/SendLocationPresenterTest.kt +++ b/features/location/impl/src/test/kotlin/io/element/android/features/location/impl/send/SendLocationPresenterTest.kt @@ -75,7 +75,6 @@ class SendLocationPresenterTest { moleculeFlow(RecompositionMode.Immediate) { sendLocationPresenter.present() }.test { - val initialState = awaitItem() assertThat(initialState.permissionDialog).isEqualTo(SendLocationState.Dialog.None) assertThat(initialState.mode).isEqualTo(SendLocationState.Mode.SenderLocation) @@ -102,7 +101,6 @@ class SendLocationPresenterTest { moleculeFlow(RecompositionMode.Immediate) { sendLocationPresenter.present() }.test { - val initialState = awaitItem() assertThat(initialState.permissionDialog).isEqualTo(SendLocationState.Dialog.None) assertThat(initialState.mode).isEqualTo(SendLocationState.Mode.SenderLocation) @@ -381,7 +379,9 @@ class SendLocationPresenterTest { ) fakeMessageComposerContext.apply { composerMode = MessageComposerMode.Edit( - eventId = null, defaultContent = "", transactionId = null + eventId = null, + defaultContent = "", + transactionId = null ) } @@ -427,7 +427,9 @@ class SendLocationPresenterTest { ) fakeMessageComposerContext.apply { composerMode = MessageComposerMode.Edit( - eventId = null, defaultContent = "", transactionId = null + eventId = null, + defaultContent = "", + transactionId = null ) } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenEntryPoint.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenEntryPoint.kt index 67182e4fff..4ec8855924 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenEntryPoint.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenEntryPoint.kt @@ -28,7 +28,6 @@ import javax.inject.Inject class DefaultLockScreenEntryPoint @Inject constructor() : LockScreenEntryPoint { override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): LockScreenEntryPoint.NodeBuilder { - var innerTarget: LockScreenEntryPoint.Target = LockScreenEntryPoint.Target.Unlock val callbacks = mutableListOf() diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt index 96cf7a655b..3391193bd1 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/DefaultLockScreenService.kt @@ -95,7 +95,7 @@ class DefaultLockScreenService @Inject constructor( override suspend fun onSessionCreated(userId: String) = Unit override suspend fun onSessionDeleted(userId: String) { - //TODO handle multi session at some point + // TODO handle multi session at some point pinCodeManager.deletePinCode() } }) diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/biometric/DefaultBiometricUnlockManager.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/biometric/DefaultBiometricUnlockManager.kt index 2d3dd7146b..043c6c305f 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/biometric/DefaultBiometricUnlockManager.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/biometric/DefaultBiometricUnlockManager.kt @@ -66,15 +66,15 @@ class DefaultBiometricUnlockManager @Inject constructor( * Returns true if a weak biometric method (i.e.: some face or iris unlock implementations) can be used. */ private val canUseWeakBiometricAuth: Boolean - get() = lockScreenConfig.isWeakBiometricsEnabled - && biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK) == BiometricManager.BIOMETRIC_SUCCESS + get() = lockScreenConfig.isWeakBiometricsEnabled && + biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_WEAK) == BiometricManager.BIOMETRIC_SUCCESS /** * Returns true if a strong biometric method (i.e.: fingerprint, some face or iris unlock implementations) can be used. */ private val canUseStrongBiometricAuth: Boolean - get() = lockScreenConfig.isStrongBiometricsEnabled - && biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG) == BiometricManager.BIOMETRIC_SUCCESS + get() = lockScreenConfig.isStrongBiometricsEnabled && + biometricManager.canAuthenticate(BiometricManager.Authenticators.BIOMETRIC_STRONG) == BiometricManager.BIOMETRIC_SUCCESS /** * Returns true if any biometric method (weak or strong) can be used. diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt index f0d5942542..5d6130d31e 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/components/PinEntryTextField.kt @@ -34,12 +34,12 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.text.input.KeyboardType import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.features.lockscreen.impl.pin.model.PinDigit import io.element.android.features.lockscreen.impl.pin.model.PinEntry import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.pinDigitBg -import io.element.android.compound.theme.ElementTheme @Composable fun PinEntryTextField( @@ -100,7 +100,7 @@ private fun PinDigitView( .then(appearanceModifier), contentAlignment = Alignment.Center, - ) { + ) { if (digit is PinDigit.Filled) { val text = if (isSecured) { "•" @@ -112,7 +112,6 @@ private fun PinDigitView( style = ElementTheme.typography.fontHeadingMdBold ) } - } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt index 1008ebdcf0..663330a8c2 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsFlowNode.kt @@ -125,7 +125,6 @@ class LockScreenSettingsFlowNode @AssistedInject constructor( createNode(buildContext, plugins = listOf(callback)) } NavTarget.Unknown -> node(buildContext) { } - } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsView.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsView.kt index 72ad733f4f..7c8634a078 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsView.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/settings/LockScreenSettingsView.kt @@ -20,6 +20,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter +import io.element.android.compound.theme.ElementTheme import io.element.android.features.lockscreen.impl.R import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog import io.element.android.libraries.designsystem.components.preferences.PreferenceCategory @@ -29,7 +30,6 @@ import io.element.android.libraries.designsystem.components.preferences.Preferen import io.element.android.libraries.designsystem.components.preferences.PreferenceText import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.compound.theme.ElementTheme @Composable fun LockScreenSettingsView( @@ -79,7 +79,8 @@ fun LockScreenSettingsView( }, onDismiss = { state.eventSink(LockScreenSettingsEvents.CancelRemovePin) - }) + } + ) } } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt index ff65a2c7aa..91fcf7b121 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricPresenter.kt @@ -33,7 +33,6 @@ class SetupBiometricPresenter @Inject constructor( @Composable override fun present(): SetupBiometricState { - var isBiometricSetupDone by remember { mutableStateOf(false) } diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricView.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricView.kt index 8b2a4fce4f..8e7a326c90 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricView.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/biometric/SetupBiometricView.kt @@ -97,4 +97,3 @@ internal fun SetupBiometricViewPreview(@PreviewParameter(SetupBiometricStateProv ) } } - diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt index 582c27b5fe..6e10ec7252 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinStateProvider.kt @@ -58,4 +58,3 @@ fun aSetupPinState( appName = "Element", eventSink = {} ) - diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/storage/EncryptedPinCodeStorage.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/storage/EncryptedPinCodeStorage.kt index d2a5ba4204..7e022029dc 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/storage/EncryptedPinCodeStorage.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/storage/EncryptedPinCodeStorage.kt @@ -42,5 +42,4 @@ interface EncryptedPinCodeStorage { * Returns whether the PIN code is stored or not. */ fun hasPinCode(): Flow - } 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 ae381f7031..cfe371eb3f 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 @@ -38,9 +38,9 @@ data class PinUnlockState( } val biometricUnlockErrorMessage = when { - biometricUnlockResult is BiometricUnlock.AuthenticationResult.Failure - && biometricUnlockResult.error is BiometricUnlockError - && biometricUnlockResult.error.isAuthDisabledError -> { + biometricUnlockResult is BiometricUnlock.AuthenticationResult.Failure && + biometricUnlockResult.error is BiometricUnlockError && + biometricUnlockResult.error.isAuthDisabledError -> { biometricUnlockResult.error.message } else -> null 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 6c9fd2bb6e..ad4dc5da99 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 @@ -14,7 +14,6 @@ * limitations under the License. */ - package io.element.android.features.lockscreen.impl.unlock import androidx.compose.foundation.background @@ -51,6 +50,7 @@ import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.lifecycle.Lifecycle +import io.element.android.compound.theme.ElementTheme import io.element.android.features.lockscreen.impl.R import io.element.android.features.lockscreen.impl.components.PinEntryTextField import io.element.android.features.lockscreen.impl.pin.model.PinDigit @@ -68,7 +68,6 @@ import io.element.android.libraries.designsystem.theme.components.Surface import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TextButton import io.element.android.libraries.designsystem.utils.OnLifecycleEvent -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -378,4 +377,3 @@ internal fun PinUnlockDefaultViewPreview(@PreviewParameter(PinUnlockStateProvide ) } } - diff --git a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/keypad/PinKeypad.kt b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/keypad/PinKeypad.kt index a72483b13e..6c51b10979 100644 --- a/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/keypad/PinKeypad.kt +++ b/features/lockscreen/impl/src/main/kotlin/io/element/android/features/lockscreen/impl/unlock/keypad/PinKeypad.kt @@ -41,11 +41,11 @@ import androidx.compose.ui.unit.coerceAtMost import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.times +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.text.toSp import io.element.android.libraries.designsystem.theme.components.Icon -import io.element.android.compound.theme.ElementTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf @@ -210,5 +210,3 @@ internal fun PinKeypadPreview() { } } } - - diff --git a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt index 7ec73116c2..198057218c 100644 --- a/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt +++ b/features/lockscreen/impl/src/test/kotlin/io/element/android/features/lockscreen/impl/setup/pin/SetupPinPresenterTest.kt @@ -116,7 +116,7 @@ class SetupPinPresenterTest { } } - private fun SetupPinState.onPinEntryChanged(pinEntry: String){ + private fun SetupPinState.onPinEntryChanged(pinEntry: String) { eventSink(SetupPinEvents.OnPinEntryChanged(pinEntry, isConfirmationStep)) } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderDataSource.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderDataSource.kt index ea541285df..3fb4985c8d 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderDataSource.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderDataSource.kt @@ -25,8 +25,7 @@ import kotlinx.coroutines.flow.asStateFlow import javax.inject.Inject @SingleIn(AppScope::class) -class AccountProviderDataSource @Inject constructor( -) { +class AccountProviderDataSource @Inject constructor() { private val accountProvider: MutableStateFlow = MutableStateFlow( defaultAccountProvider ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderView.kt index 7184b2503c..6780d75774 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/accountprovider/AccountProviderView.kt @@ -50,9 +50,11 @@ fun AccountProviderView( modifier: Modifier = Modifier, onClick: () -> Unit, ) { - Column(modifier = modifier - .fillMaxWidth() - .clickable { onClick() }) { + Column( + modifier = modifier + .fillMaxWidth() + .clickable { onClick() } + ) { HorizontalDivider() Column( modifier = Modifier diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt index c0fe52dacd..132003eafc 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/changeserver/ChangeServerView.kt @@ -54,9 +54,11 @@ fun ChangeServerView( onLearnMoreClicked = { onLearnMoreClicked() eventSink.invoke(ChangeServerEvents.ClearError) - }, onDismiss = { - eventSink.invoke(ChangeServerEvents.ClearError) - }) + }, + onDismiss = { + eventSink.invoke(ChangeServerEvents.ClearError) + } + ) } } } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcEvents.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcEvents.kt index ae0a912ba6..9d2f945e25 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcEvents.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/oidc/webview/OidcEvents.kt @@ -20,6 +20,6 @@ import io.element.android.features.login.api.oidc.OidcAction sealed interface OidcEvents { data object Cancel : OidcEvents - data class OidcActionEvent(val oidcAction: OidcAction): OidcEvents + data class OidcActionEvent(val oidcAction: OidcAction) : OidcEvents data object ClearError : OidcEvents } diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/HomeserverResolver.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/HomeserverResolver.kt index b1ccd8e684..98345cf79e 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/HomeserverResolver.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/HomeserverResolver.kt @@ -90,9 +90,9 @@ class HomeserverResolver @Inject constructor( if (data.contains(".")) { // TLD detected? } else { - add("${data}.org") - add("${data}.com") - add("${data}.io") + add("$data.org") + add("$data.com") + add("$data.io") } // Always try what the user has entered add(data) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownBaseConfig.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownBaseConfig.kt index 87b86736fa..e7eb1d983f 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownBaseConfig.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownBaseConfig.kt @@ -30,6 +30,6 @@ import kotlinx.serialization.Serializable */ @Serializable data class WellKnownBaseConfig( - @SerialName("base_url") - val baseURL: String? = null + @SerialName("base_url") + val baseURL: String? = null ) diff --git a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownSlidingSyncConfig.kt b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownSlidingSyncConfig.kt index 98c712d9ac..063dc6f7b4 100644 --- a/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownSlidingSyncConfig.kt +++ b/features/login/impl/src/main/kotlin/io/element/android/features/login/impl/resolver/network/WellKnownSlidingSyncConfig.kt @@ -21,6 +21,6 @@ import kotlinx.serialization.Serializable @Serializable data class WellKnownSlidingSyncConfig( - @SerialName("url") - val url: String? = null, + @SerialName("url") + val url: String? = null, ) 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 b49fe6cf00..2a6a752154 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 @@ -220,7 +220,9 @@ private fun LoginForm( Icon(imageVector = CompoundIcons.Close, contentDescription = stringResource(CommonStrings.action_clear)) } } - } else null, + } else { + null + }, ) var passwordVisible by remember { mutableStateOf(false) } 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 245c874ae2..9a5ae9b0fc 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 @@ -144,7 +144,9 @@ fun SearchAccountProviderView( ) } } - } else null, + } else { + null + }, supportingText = { Text(text = stringResource(id = R.string.screen_account_provider_form_notice), color = MaterialTheme.colorScheme.secondary) } 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 e56d1b5bca..e8a3bddc43 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 @@ -140,7 +140,6 @@ private fun OverallContent( .padding(bottom = 8.dp), ) } - } } diff --git a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutEntryPoint.kt b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutEntryPoint.kt index 4928850245..42a7e546d5 100644 --- a/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutEntryPoint.kt +++ b/features/logout/impl/src/main/kotlin/io/element/android/features/logout/impl/DefaultLogoutEntryPoint.kt @@ -43,4 +43,3 @@ class DefaultLogoutEntryPoint @Inject constructor() : LogoutEntryPoint { } } } - 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 165987900c..95e0d0790d 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,8 +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.AsyncData 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.core.bool.orTrue 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 6bcdce418e..b6f93dcf31 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 @@ -213,4 +213,3 @@ class LogoutPresenterTest { featureFlagService = FakeFeatureFlagService(mapOf(FeatureFlags.SecureStorage.key to true)), ) } - 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 6686e02efa..daaf08098b 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 @@ -194,4 +194,3 @@ class DefaultDirectLogoutPresenterTest { featureFlagService = FakeFeatureFlagService(mapOf(FeatureFlags.SecureStorage.key to true)), ) } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/ExpandableBottomSheetScaffold.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/ExpandableBottomSheetScaffold.kt index 5323531f97..d058ec968f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/ExpandableBottomSheetScaffold.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/ExpandableBottomSheetScaffold.kt @@ -152,7 +152,8 @@ internal fun ExpandableBottomSheetScaffold( top.place(x = 0, y = 0) } }, - content = { sheetContent(false) }) + content = { sheetContent(false) } + ) }, sheetDragHandle, peekHeight) }.map { measurable: Measurable -> measurable.measure(constraints) @@ -161,7 +162,8 @@ internal fun ExpandableBottomSheetScaffold( layout(constraints.maxWidth, constraints.maxHeight) { scaffoldPlaceable.place(0, 0) } - }) + } + ) } private fun CustomSheetState.getIntOffset(): Int? = try { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt index 9e871b9b25..a265f4183d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesNode.kt @@ -32,13 +32,13 @@ import io.element.android.features.messages.impl.timeline.di.LocalTimelineItemPr import io.element.android.features.messages.impl.timeline.di.TimelineItemPresenterFactories import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.libraries.core.bool.orFalse -import io.element.android.libraries.mediaplayer.api.MediaPlayer import io.element.android.libraries.di.RoomScope import io.element.android.libraries.matrix.api.core.EventId import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.room.MatrixRoom import io.element.android.libraries.matrix.api.timeline.item.TimelineItemDebugInfo +import io.element.android.libraries.mediaplayer.api.MediaPlayer import io.element.android.services.analytics.api.AnalyticsService import io.element.android.services.analytics.api.extensions.toAnalyticsViewRoom import kotlinx.collections.immutable.ImmutableList diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt index 200bed433a..3db91fd67c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/actionlist/ActionListView.kt @@ -172,9 +172,10 @@ private fun SheetContent( item { Column { MessageSummary( - event = target.event, modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp) + event = target.event, + modifier = Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp) ) Spacer(modifier = Modifier.height(14.dp)) HorizontalDivider() @@ -299,7 +300,11 @@ private fun EmojiReactionsRow( ) { // TODO use most recently used emojis here when available from the Rust SDK val defaultEmojis = sequenceOf( - "👍️", "👎️", "🔥", "❤️", "👏" + "👍️", + "👎️", + "🔥", + "❤️", + "👏" ) for (emoji in defaultEmojis) { val isHighlighted = highlightedEmojis.contains(emoji) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt index 28d403c9a6..d57d707c2c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt @@ -48,7 +48,6 @@ class AttachmentsPreviewPresenter @AssistedInject constructor( @Composable override fun present(): AttachmentsPreviewState { - val coroutineScope = rememberCoroutineScope() val sendActionState = remember { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewState.kt index 183e1ea590..ad44a1368e 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewState.kt @@ -34,4 +34,3 @@ sealed interface SendActionState { data class Failure(val error: Throwable) : SendActionState data object Done : SendActionState } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewStateProvider.kt index 37b2ee9c78..1fdc52cf99 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewStateProvider.kt @@ -36,7 +36,8 @@ open class AttachmentsPreviewStateProvider : PreviewParameterProvider Unit, modifier: Modifier = Modifier, ) { - fun postSendAttachment() { state.eventSink(AttachmentsPreviewEvents.SendAttachment) } @@ -88,7 +87,6 @@ private fun AttachmentSendStateView( onDismissClicked: () -> Unit, onRetryClicked: () -> Unit ) { - when (sendActionState) { is SendActionState.Sending -> { ProgressDialog( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/mentions/MentionSuggestionsProcessor.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/mentions/MentionSuggestionsProcessor.kt index d2c3e6e518..8a5427d8d4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/mentions/MentionSuggestionsProcessor.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/mentions/MentionSuggestionsProcessor.kt @@ -88,8 +88,8 @@ object MentionSuggestionsProcessor { } fun memberMatchesQuery(member: RoomMember, query: String): Boolean { - return member.userId.value.contains(query, ignoreCase = true) - || member.displayName?.contains(query, ignoreCase = true) == true + return member.userId.value.contains(query, ignoreCase = true) || + member.displayName?.contains(query, ignoreCase = true) == true } val matchingMembers = roomMembers diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/AttachmentsBottomSheet.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/AttachmentsBottomSheet.kt index b3b53db013..af268856e9 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/AttachmentsBottomSheet.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/AttachmentsBottomSheet.kt @@ -62,12 +62,12 @@ internal fun AttachmentsBottomSheet( } LaunchedEffect(state.showAttachmentSourcePicker) { - if (state.showAttachmentSourcePicker) { + isVisible = if (state.showAttachmentSourcePicker) { // We need to use this instead of `LocalFocusManager.clearFocus()` to hide the keyboard when focus is on an Android View localView.hideKeyboard() - isVisible = true + true } else { - isVisible = false + false } } // Send 'DismissAttachmentMenu' event when the bottomsheet was just hidden @@ -122,7 +122,7 @@ private fun AttachmentSourcePickerMenu( ) ListItem( modifier = Modifier.clickable { state.eventSink(MessageComposerEvents.PickAttachmentSource.PhotoFromCamera) }, - leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_take_photo_camera, )), + leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_take_photo_camera)), headlineContent = { Text(stringResource(R.string.screen_room_attachment_source_camera_photo)) }, style = ListItemStyle.Primary, ) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index 11d1e96a1f..51345e3cf6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -456,4 +456,3 @@ class MessageComposerPresenter @Inject constructor( } } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/RichTextEditorStateFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/RichTextEditorStateFactory.kt index 00b39c47e2..52fff81c31 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/RichTextEditorStateFactory.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/RichTextEditorStateFactory.kt @@ -35,4 +35,3 @@ class DefaultRichTextEditorStateFactory @Inject constructor() : RichTextEditorSt return rememberRichTextEditorState() } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/DefaultHtmlConverterProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/DefaultHtmlConverterProvider.kt index 0afe57b9e5..1bbf54fc70 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/DefaultHtmlConverterProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/DefaultHtmlConverterProvider.kt @@ -39,7 +39,7 @@ import javax.inject.Inject @ContributesBinding(SessionScope::class) @SingleIn(SessionScope::class) -class DefaultHtmlConverterProvider @Inject constructor(): HtmlConverterProvider { +class DefaultHtmlConverterProvider @Inject constructor() : HtmlConverterProvider { private val htmlConverter: MutableState = mutableStateOf(null) @@ -67,7 +67,7 @@ class DefaultHtmlConverterProvider @Inject constructor(): HtmlConverterProvider return TextDisplay.Custom(mentionSpanProvider.getMentionSpanFor(text, url)) } }, - isMention = { _, url -> mentionDetector?.isMention(url).orFalse() } + isMention = { _, url -> mentionDetector?.isMention(url).orFalse() } ).apply { configureWith(editorStyle) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt index 80d98b070d..0270b09a74 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt @@ -179,7 +179,9 @@ internal fun aTimelineItemDebugInfo( originalJson: String? = null, latestEditedJson: String? = null, ) = TimelineItemDebugInfo( - model, originalJson, latestEditedJson + model, + originalJson, + latestEditedJson ) internal fun aTimelineItemReadReceipts(): TimelineItemReadReceipts { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index 137d18d8bc..0d50631560 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -120,8 +120,8 @@ fun TimelineView( timelineItem = timelineItem, timelineRoomInfo = state.timelineRoomInfo, showReadReceipts = state.showReadReceipts, - isLastOutgoingMessage = (timelineItem as? TimelineItem.Event)?.isMine == true - && state.timelineItems.first().identifier() == timelineItem.identifier(), + isLastOutgoingMessage = (timelineItem as? TimelineItem.Event)?.isMine == true && + state.timelineItems.first().identifier() == timelineItem.identifier(), highlightedItem = state.highlightedEventId?.value, onClick = onMessageClicked, onLongClick = onMessageLongClicked, 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 7720295d1d..d2cd2f7d04 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 @@ -165,8 +165,7 @@ private fun ReactionContent( model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), contentDescription = null ) - } - else { + } else { Text( text = reaction.displayKey, style = ElementTheme.typography.fontBodyMdRegular.copy( @@ -225,4 +224,3 @@ internal fun MessagesReactionExtraButtonsPreview() = ElementPreview { ) } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ReplySwipeIndicator.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ReplySwipeIndicator.kt index 17d1d11f83..1fcfd30182 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ReplySwipeIndicator.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/ReplySwipeIndicator.kt @@ -25,8 +25,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.graphicsLayer import androidx.compose.ui.unit.dp -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.theme.components.Icon import io.element.android.libraries.designsystem.utils.CommonDrawables diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt index 6a4095f07b..474648d9c3 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRow.kt @@ -419,7 +419,6 @@ private fun MessageEventBubbleContent( @Suppress("ModifierNaming") bubbleModifier: Modifier = Modifier, // need to rename this modifier to prevent linter false positives ) { - // Long clicks are not not automatically propagated from a `clickable` // to its `combinedClickable` parent so we do it manually fun onTimestampLongClick() = onMessageLongClick() @@ -578,7 +577,6 @@ private fun MessageEventBubbleContent( .clip(RoundedCornerShape(6.dp)) .clickable(enabled = true, onClick = inReplyToClick), ) - } if (inReplyToDetails != null) { // Use SubComposeLayout only if necessary as it can have consequences on the performance. @@ -669,7 +667,7 @@ internal fun TimelineItemEventRowPreview() = ElementPreview { isMine = it, content = aTimelineItemTextContent().copy( body = "A long text which will be displayed on several lines and" + - " hopefully can be manually adjusted to test different behaviors." + " hopefully can be manually adjusted to test different behaviors." ), groupPosition = TimelineItemGroupPosition.First, ), diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowForDirectRoomPreview.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowForDirectRoomPreview.kt index 4443c00f3d..3ac2703ee5 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowForDirectRoomPreview.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowForDirectRoomPreview.kt @@ -59,4 +59,3 @@ internal fun TimelineItemEventRowForDirectRoomPreview() = ElementPreview { } } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithManyReactionsPreview.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithManyReactionsPreview.kt index bbd65a62ad..efb619bcc2 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithManyReactionsPreview.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemEventRowWithManyReactionsPreview.kt @@ -42,4 +42,3 @@ internal fun TimelineItemEventRowWithManyReactionsPreview() = ElementPreview { } } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt index 76462e35a9..d337044e94 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemGroupedEventsRow.kt @@ -24,8 +24,8 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.ui.Modifier import androidx.compose.ui.res.pluralStringResource import io.element.android.features.messages.impl.R -import io.element.android.features.messages.impl.timeline.TimelineRoomInfo import io.element.android.features.messages.impl.timeline.TimelineEvents +import io.element.android.features.messages.impl.timeline.TimelineRoomInfo import io.element.android.features.messages.impl.timeline.aGroupedEvents import io.element.android.features.messages.impl.timeline.aTimelineRoomInfo import io.element.android.features.messages.impl.timeline.components.group.GroupHeaderView diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt index 60fda07d35..5272473a42 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsLayout.kt @@ -117,7 +117,7 @@ fun TimelineItemReactionsLayout( return rows } - /// Given a list of rows place them in the layout. + // Given a list of rows place them in the layout. fun layoutRows(rows: List>): MeasureResult { var width = 0 var height = 0 diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt index 0f5026f0a2..20b7fac13f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemReactionsView.kt @@ -75,11 +75,11 @@ private fun TimelineItemReactionsView( // In LTR languages we want an incoming message's reactions to be LTR and outgoing to be RTL. // For RTL languages it should be the opposite. val currentLayout = LocalLayoutDirection.current - val reactionsLayoutDirection = if (!isOutgoing) currentLayout - else if (currentLayout == LayoutDirection.Ltr) - LayoutDirection.Rtl - else - LayoutDirection.Ltr + val reactionsLayoutDirection = when { + !isOutgoing -> currentLayout + currentLayout == LayoutDirection.Ltr -> LayoutDirection.Rtl + else -> LayoutDirection.Ltr + } return CompositionLocalProvider(LocalLayoutDirection provides reactionsLayoutDirection) { TimelineItemReactionsLayout( @@ -104,7 +104,9 @@ private fun TimelineItemReactionsView( onLongClick = {} ) } - } else null, + } else { + null + }, reactions = { reactions.forEach { reaction -> CompositionLocalProvider(LocalLayoutDirection provides currentLayout) { @@ -174,4 +176,3 @@ private fun ContentToPreview( onMoreReactionsClicked = {}, ) } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemVirtualRow.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemVirtualRow.kt index 4bf8e5b847..5ef3c2ef2c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemVirtualRow.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/TimelineItemVirtualRow.kt @@ -18,7 +18,6 @@ package io.element.android.features.messages.impl.timeline.components import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import io.element.android.features.messages.impl.timeline.session.SessionState import io.element.android.features.messages.impl.timeline.components.virtual.TimelineEncryptedHistoryBannerView import io.element.android.features.messages.impl.timeline.components.virtual.TimelineItemDaySeparatorView import io.element.android.features.messages.impl.timeline.components.virtual.TimelineItemReadMarkerView @@ -26,6 +25,7 @@ import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemDaySeparatorModel import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemEncryptedHistoryBannerVirtualModel import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemReadMarkerModel +import io.element.android.features.messages.impl.timeline.session.SessionState @Composable fun TimelineItemVirtualRow( @@ -39,4 +39,3 @@ fun TimelineItemVirtualRow( is TimelineItemEncryptedHistoryBannerVirtualModel -> TimelineEncryptedHistoryBannerView(sessionState, modifier) } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt index 8bbd6cbff7..c9f9466ab2 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenter.kt @@ -21,10 +21,10 @@ import androidx.compose.runtime.MutableState import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope -import io.element.android.libraries.architecture.Presenter -import kotlinx.coroutines.launch import io.element.android.features.messages.impl.timeline.model.TimelineItem +import io.element.android.libraries.architecture.Presenter import kotlinx.collections.immutable.toImmutableSet +import kotlinx.coroutines.launch import javax.inject.Inject class CustomReactionPresenter @Inject constructor( @@ -59,7 +59,12 @@ class CustomReactionPresenter @Inject constructor( } } val event = (target.value as? CustomReactionState.Target.Success)?.event - val selectedEmoji = event?.reactionsState?.reactions?.mapNotNull { if(it.isHighlighted) it.key else null }.orEmpty().toImmutableSet() + val selectedEmoji = event + ?.reactionsState + ?.reactions + ?.mapNotNull { if (it.isHighlighted) it.key else null } + .orEmpty() + .toImmutableSet() return CustomReactionState( target = target.value, selectedEmoji = selectedEmoji, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionState.kt index f6f7d2b0f9..0016305d66 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionState.kt @@ -35,4 +35,3 @@ data class CustomReactionState( ) : Target } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/DefaultEmojibaseProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/DefaultEmojibaseProvider.kt index a68d6f0d4e..e4765a4074 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/DefaultEmojibaseProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/DefaultEmojibaseProvider.kt @@ -20,10 +20,9 @@ import android.content.Context import io.element.android.emojibasebindings.EmojibaseDatasource import io.element.android.emojibasebindings.EmojibaseStore -class DefaultEmojibaseProvider(val context: Context): EmojibaseProvider { +class DefaultEmojibaseProvider(val context: Context) : EmojibaseProvider { override val emojibaseStore: EmojibaseStore by lazy { EmojibaseDatasource().load(context) } - } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt index e0be0f0662..c9706f06ac 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/ExtraPadding.kt @@ -75,7 +75,7 @@ fun TimelineItem.Event.toExtraPadding(): ExtraPadding { private fun TextMeasurer.getExtraPadding(text: String, density: Density): Dp { val timestampTextStyle = ElementTheme.typography.fontBodyXsRegular val textWidth = measure(text = text, style = timestampTextStyle).size.width - return (textWidth/density.density).dp + return (textWidth / density.density).dp } /** diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt index 384fd94ead..73bedb4921 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemInformativeView.kt @@ -46,7 +46,7 @@ fun TimelineItemInformativeView( ) { Row( modifier = modifier.onSizeChanged { size -> - onContentLayoutChanged( + onContentLayoutChanged( ContentAvoidingLayoutData( contentWidth = size.width, contentHeight = size.height, diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemLocationView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemLocationView.kt index c9d24a1637..0a4b008336 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemLocationView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemLocationView.kt @@ -27,8 +27,8 @@ import androidx.compose.ui.unit.dp import io.element.android.features.location.api.StaticMapView import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContent import io.element.android.features.messages.impl.timeline.model.event.TimelineItemLocationContentProvider -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.theme.components.Text @Composable @@ -62,4 +62,3 @@ internal fun TimelineItemLocationViewPreview(@PreviewParameter(TimelineItemLocat ElementPreview { TimelineItemLocationView(content) } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStateView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStateView.kt index 7d89ec3993..706ca69f9c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStateView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemStateView.kt @@ -20,12 +20,12 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.text.style.TextAlign +import io.element.android.compound.theme.ElementTheme import io.element.android.features.messages.impl.timeline.model.event.TimelineItemStateContent import io.element.android.features.messages.impl.timeline.model.event.aTimelineItemStateEventContent -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.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable fun TimelineItemStateView( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt index dfa2ce92c6..2df3766175 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemTextView.kt @@ -45,7 +45,6 @@ fun TimelineItemTextView( LocalContentColor provides ElementTheme.colors.textPrimary, LocalTextStyle provides ElementTheme.typography.fontBodyLgRegular ) { - val formattedBody = content.formattedBody val body = SpannableString(formattedBody ?: content.body) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVideoView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVideoView.kt index 87685e432c..4900180800 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVideoView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/event/TimelineItemVideoView.kt @@ -32,8 +32,8 @@ import io.element.android.features.messages.impl.timeline.model.event.TimelineIt import io.element.android.features.messages.impl.timeline.model.event.TimelineItemVideoContentProvider import io.element.android.libraries.designsystem.components.BlurHashAsyncImage import io.element.android.libraries.designsystem.modifiers.roundedBackground -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.matrix.ui.media.MediaRequestData import io.element.android.libraries.ui.strings.CommonStrings diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt index 7c30350cc4..5f9a2ea428 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenter.kt @@ -65,18 +65,17 @@ class ReactionSummaryPresenter @Inject constructor( derivedStateOf { summary?.let { summary -> summary.copy(reactions = summary.reactions.map { reaction -> - reaction.copy(senders = reaction.senders.map { sender -> - val member = members.firstOrNull { it.userId == sender.senderId } - val user = MatrixUser( - userId = sender.senderId, - displayName = member?.displayName, - avatarUrl = member?.avatarUrl - ) - sender.copy(user = user) - }) + reaction.copy(senders = reaction.senders.map { sender -> + val member = members.firstOrNull { it.userId == sender.senderId } + val user = MatrixUser( + userId = sender.senderId, + displayName = member?.displayName, + avatarUrl = member?.avatarUrl + ) + sender.copy(user = user) + }) }) } } } - } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryState.kt index 37e150320b..1d1606e53d 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryState.kt @@ -22,11 +22,10 @@ import io.element.android.libraries.matrix.api.core.EventId data class ReactionSummaryState( val target: Summary?, val eventSink: (ReactionSummaryEvents) -> Unit -){ +) { data class Summary( val reactions: List, val selectedKey: String, val selectedEventId: EventId ) } - 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 24f6a52d0a..e58f614234 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 @@ -120,7 +120,7 @@ private fun SheetContent( LaunchedEffect(pagerState.currentPage) { selectedReactionKey = summary.reactions[pagerState.currentPage].key - val visibleInfo = reactionListState.layoutInfo.visibleItemsInfo + val visibleInfo = reactionListState.layoutInfo.visibleItemsInfo if (selectedReactionIndex <= visibleInfo.first().index || selectedReactionIndex >= visibleInfo.last().index) { reactionListState.animateScrollToItem(selectedReactionIndex) } @@ -174,7 +174,6 @@ private fun AggregatedReactionButton( onClick: () -> Unit, modifier: Modifier = Modifier, ) { - val buttonColor = if (isHighlighted) { ElementTheme.colors.bgActionPrimaryRest } else { @@ -209,8 +208,7 @@ private fun AggregatedReactionButton( model = MediaRequestData(MediaSource(reaction.key), MediaRequestData.Kind.Content), contentDescription = null ) - } - else { + } else { Text( text = reaction.displayKey, style = ElementTheme.typography.fontBodyMdRegular.copy( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt index 70e5486c2a..a0ca30f199 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/TimelineItemReadReceiptView.kt @@ -40,6 +40,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import io.element.android.appconfig.TimelineConfig +import io.element.android.compound.theme.ElementTheme import io.element.android.features.messages.impl.timeline.model.ReadReceiptData import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarSize @@ -50,7 +51,6 @@ import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.utils.CommonDrawables import io.element.android.libraries.matrix.api.timeline.item.event.LocalEventSendState -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonPlurals import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList @@ -76,33 +76,35 @@ fun TimelineItemReadReceiptView( ) } } - } else when (state.sendState) { - LocalEventSendState.NotSentYet -> { - ReadReceiptsRow(modifier) { - Icon( - modifier = Modifier.padding(2.dp), - resourceId = CommonDrawables.ic_sending, - contentDescription = stringResource(id = CommonStrings.common_sending), - tint = ElementTheme.colors.iconSecondary - ) - } - } - LocalEventSendState.Canceled -> Unit - is LocalEventSendState.SendingFailed -> { - // Error? The timestamp is already displayed in red - } - null, - is LocalEventSendState.Sent -> { - if (state.isLastOutgoingMessage) { - ReadReceiptsRow(modifier = modifier) { + } else { + when (state.sendState) { + LocalEventSendState.NotSentYet -> { + ReadReceiptsRow(modifier) { Icon( modifier = Modifier.padding(2.dp), - resourceId = CommonDrawables.ic_sent, - contentDescription = stringResource(id = CommonStrings.common_sent), + resourceId = CommonDrawables.ic_sending, + contentDescription = stringResource(id = CommonStrings.common_sending), tint = ElementTheme.colors.iconSecondary ) } } + LocalEventSendState.Canceled -> Unit + is LocalEventSendState.SendingFailed -> { + // Error? The timestamp is already displayed in red + } + null, + is LocalEventSendState.Sent -> { + if (state.isLastOutgoingMessage) { + ReadReceiptsRow(modifier = modifier) { + Icon( + modifier = Modifier.padding(2.dp), + resourceId = CommonDrawables.ic_sent, + contentDescription = stringResource(id = CommonStrings.common_sent), + tint = ElementTheme.colors.iconSecondary + ) + } + } + } } } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/bottomsheet/ReadReceiptBottomSheetPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/bottomsheet/ReadReceiptBottomSheetPresenter.kt index a4a55cbc9e..f851607472 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/bottomsheet/ReadReceiptBottomSheetPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/receipt/bottomsheet/ReadReceiptBottomSheetPresenter.kt @@ -25,8 +25,7 @@ import io.element.android.features.messages.impl.timeline.model.TimelineItem import io.element.android.libraries.architecture.Presenter import javax.inject.Inject -class ReadReceiptBottomSheetPresenter @Inject constructor( -) : Presenter { +class ReadReceiptBottomSheetPresenter @Inject constructor() : Presenter { @Composable override fun present(): ReadReceiptBottomSheetState { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMenuEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMenuEvents.kt index 97ef92ceb8..77be3815e5 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMenuEvents.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMenuEvents.kt @@ -22,5 +22,5 @@ sealed interface RetrySendMenuEvents { data class EventSelected(val event: TimelineItem.Event) : RetrySendMenuEvents data object RetrySend : RetrySendMenuEvents data object RemoveFailed : RetrySendMenuEvents - data object Dismiss: RetrySendMenuEvents + data object Dismiss : RetrySendMenuEvents } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMessageMenu.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMessageMenu.kt index bbd35a7d4f..1eec2547cd 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMessageMenu.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/retrysendmenu/RetrySendMessageMenu.kt @@ -33,12 +33,12 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource 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.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.theme.components.ModalBottomSheet import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.coroutines.launch diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt index f3b007354f..3bb38fca7c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemDaySeparatorView.kt @@ -26,12 +26,12 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier 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.timeline.model.virtual.TimelineItemDaySeparatorModel import io.element.android.features.messages.impl.timeline.model.virtual.TimelineItemDaySeparatorModelProvider -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.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable internal fun TimelineItemDaySeparatorView( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemReadMarkerView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemReadMarkerView.kt index 0d8dca11b7..1d50bedfbb 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemReadMarkerView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemReadMarkerView.kt @@ -25,12 +25,12 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource 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.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.HorizontalDivider import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable internal fun TimelineItemReadMarkerView( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt index 78ce6521d9..7601a466c4 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt @@ -27,11 +27,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign 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.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable fun TimelineItemRoomBeginningView( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineLoadingMoreIndicator.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineLoadingMoreIndicator.kt index 847aa2bcef..23cc516156 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineLoadingMoreIndicator.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineLoadingMoreIndicator.kt @@ -24,8 +24,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -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.theme.components.CircularProgressIndicator @Composable 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 733b9b8878..4c7fadeaa2 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 @@ -195,7 +195,7 @@ class TimelineItemContentMessageFactory @Inject constructor( TimelineItemNoticeContent( body = body, htmlDocument = messageType.formatted?.toHtmlDocument(), - formattedBody = parseHtml(messageType.formatted) ?:body.withLinks(), + formattedBody = parseHtml(messageType.formatted) ?: body.withLinks(), isEdited = content.isEdited, ) } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt index 14f95202d4..91b62a6d51 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentStickerFactory.kt @@ -40,7 +40,6 @@ class TimelineItemContentStickerFactory @Inject constructor( } fun create(content: StickerContent): TimelineItemEventContent { - val aspectRatio = aspectRatioOf(content.info.width, content.info.height) return TimelineItemStickerContent( diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt index 556493bd84..1874fc5b65 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/TimelineItemGroupPosition.kt @@ -65,4 +65,3 @@ sealed interface TimelineItemGroupPosition { else -> false } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemLocationContentProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemLocationContentProvider.kt index dc5a03fa2b..a21f262071 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemLocationContentProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/model/event/TimelineItemLocationContentProvider.kt @@ -36,4 +36,3 @@ fun aTimelineItemLocationContent(description: String? = null) = TimelineItemLoca ), description = description, ) - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/VoiceMessageException.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/VoiceMessageException.kt index 7ca95ad9a7..0d453edb1f 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/VoiceMessageException.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/VoiceMessageException.kt @@ -18,12 +18,15 @@ package io.element.android.features.messages.impl.voicemessages internal sealed class VoiceMessageException : Exception() { data class FileException( - override val message: String?, override val cause: Throwable? = null + override val message: String?, + override val cause: Throwable? = null ) : VoiceMessageException() data class PermissionMissing( - override val message: String?, override val cause: Throwable? + override val message: String?, + override val cause: Throwable? ) : VoiceMessageException() data class PlayMessageError( - override val message: String?, override val cause: Throwable? + override val message: String?, + override val cause: Throwable? ) : VoiceMessageException() } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerEvents.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerEvents.kt index 0c83e834b0..100bdbadb6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerEvents.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerEvents.kt @@ -17,20 +17,20 @@ package io.element.android.features.messages.impl.voicemessages.composer import androidx.lifecycle.Lifecycle -import io.element.android.libraries.textcomposer.model.VoiceMessageRecorderEvent import io.element.android.libraries.textcomposer.model.VoiceMessagePlayerEvent +import io.element.android.libraries.textcomposer.model.VoiceMessageRecorderEvent sealed interface VoiceMessageComposerEvents { data class RecorderEvent( val recorderEvent: VoiceMessageRecorderEvent - ): VoiceMessageComposerEvents + ) : VoiceMessageComposerEvents data class PlayerEvent( val playerEvent: VoiceMessagePlayerEvent, - ): VoiceMessageComposerEvents - data object SendVoiceMessage: VoiceMessageComposerEvents - data object DeleteVoiceMessage: VoiceMessageComposerEvents - data object AcceptPermissionRationale: VoiceMessageComposerEvents - data object DismissPermissionsRationale: VoiceMessageComposerEvents - data class LifecycleEvent(val event: Lifecycle.Event): VoiceMessageComposerEvents - data object DismissSendFailureDialog: VoiceMessageComposerEvents + ) : VoiceMessageComposerEvents + data object SendVoiceMessage : VoiceMessageComposerEvents + data object DeleteVoiceMessage : VoiceMessageComposerEvents + data object AcceptPermissionRationale : VoiceMessageComposerEvents + data object DismissPermissionsRationale : VoiceMessageComposerEvents + data class LifecycleEvent(val event: Lifecycle.Event) : VoiceMessageComposerEvents + data object DismissSendFailureDialog : VoiceMessageComposerEvents } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPlayer.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPlayer.kt index 0e1b960ecc..d4c08dbc82 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPlayer.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPlayer.kt @@ -247,4 +247,3 @@ class VoiceMessageComposerPlayer @Inject constructor( } } } - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenter.kt index 528711b71e..57ecffe343 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenter.kt @@ -37,8 +37,8 @@ import io.element.android.libraries.di.SingleIn import io.element.android.libraries.mediaupload.api.MediaSender import io.element.android.libraries.permissions.api.PermissionsEvents import io.element.android.libraries.permissions.api.PermissionsPresenter -import io.element.android.libraries.textcomposer.model.VoiceMessageRecorderEvent import io.element.android.libraries.textcomposer.model.VoiceMessagePlayerEvent +import io.element.android.libraries.textcomposer.model.VoiceMessageRecorderEvent import io.element.android.libraries.textcomposer.model.VoiceMessageState import io.element.android.libraries.voicerecorder.api.VoiceRecorder import io.element.android.libraries.voicerecorder.api.VoiceRecorderState @@ -216,7 +216,7 @@ class VoiceMessageComposerPresenter @Inject constructor( recorderState: VoiceRecorderState, isSending: Boolean, ): VoiceMessageState { - val showCursor by remember(playerState.isStopped, isSending) { derivedStateOf { !playerState.isStopped && !isSending }} + val showCursor by remember(playerState.isStopped, isSending) { derivedStateOf { !playerState.isStopped && !isSending } } val playerTime by remember(playerState, recorderState) { derivedStateOf { displayTime(playerState, recorderState) } } val waveform by remember(recorderState) { derivedStateOf { recorderState.finishedWaveform() } } diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerState.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerState.kt index aaab388ec1..a1737a9cdc 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerState.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerState.kt @@ -27,4 +27,3 @@ data class VoiceMessageComposerState( val keepScreenOn: Boolean, val eventSink: (VoiceMessageComposerEvents) -> Unit, ) - diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerStateProvider.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerStateProvider.kt index 0e884f5491..9f835681d8 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerStateProvider.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerStateProvider.kt @@ -52,5 +52,3 @@ internal fun aVoiceMessagePreviewState() = VoiceMessageState.Preview( ) internal var aWaveformLevels = List(100) { it.toFloat() / 100 }.toPersistentList() - - 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 dfe8e92a01..8d014c7183 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 @@ -75,7 +75,6 @@ class VoiceMessagePresenter @AssistedInject constructor( @Composable override fun present(): VoiceMessageState { - val playerState by player.state.collectAsState( VoiceMessagePlayer.State( isReady = false, diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt index 14ae8f1b59..8e8452d56c 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/actionlist/ActionListPresenterTest.kt @@ -564,4 +564,3 @@ private fun createActionListPresenter(isDeveloperModeEnabled: Boolean): ActionLi val preferencesStore = InMemoryPreferencesStore(isDeveloperModeEnabled = isDeveloperModeEnabled) return ActionListPresenter(preferencesStore = preferencesStore) } - diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/aMediaAttachment.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/MediaAttachmentFixtures.kt similarity index 100% rename from features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/aMediaAttachment.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/MediaAttachmentFixtures.kt diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/aMessageEvent.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/MessageEventFixtures.kt similarity index 100% rename from features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/aMessageEvent.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/MessageEventFixtures.kt diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/timelineItemsFactory.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/TimelineItemsFactoryFixtures.kt similarity index 100% rename from features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/timelineItemsFactory.kt rename to features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/fixtures/TimelineItemsFactoryFixtures.kt diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenterTests.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenterTests.kt index a6ef642672..6c048b2453 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenterTests.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/CustomReactionPresenterTests.kt @@ -40,7 +40,6 @@ class CustomReactionPresenterTests { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - val event = aTimelineItemEvent(eventId = AN_EVENT_ID) val initialState = awaitItem() assertThat(initialState.target).isEqualTo(CustomReactionState.Target.None) diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/FakeEmojibaseProvider.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/FakeEmojibaseProvider.kt index 96513c8ab7..90fbfba746 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/FakeEmojibaseProvider.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/customreaction/FakeEmojibaseProvider.kt @@ -18,7 +18,7 @@ package io.element.android.features.messages.impl.timeline.components.customreac import io.element.android.emojibasebindings.EmojibaseStore -class FakeEmojibaseProvider: EmojibaseProvider { +class FakeEmojibaseProvider : EmojibaseProvider { override val emojibaseStore: EmojibaseStore get() = EmojibaseStore(mapOf()) } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenterTests.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenterTests.kt index d7d51c5eb4..443a7ec7ab 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenterTests.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/components/reactionsummary/ReactionSummaryPresenterTests.kt @@ -40,7 +40,7 @@ class ReactionSummaryPresenterTests { val warmUpRule = WarmUpRule() private val aggregatedReaction = anAggregatedReaction(userId = A_USER_ID, key = "👍", isHighlighted = true) - private val roomMember = aRoomMember(userId = A_USER_ID, avatarUrl = AN_AVATAR_URL, displayName = A_USER_NAME) + private val roomMember = aRoomMember(userId = A_USER_ID, avatarUrl = AN_AVATAR_URL, displayName = A_USER_NAME) private val summaryEvent = ReactionSummaryEvents.ShowReactionSummary(AN_EVENT_ID, listOf(aggregatedReaction), aggregatedReaction.key) private val room = FakeMatrixRoom().apply { givenRoomMembersState(MatrixRoomMembersState.Ready(persistentListOf(roomMember))) @@ -81,5 +81,4 @@ class ReactionSummaryPresenterTests { assertThat(reactions?.first()?.senders?.first()?.user?.displayName).isEqualTo(A_USER_NAME) } } - } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt index 381c6048c2..1153aa2ade 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/timeline/factories/event/TimelineItemContentMessageFactoryTest.kt @@ -447,7 +447,8 @@ class TimelineItemContentMessageFactoryTest { content = createStickerContent( "body", ImageInfo(32, 32, "image/webp", 8192, null, MediaSource("thumbnail://url"), null), - "url") + "url" + ) ) val expected = TimelineItemStickerContent( body = "body", @@ -659,7 +660,7 @@ class TimelineItemContentMessageFactoryTest { inImageInfo: ImageInfo, inUrl: String ): StickerContent { - return StickerContent ( + return StickerContent( body = body, info = inImageInfo, url = inUrl diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenterTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenterTest.kt index 4a659f4ce3..4765d44edc 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenterTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/composer/VoiceMessageComposerPresenterTest.kt @@ -463,7 +463,6 @@ class VoiceMessageComposerPresenterTest { assertThat(showSendFailureDialog).isFalse() } - assertThat(matrixRoom.sendMediaCount).isEqualTo(0) testPauseAndDestroy(finalState) } diff --git a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/DefaultVoiceMessagePlayerTest.kt b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/DefaultVoiceMessagePlayerTest.kt index eb2c08d2be..e245842530 100644 --- a/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/DefaultVoiceMessagePlayerTest.kt +++ b/features/messages/impl/src/test/kotlin/io/element/android/features/messages/impl/voicemessages/timeline/DefaultVoiceMessagePlayerTest.kt @@ -144,7 +144,7 @@ class DefaultVoiceMessagePlayerTest { assertThat(it.currentPosition).isEqualTo(1000) assertThat(it.duration).isEqualTo(1000) } - awaitItem().let {// Additional spurious state due to MediaPlayer owner change. + awaitItem().let { // Additional spurious state due to MediaPlayer owner change. assertThat(it.isReady).isFalse() assertThat(it.isPlaying).isFalse() assertThat(it.isEnded).isFalse() @@ -164,7 +164,7 @@ class DefaultVoiceMessagePlayerTest { // Play player1 again. player1.state.test { - awaitItem().let {// Last previous state/ + awaitItem().let { // Last previous state/ assertThat(it.isReady).isFalse() assertThat(it.isPlaying).isFalse() assertThat(it.isEnded).isTrue() @@ -172,7 +172,7 @@ class DefaultVoiceMessagePlayerTest { assertThat(it.duration).isEqualTo(1000) } assertThat(player1.prepare().isSuccess).isTrue() - awaitItem().let {// Additional spurious state due to MediaPlayer owner change. + awaitItem().let { // Additional spurious state due to MediaPlayer owner change. assertThat(it.isReady).isFalse() assertThat(it.isPlaying).isFalse() assertThat(it.isEnded).isFalse() diff --git a/features/messages/test/src/main/kotlin/io/element/android/features/messages/test/timeline/FakeHtmlConverterProvider.kt b/features/messages/test/src/main/kotlin/io/element/android/features/messages/test/timeline/FakeHtmlConverterProvider.kt index 0f7802632a..0166a1f3b0 100644 --- a/features/messages/test/src/main/kotlin/io/element/android/features/messages/test/timeline/FakeHtmlConverterProvider.kt +++ b/features/messages/test/src/main/kotlin/io/element/android/features/messages/test/timeline/FakeHtmlConverterProvider.kt @@ -23,7 +23,7 @@ import io.element.android.wysiwyg.utils.HtmlConverter class FakeHtmlConverterProvider( private val transform: (String) -> CharSequence = { it }, -): HtmlConverterProvider { +) : HtmlConverterProvider { @Composable override fun Update(currentUserId: UserId) = Unit diff --git a/features/networkmonitor/api/src/main/kotlin/io/element/android/features/networkmonitor/api/ui/ConnectivityIndicatorView.kt b/features/networkmonitor/api/src/main/kotlin/io/element/android/features/networkmonitor/api/ui/ConnectivityIndicatorView.kt index 45f62f94b6..67721cab56 100644 --- a/features/networkmonitor/api/src/main/kotlin/io/element/android/features/networkmonitor/api/ui/ConnectivityIndicatorView.kt +++ b/features/networkmonitor/api/src/main/kotlin/io/element/android/features/networkmonitor/api/ui/ConnectivityIndicatorView.kt @@ -27,8 +27,8 @@ import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight /** * A view that displays a connectivity indicator when the device is offline, adding a default diff --git a/features/poll/api/src/main/kotlin/io/element/android/features/poll/api/pollcontent/PollContentView.kt b/features/poll/api/src/main/kotlin/io/element/android/features/poll/api/pollcontent/PollContentView.kt index 706fa6e402..7b19c5da7e 100644 --- a/features/poll/api/src/main/kotlin/io/element/android/features/poll/api/pollcontent/PollContentView.kt +++ b/features/poll/api/src/main/kotlin/io/element/android/features/poll/api/pollcontent/PollContentView.kt @@ -102,14 +102,16 @@ fun PollContentView( var showConfirmation: Boolean by remember { mutableStateOf(false) } - if (showConfirmation) ConfirmationDialog( - content = stringResource(id = CommonStrings.common_poll_end_confirmation), - onSubmitClicked = { - onPollEnd() - showConfirmation = false - }, - onDismiss = { showConfirmation = false }, - ) + if (showConfirmation) { + ConfirmationDialog( + content = stringResource(id = CommonStrings.common_poll_end_confirmation), + onSubmitClicked = { + onPollEnd() + showConfirmation = false + }, + onDismiss = { showConfirmation = false }, + ) + } Column( modifier = modifier.fillMaxWidth(), diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/actions/DefaultSendPollResponseAction.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/actions/DefaultSendPollResponseAction.kt index d6688ecb27..a31ad3f200 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/actions/DefaultSendPollResponseAction.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/actions/DefaultSendPollResponseAction.kt @@ -40,4 +40,3 @@ class DefaultSendPollResponseAction @Inject constructor( } } } - diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollException.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollException.kt index 20c10c4716..ccb94e3f32 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollException.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollException.kt @@ -18,10 +18,12 @@ package io.element.android.features.poll.impl.create internal sealed class CreatePollException : Exception() { data class GetPollFailed( - override val message: String?, override val cause: Throwable? + override val message: String?, + override val cause: Throwable? ) : CreatePollException() data class SavePollFailed( - override val message: String?, override val cause: Throwable? + override val message: String?, + override val cause: Throwable? ) : CreatePollException() } diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt index 484e92eb15..8bc76c0bb7 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/create/CreatePollPresenter.kt @@ -144,7 +144,7 @@ class CreatePollPresenter @AssistedInject constructor( poll = poll.withNewAnswer() } is CreatePollEvents.RemoveAnswer -> { - poll= poll.withAnswerRemoved(event.index) + poll = poll.withAnswerRemoved(event.index) } is CreatePollEvents.SetAnswer -> { poll = poll.withAnswerChanged(event.index, event.text) @@ -243,4 +243,3 @@ fun PollFormState.toUiAnswers(): ImmutableList { ) }.toImmutableList() } - diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryFlowNode.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryFlowNode.kt index 918f6c7abb..1f71c70eed 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryFlowNode.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryFlowNode.kt @@ -83,5 +83,4 @@ class PollHistoryFlowNode @AssistedInject constructor( override fun View(modifier: Modifier) { BackstackView() } - } diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt index 784f64c416..56727fcf9a 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryPresenter.kt @@ -87,7 +87,6 @@ class PollHistoryPresenter @Inject constructor( } } - return PollHistoryState( isLoading = isLoading, hasMoreToLoad = paginationState.hasMoreToLoadBackwards, diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryView.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryView.kt index 19ca239725..4ea8717688 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryView.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/PollHistoryView.kt @@ -68,7 +68,6 @@ fun PollHistoryView( goBack: () -> Unit, modifier: Modifier = Modifier, ) { - fun onLoadMore() { state.eventSink(PollHistoryEvents.LoadMore) } @@ -133,7 +132,6 @@ fun PollHistoryView( onLoadMore = ::onLoadMore, modifier = Modifier.fillMaxSize(), ) - } } } diff --git a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/model/PollHistoryItemsFactory.kt b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/model/PollHistoryItemsFactory.kt index a85e4cada2..c514b8595d 100644 --- a/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/model/PollHistoryItemsFactory.kt +++ b/features/poll/impl/src/main/kotlin/io/element/android/features/poll/impl/history/model/PollHistoryItemsFactory.kt @@ -63,4 +63,3 @@ class PollHistoryItemsFactory @Inject constructor( } } } - diff --git a/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateSaverTest.kt b/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateSaverTest.kt index 62b3918372..7c60c005db 100644 --- a/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateSaverTest.kt +++ b/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateSaverTest.kt @@ -25,6 +25,7 @@ class PollFormStateSaverTest { companion object { val CanSaveScope = SaverScope { true } } + @Test fun `test save and restore`() { val state = PollFormState( diff --git a/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateTest.kt b/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateTest.kt index cf97967f23..3e395f90a0 100644 --- a/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateTest.kt +++ b/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/create/PollFormStateTest.kt @@ -134,7 +134,6 @@ class PollFormStateTest { } } - private fun aValidPollFormState(): PollFormState { return PollFormState.Empty.copy( question = "question", diff --git a/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/pollcontent/PollContentStateFactoryTest.kt b/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/pollcontent/PollContentStateFactoryTest.kt index fb2f42abf3..a9a8c00695 100644 --- a/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/pollcontent/PollContentStateFactoryTest.kt +++ b/features/poll/impl/src/test/kotlin/io/element/android/features/poll/impl/pollcontent/PollContentStateFactoryTest.kt @@ -63,7 +63,8 @@ class PollContentStateFactoryTest { fun `Disclosed poll - not ended, some votes, including one from current user`() = runTest { val votes = MY_USER_WINNING_VOTES.mapKeys { it.key.id }.toImmutableMap() val state = factory.create( - eventTimelineItem, aPollContent(votes = votes) + eventTimelineItem, + aPollContent(votes = votes) ) val expectedState = aPollContentState( answerItems = listOf( @@ -92,7 +93,8 @@ class PollContentStateFactoryTest { fun `Disclosed poll - ended, some votes, including one from current user (winner)`() = runTest { val votes = MY_USER_WINNING_VOTES.mapKeys { it.key.id }.toImmutableMap() val state = factory.create( - eventTimelineItem, aPollContent(votes = votes, endTime = 1UL) + eventTimelineItem, + aPollContent(votes = votes, endTime = 1UL) ) val expectedState = aPollContentState( answerItems = listOf( @@ -110,7 +112,8 @@ class PollContentStateFactoryTest { fun `Disclosed poll - ended, some votes, including one from current user (not winner) and two winning votes`() = runTest { val votes = OTHER_WINNING_VOTES.mapKeys { it.key.id }.toImmutableMap() val state = factory.create( - eventTimelineItem, aPollContent(votes = votes, endTime = 1UL) + eventTimelineItem, + aPollContent(votes = votes, endTime = 1UL) ) val expectedState = aPollContentState( answerItems = listOf( @@ -139,7 +142,8 @@ class PollContentStateFactoryTest { fun `Undisclosed poll - not ended, some votes, including one from current user`() = runTest { val votes = MY_USER_WINNING_VOTES.mapKeys { it.key.id }.toImmutableMap() val state = factory.create( - eventTimelineItem, aPollContent(PollKind.Undisclosed, votes = votes) + eventTimelineItem, + aPollContent(PollKind.Undisclosed, votes = votes) ) val expectedState = aPollContentState( pollKind = PollKind.Undisclosed, @@ -171,7 +175,8 @@ class PollContentStateFactoryTest { fun `Undisclosed poll - ended, some votes, including one from current user (winner)`() = runTest { val votes = MY_USER_WINNING_VOTES.mapKeys { it.key.id }.toImmutableMap() val state = factory.create( - eventTimelineItem, aPollContent(PollKind.Undisclosed, votes = votes, endTime = 1UL) + eventTimelineItem, + aPollContent(PollKind.Undisclosed, votes = votes, endTime = 1UL) ) val expectedState = aPollContentState( pollKind = PollKind.Undisclosed, @@ -190,7 +195,8 @@ class PollContentStateFactoryTest { fun `Undisclosed poll - ended, some votes, including one from current user (not winner) and two winning votes`() = runTest { val votes = OTHER_WINNING_VOTES.mapKeys { it.key.id }.toImmutableMap() val state = factory.create( - eventTimelineItem, aPollContent(PollKind.Undisclosed, votes = votes, endTime = 1UL) + eventTimelineItem, + aPollContent(PollKind.Undisclosed, votes = votes, endTime = 1UL) ) val expectedState = aPollContentState( pollKind = PollKind.Undisclosed, diff --git a/features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt b/features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt index 9d087e254e..9a2cd697c9 100644 --- a/features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt +++ b/features/preferences/api/src/main/kotlin/io/element/android/features/preferences/api/PreferencesEntryPoint.kt @@ -30,6 +30,7 @@ interface PreferencesEntryPoint : FeatureEntryPoint { sealed interface InitialTarget : Parcelable { @Parcelize data object Root : InitialTarget + @Parcelize data object NotificationSettings : InitialTarget } diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutNode.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutNode.kt index 423ae6c793..206d31ab77 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutNode.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutNode.kt @@ -26,9 +26,9 @@ import com.bumble.appyx.core.plugin.Plugin import dagger.assisted.Assisted import dagger.assisted.AssistedInject import io.element.android.anvilannotations.ContributesNode +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.androidutils.browser.openUrlInChromeCustomTab import io.element.android.libraries.di.SessionScope -import io.element.android.compound.theme.ElementTheme @ContributesNode(SessionScope::class) class AboutNode @AssistedInject constructor( diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutPresenter.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutPresenter.kt index 556c62ec73..480e986cf4 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutPresenter.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutPresenter.kt @@ -24,7 +24,6 @@ class AboutPresenter @Inject constructor() : Presenter { @Composable override fun present(): AboutState { - return AboutState( elementLegals = getAllLegals(), ) diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutView.kt index a16eb72281..c581811b6b 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/about/AboutView.kt @@ -20,10 +20,10 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter -import io.element.android.libraries.designsystem.components.preferences.PreferenceText import io.element.android.libraries.designsystem.components.preferences.PreferencePage -import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.components.preferences.PreferenceText import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.ui.strings.CommonStrings @Composable diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsView.kt index 011500a739..d28b9b2380 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsView.kt @@ -20,6 +20,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter +import io.element.android.compound.theme.Theme +import io.element.android.compound.theme.themes import io.element.android.features.preferences.impl.R import io.element.android.libraries.designsystem.components.dialogs.ListOption import io.element.android.libraries.designsystem.components.dialogs.SingleSelectionDialog @@ -29,8 +31,6 @@ import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.ListItem import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.Theme -import io.element.android.compound.theme.themes import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toImmutableList diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/analytics/AnalyticsSettingsView.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/analytics/AnalyticsSettingsView.kt index 751d513385..c41249b1e2 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/analytics/AnalyticsSettingsView.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/analytics/AnalyticsSettingsView.kt @@ -22,8 +22,8 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.features.analytics.api.preferences.AnalyticsPreferencesView import io.element.android.libraries.designsystem.components.preferences.PreferencePage -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.ui.strings.CommonStrings @Composable diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsEvents.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsEvents.kt index 376f14f7bf..58f7ac7c02 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsEvents.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/developer/DeveloperSettingsEvents.kt @@ -21,5 +21,5 @@ import io.element.android.libraries.featureflag.ui.model.FeatureUiModel sealed interface DeveloperSettingsEvents { data class UpdateEnabledFeature(val feature: FeatureUiModel, val isEnabled: Boolean) : DeveloperSettingsEvents data class SetCustomElementCallBaseUrl(val baseUrl: String?) : DeveloperSettingsEvents - data object ClearCache: DeveloperSettingsEvents + data object ClearCache : DeveloperSettingsEvents } 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 3c8ca8dc3b..9c9c482a89 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 @@ -175,6 +175,3 @@ private fun customElementCallUrlValidator(url: String?): Boolean { if (parsedUrl.host.isNullOrBlank()) error("Missing host") }.isSuccess } - - - 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 6999acb103..5c23e74cd5 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 @@ -47,7 +47,3 @@ data class NotificationSettingsState( val appNotificationsEnabled: Boolean, ) } - - - - 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 da8d79be50..2226049efe 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 @@ -60,7 +60,6 @@ fun NotificationSettingsView( onBackPressed = onBackPressed, title = stringResource(id = R.string.screen_notification_settings_title) ) { - when (state.matrixSettings) { is NotificationSettingsState.MatrixSettings.Invalid -> InvalidNotificationSettingsView( showError = state.matrixSettings.fixFailed, diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/SystemNotificationsEnabledProvider.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/SystemNotificationsEnabledProvider.kt index f33b1cb773..9aaec23e94 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/SystemNotificationsEnabledProvider.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/SystemNotificationsEnabledProvider.kt @@ -27,13 +27,13 @@ import javax.inject.Inject interface SystemNotificationsEnabledProvider { fun notificationsEnabled(): Boolean } + @SingleIn(AppScope::class) @ContributesBinding(AppScope::class, boundType = SystemNotificationsEnabledProvider::class) class DefaultSystemNotificationsEnabledProvider @Inject constructor( @ApplicationContext private val context: Context, -): SystemNotificationsEnabledProvider { +) : SystemNotificationsEnabledProvider { override fun notificationsEnabled(): Boolean { return NotificationManagerCompat.from(context).areNotificationsEnabled() } } - diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/DefaultNotificationSettingOption.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/DefaultNotificationSettingOption.kt index 1d07589a24..b5a79947af 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/DefaultNotificationSettingOption.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/DefaultNotificationSettingOption.kt @@ -20,12 +20,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import io.element.android.features.preferences.impl.R -import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.components.list.ListItemContent import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.theme.components.ListItem import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.api.room.RoomNotificationMode -import io.element.android.libraries.designsystem.components.list.ListItemContent -import io.element.android.libraries.designsystem.theme.components.ListItem @Composable fun DefaultNotificationSettingOption( diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateEvents.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateEvents.kt index f5774f1d78..f5b03c6433 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateEvents.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/notifications/edit/EditDefaultNotificationSettingStateEvents.kt @@ -19,6 +19,6 @@ package io.element.android.features.preferences.impl.notifications.edit import io.element.android.libraries.matrix.api.room.RoomNotificationMode sealed interface EditDefaultNotificationSettingStateEvents { - data class SetNotificationMode(val mode: RoomNotificationMode): EditDefaultNotificationSettingStateEvents - data object ClearError: EditDefaultNotificationSettingStateEvents + data class SetNotificationMode(val mode: RoomNotificationMode) : EditDefaultNotificationSettingStateEvents + data object ClearError : EditDefaultNotificationSettingStateEvents } 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 d03b8b2754..e67eb280af 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 @@ -59,7 +59,6 @@ fun EditDefaultNotificationSettingView( onBackPressed = onBackPressed, title = stringResource(id = title) ) { - // Only ALL_MESSAGES and MENTIONS_AND_KEYWORDS_ONLY are valid global defaults. val validModes = listOf(RoomNotificationMode.ALL_MESSAGES, RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY) @@ -69,7 +68,6 @@ fun EditDefaultNotificationSettingView( R.string.screen_notification_settings_edit_screen_group_section_header } PreferenceCategory(title = stringResource(id = categoryTitle)) { - if (state.mode != null) { Column(modifier = Modifier.selectableGroup()) { validModes.forEach { item -> diff --git a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt index 6020b83231..59c8e72cc6 100644 --- a/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt +++ b/features/preferences/impl/src/main/kotlin/io/element/android/features/preferences/impl/user/UserPreferences.kt @@ -19,8 +19,8 @@ package io.element.android.features.preferences.impl.user import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.PreviewParameter -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.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.ui.components.MatrixUserHeader import io.element.android.libraries.matrix.ui.components.MatrixUserWithNullProvider 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 ff587b217d..92294f27de 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 @@ -41,9 +41,11 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign 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.preferences.impl.R import io.element.android.libraries.designsystem.components.LabelledOutlinedTextField 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.avatar.AvatarSize import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview @@ -56,8 +58,6 @@ import io.element.android.libraries.designsystem.theme.components.TopAppBar 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 @@ -183,4 +183,3 @@ internal fun EditUserProfileViewPreview(@PreviewParameter(EditUserProfileStatePr state = state, ) } - diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenterTest.kt index 22ef0011a6..4dc8327864 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenterTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/advanced/AdvancedSettingsPresenterTest.kt @@ -20,8 +20,8 @@ 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.featureflag.test.InMemoryPreferencesStore import io.element.android.compound.theme.Theme +import io.element.android.libraries.featureflag.test.InMemoryPreferencesStore import io.element.android.tests.testutils.WarmUpRule import io.element.android.tests.testutils.awaitLastSequentialItem import kotlinx.coroutines.test.runTest diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/tracing/ConfigureTracingPresenterTest.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/tracing/ConfigureTracingPresenterTest.kt index 5ca874b6d6..d9f7f22fe5 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/tracing/ConfigureTracingPresenterTest.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/developer/tracing/ConfigureTracingPresenterTest.kt @@ -32,6 +32,7 @@ class ConfigureTracingPresenterTest { @get:Rule val warmUpRule = WarmUpRule() + @Test fun `present - initial state`() = runTest { val store = InMemoryTracingConfigurationStore() diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt index 330dea4e94..25b5aa4532 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/EditDefaultNotificationSettingsPresenterTests.kt @@ -140,5 +140,4 @@ class EditDefaultNotificationSettingsPresenterTests { matrixClient = matrixClient ) } - } diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/FakeSystemNotificationsEnabledProvider.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/FakeSystemNotificationsEnabledProvider.kt index 1a7c1b5004..9859ca21e0 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/FakeSystemNotificationsEnabledProvider.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/FakeSystemNotificationsEnabledProvider.kt @@ -16,7 +16,7 @@ package io.element.android.features.preferences.impl.notifications -class FakeSystemNotificationsEnabledProvider: SystemNotificationsEnabledProvider { +class FakeSystemNotificationsEnabledProvider : SystemNotificationsEnabledProvider { override fun notificationsEnabled(): Boolean { return true } diff --git a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenterTests.kt b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenterTests.kt index 96eca14746..e058d4691b 100644 --- a/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenterTests.kt +++ b/features/preferences/impl/src/test/kotlin/io/element/android/features/preferences/impl/notifications/NotificationSettingsPresenterTests.kt @@ -232,7 +232,7 @@ class NotificationSettingsPresenterTests { private fun createNotificationSettingsPresenter( notificationSettingsService: FakeNotificationSettingsService = FakeNotificationSettingsService() - ) : NotificationSettingsPresenter { + ): NotificationSettingsPresenter { val matrixClient = FakeMatrixClient(notificationSettingsService = notificationSettingsService) return NotificationSettingsPresenter( notificationSettingsService = notificationSettingsService, diff --git a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt index 3d49d637e5..6d926c5f4d 100644 --- a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/crash/CrashDetectionView.kt @@ -20,8 +20,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.res.stringResource import io.element.android.features.rageshake.api.R import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog -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.utils.LogCompositions import io.element.android.libraries.ui.strings.CommonStrings diff --git a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt index 0672978a04..996392d879 100644 --- a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/detection/RageshakeDetectionView.kt @@ -27,8 +27,8 @@ import io.element.android.features.rageshake.api.screenshot.ImageResult import io.element.android.features.rageshake.api.screenshot.screenshot import io.element.android.libraries.androidutils.hardware.vibrate import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog -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.utils.LogCompositions import io.element.android.libraries.designsystem.utils.OnLifecycleEvent import io.element.android.libraries.ui.strings.CommonStrings diff --git a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt index d3c830a821..f67f18570d 100644 --- a/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt +++ b/features/rageshake/api/src/main/kotlin/io/element/android/features/rageshake/api/preferences/RageshakePreferencesView.kt @@ -26,8 +26,8 @@ import io.element.android.libraries.designsystem.components.preferences.Preferen import io.element.android.libraries.designsystem.components.preferences.PreferenceSlide import io.element.android.libraries.designsystem.components.preferences.PreferenceSwitch import io.element.android.libraries.designsystem.components.preferences.PreferenceText -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.ui.strings.CommonStrings @Composable diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt index 5abaec94b6..8b6bd0723a 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/bugreport/DefaultBugReportEntryPoint.kt @@ -28,7 +28,6 @@ import javax.inject.Inject @ContributesBinding(AppScope::class) class DefaultBugReportEntryPoint @Inject constructor() : BugReportEntryPoint { override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): BugReportEntryPoint.NodeBuilder { - val plugins = ArrayList() return object : BugReportEntryPoint.NodeBuilder { diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt index 6a15553bdb..83d03939a4 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/DefaultCrashDetectionPresenter.kt @@ -20,10 +20,10 @@ import androidx.compose.runtime.Composable import androidx.compose.runtime.collectAsState import androidx.compose.runtime.rememberCoroutineScope import com.squareup.anvil.annotations.ContributesBinding +import io.element.android.features.rageshake.api.crash.CrashDataStore import io.element.android.features.rageshake.api.crash.CrashDetectionEvents import io.element.android.features.rageshake.api.crash.CrashDetectionPresenter import io.element.android.features.rageshake.api.crash.CrashDetectionState -import io.element.android.features.rageshake.api.crash.CrashDataStore import io.element.android.libraries.di.AppScope import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt index a4d06564a8..72fa4c7497 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/logs/VectorFileLogger.kt @@ -82,7 +82,7 @@ class VectorFileLogger( init { for (i in 0..15) { - val file = File(cacheDirectory, "elementLogs.${i}.txt") + val file = File(cacheDirectory, "elementLogs.$i.txt") file.safeDelete() } @@ -144,7 +144,7 @@ class VectorFileLogger( ?.flush() ?.let { 0 until logRotationCount } ?.mapNotNull { index -> - File(cacheDirectory, "$fileNamePrefix.${index}.txt") + File(cacheDirectory, "$fileNamePrefix.$index.txt") .takeIf { it.exists() } } } diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt index 5acf5b4103..2fc834086a 100755 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt @@ -88,6 +88,7 @@ class DefaultBugReporter @Inject constructor( // the pending bug report call private var bugReportCall: Call? = null + // boolean to cancel the bug report private val isCancelled = false private val logcatCommandDebug = arrayOf("logcat", "-d", "-v", "threadtime", "*:*") @@ -187,7 +188,8 @@ class DefaultBugReporter @Inject constructor( try { builder.addFormDataPart( "file", - screenshotFile.name, screenshotFile.asRequestBody(MimeTypes.OctetStream.toMediaTypeOrNull()) + screenshotFile.name, + screenshotFile.asRequestBody(MimeTypes.OctetStream.toMediaTypeOrNull()) ) } catch (e: Exception) { Timber.e(e, "## sendBugReport() : fail to write screenshot") diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt index 716f424ce3..0affc7c625 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/crash/ui/CrashDetectionPresenterTest.kt @@ -58,7 +58,6 @@ class CrashDetectionPresenterTest { skipItems(1) val initialState = awaitItem() assertThat(initialState.crashDetected).isTrue() - } } diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt index a8a80fdc25..be6b9b9818 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/detection/RageshakeDetectionPresenterTest.kt @@ -202,4 +202,3 @@ class RageshakeDetectionPresenterTest { } } } - diff --git a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt index c639adb98f..a9eb21f0a0 100644 --- a/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt +++ b/features/rageshake/impl/src/test/kotlin/io/element/android/features/rageshake/impl/preferences/RageshakePreferencesPresenterTest.kt @@ -102,4 +102,3 @@ class RageshakePreferencesPresenterTest { } } } - diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsStateProvider.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsStateProvider.kt index ad76f78515..b84302463f 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsStateProvider.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsStateProvider.kt @@ -90,5 +90,6 @@ fun aRoomDetailsState() = RoomDetailsState( ) fun aDmRoomDetailsState(isDmMemberIgnored: Boolean = false) = aRoomDetailsState().copy( - roomType = RoomDetailsType.Dm(aDmRoomMember(isIgnored = isDmMemberIgnored)), roomMemberDetailsState = aRoomMemberDetailsState() + roomType = RoomDetailsType.Dm(aDmRoomMember(isIgnored = isDmMemberIgnored)), + roomMemberDetailsState = aRoomMemberDetailsState() ) 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 6682db392f..69f4e818cc 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 @@ -76,9 +76,9 @@ class RoomDetailsEditPresenter @Inject constructor( roomAvatarUri, ) { derivedStateOf { - roomAvatarUri?.toString()?.trim() != room.avatarUrl?.toUri()?.toString()?.trim() - || roomName.trim() != (room.name ?: room.displayName).trim() - || roomTopic.orEmpty().trim() != room.topic.orEmpty().trim() + roomAvatarUri?.toString()?.trim() != room.avatarUrl?.toUri()?.toString()?.trim() || + roomName.trim() != (room.name ?: room.displayName).trim() || + roomTopic.orEmpty().trim() != room.topic.orEmpty().trim() } } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt index dca726a77a..cac6e23878 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/edit/RoomDetailsEditView.kt @@ -45,9 +45,11 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.KeyboardCapitalization 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.designsystem.components.LabelledTextField 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.avatar.AvatarSize import io.element.android.libraries.designsystem.components.button.BackButton import io.element.android.libraries.designsystem.preview.ElementPreview @@ -60,8 +62,6 @@ import io.element.android.libraries.designsystem.theme.components.TopAppBar 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 diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt index f7c4363613..93c9744338 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersPresenter.kt @@ -162,4 +162,3 @@ class RoomInviteMembersPresenter @Inject constructor( }.runCatchingUpdatingState(roomMembers) } } - diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt index e40e624afc..a66813a699 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/invite/RoomInviteMembersView.kt @@ -30,7 +30,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource 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.designsystem.components.async.AsyncLoading 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 @@ -49,8 +51,6 @@ import io.element.android.libraries.matrix.ui.components.CheckableUserRow import io.element.android.libraries.matrix.ui.components.SelectedUsersList import io.element.android.libraries.matrix.ui.model.getAvatarData import io.element.android.libraries.matrix.ui.model.getBestName -import io.element.android.compound.theme.ElementTheme -import io.element.android.libraries.designsystem.components.async.AsyncLoading import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListDataSource.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListDataSource.kt index 5a9c30698b..89914111fc 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListDataSource.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/members/RoomMemberListDataSource.kt @@ -42,11 +42,10 @@ class RoomMemberListDataSource @Inject constructor( roomMembers } else { roomMembers.filter { member -> - member.userId.value.contains(query, ignoreCase = true) - || member.displayName?.contains(query, ignoreCase = true).orFalse() + member.userId.value.contains(query, ignoreCase = true) || + member.displayName?.contains(query, ignoreCase = true).orFalse() } } filteredMembers } - } 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 0f66f7db4c..dbbaa43816 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 @@ -74,13 +74,16 @@ class RoomMemberListPresenter @Inject constructor( SearchBarResultState.Initial() } else { val results = roomMemberListDataSource.search(searchQuery).groupBy { it.membership } - if (results.isEmpty()) SearchBarResultState.NoResultsFound() - else SearchBarResultState.Results( - RoomMembers( - invited = results.getOrDefault(RoomMembershipState.INVITE, emptyList()).toImmutableList(), - joined = results.getOrDefault(RoomMembershipState.JOIN, emptyList()).toImmutableList(), + if (results.isEmpty()) { + SearchBarResultState.NoResultsFound() + } else { + SearchBarResultState.Results( + RoomMembers( + invited = results.getOrDefault(RoomMembershipState.INVITE, emptyList()).toImmutableList(), + joined = results.getOrDefault(RoomMembershipState.JOIN, emptyList()).toImmutableList(), + ) ) - ) + } } } } @@ -100,4 +103,3 @@ class RoomMemberListPresenter @Inject constructor( ) } } - 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 abd7d4130a..0fe08ef02c 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 @@ -67,7 +67,6 @@ fun RoomMemberListView( onMemberSelected: (UserId) -> Unit, modifier: Modifier = Modifier, ) { - fun onUserSelected(roomMember: RoomMember) { onMemberSelected(roomMember.userId) } diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsEvents.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsEvents.kt index 8b3c25d267..0ce6e56176 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsEvents.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/notificationsettings/RoomNotificationSettingsEvents.kt @@ -20,8 +20,8 @@ import io.element.android.libraries.matrix.api.room.RoomNotificationMode sealed interface RoomNotificationSettingsEvents { data class RoomNotificationModeChanged(val mode: RoomNotificationMode) : RoomNotificationSettingsEvents - data class SetNotificationMode(val isDefault: Boolean): RoomNotificationSettingsEvents - data object DeleteCustomNotification: RoomNotificationSettingsEvents - data object ClearSetNotificationError: RoomNotificationSettingsEvents - data object ClearRestoreDefaultError: RoomNotificationSettingsEvents + data class SetNotificationMode(val isDefault: Boolean) : RoomNotificationSettingsEvents + data object DeleteCustomNotification : RoomNotificationSettingsEvents + data object ClearSetNotificationError : RoomNotificationSettingsEvents + data object ClearRestoreDefaultError : RoomNotificationSettingsEvents } 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 04f0c0859b..7a1cc6c63e 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 @@ -45,7 +45,8 @@ internal class RoomNotificationSettingsStateProvider : PreviewParameterProvider< roomName = "Room 1", AsyncData.Success(RoomNotificationSettings( mode = RoomNotificationMode.MUTE, - isDefault = isDefault)), + isDefault = isDefault + )), pendingRoomNotificationMode = null, pendingSetDefault = null, defaultRoomNotificationMode = RoomNotificationMode.ALL_MESSAGES, 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 b70c21798c..f534fb17f4 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 @@ -31,6 +31,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextAlign 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.core.bool.orTrue import io.element.android.libraries.designsystem.components.async.AsyncActionView @@ -45,7 +46,6 @@ import io.element.android.libraries.designsystem.theme.components.Scaffold import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TopAppBar import io.element.android.libraries.matrix.api.room.RoomNotificationMode -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -133,8 +133,8 @@ private fun RoomSpecificNotificationSettingsView( } RoomNotificationMode.MUTE -> stringResource(id = CommonStrings.common_mute) } - val displayMentionsOnlyDisclaimer = state.displayMentionsOnlyDisclaimer - && state.defaultRoomNotificationMode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY + val displayMentionsOnlyDisclaimer = state.displayMentionsOnlyDisclaimer && + state.defaultRoomNotificationMode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY RoomNotificationSettingsOption( roomNotificationSettingsItem = RoomNotificationSettingsItem(state.defaultRoomNotificationMode, defaultModeTitle), isSelected = true, 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 8e0bea68a6..bb037c2ab5 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 @@ -31,7 +31,8 @@ internal class UserDefinedRoomNotificationSettingsStateProvider : PreviewParamet AsyncData.Success( RoomNotificationSettings( mode = RoomNotificationMode.MUTE, - isDefault = false) + isDefault = false + ) ), pendingRoomNotificationMode = null, pendingSetDefault = null, diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/RoomDetailsPresenterTests.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/RoomDetailsPresenterTests.kt index 6ffba16377..f91ea4772e 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/RoomDetailsPresenterTests.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/RoomDetailsPresenterTests.kt @@ -384,7 +384,6 @@ class RoomDetailsPresenterTests { moleculeFlow(RecompositionMode.Immediate) { presenter.present() }.test { - notificationSettingsService.setRoomNotificationMode(room.roomId, RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY) val updatedState = consumeItemsUntilPredicate { it.roomNotificationSettings?.mode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY @@ -453,4 +452,3 @@ fun aMatrixRoom( isDirect = isDirect, notificationSettingsService = notificationSettingsService ) - diff --git a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/notificationsettings/RoomNotificationSettingsPresenterTests.kt b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/notificationsettings/RoomNotificationSettingsPresenterTests.kt index 41311a4086..23bd504bf8 100644 --- a/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/notificationsettings/RoomNotificationSettingsPresenterTests.kt +++ b/features/roomdetails/impl/src/test/kotlin/io/element/android/features/roomdetails/notificationsettings/RoomNotificationSettingsPresenterTests.kt @@ -57,7 +57,7 @@ class RoomNotificationSettingsPresenterTests { }.test { awaitItem().eventSink(RoomNotificationSettingsEvents.RoomNotificationModeChanged(RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY)) val updatedState = consumeItemsUntilPredicate { - it.roomNotificationSettings.dataOrNull()?.mode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY + it.roomNotificationSettings.dataOrNull()?.mode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY }.last() assertThat(updatedState.roomNotificationSettings.dataOrNull()?.mode).isEqualTo(RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY) cancelAndIgnoreRemainingEvents() @@ -73,7 +73,7 @@ class RoomNotificationSettingsPresenterTests { }.test { notificationSettingsService.setRoomNotificationMode(A_ROOM_ID, RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY) val updatedState = consumeItemsUntilPredicate { - it.roomNotificationSettings.dataOrNull()?.mode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY + it.roomNotificationSettings.dataOrNull()?.mode == RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY }.last() assertThat(updatedState.roomNotificationSettings.dataOrNull()?.mode).isEqualTo(RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY) } @@ -195,7 +195,7 @@ class RoomNotificationSettingsPresenterTests { private fun createRoomNotificationSettingsPresenter( notificationSettingsService: FakeNotificationSettingsService = FakeNotificationSettingsService(), room: FakeMatrixRoom = aMatrixRoom(notificationSettingsService = notificationSettingsService), - ): RoomNotificationSettingsPresenter{ + ): RoomNotificationSettingsPresenter { return RoomNotificationSettingsPresenter( room = room, notificationSettingsService = notificationSettingsService, diff --git a/features/roomlist/api/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt b/features/roomlist/api/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt index 7fe01aa64e..a24fadc989 100644 --- a/features/roomlist/api/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt +++ b/features/roomlist/api/src/main/kotlin/io/element/android/features/roomlist/api/RoomListEntryPoint.kt @@ -40,4 +40,3 @@ interface RoomListEntryPoint : FeatureEntryPoint { fun onReportBugClicked() } } - diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt index 25016e7a2f..3cf4309a16 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/DefaultRoomListEntryPoint.kt @@ -29,7 +29,6 @@ import javax.inject.Inject class DefaultRoomListEntryPoint @Inject constructor() : RoomListEntryPoint { override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): RoomListEntryPoint.NodeBuilder { - val plugins = ArrayList() return object : RoomListEntryPoint.NodeBuilder { @@ -45,4 +44,3 @@ class DefaultRoomListEntryPoint @Inject constructor() : RoomListEntryPoint { } } } - diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/InvitesEntryPointView.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/InvitesEntryPointView.kt index d00ac783dc..ea2b5d71a3 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/InvitesEntryPointView.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/InvitesEntryPointView.kt @@ -33,11 +33,11 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.semantics.Role import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.atomic.atoms.UnreadIndicatorAtom -import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.libraries.designsystem.preview.ElementPreview -import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.atomic.atoms.UnreadIndicatorAtom +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.ui.strings.CommonStrings @Composable diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt index 6610136f5d..406c28592a 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt @@ -43,7 +43,8 @@ open class RoomListStateProvider : PreviewParameterProvider { aRoomListState().copy(displaySearchResults = true), aRoomListState().copy( contextMenu = RoomListState.ContextMenu.Shown( - roomId = RoomId("!aRoom:aDomain"), roomName = "A nice room name" + roomId = RoomId("!aRoom:aDomain"), + roomName = "A nice room name" ) ), aRoomListState().copy(displayRecoveryKeyPrompt = true), diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt index eee2868378..c87b0ec68f 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomListTopBar.kt @@ -180,10 +180,14 @@ private fun DefaultRoomListTopBar( }, blurSize = DpSize(avatarBloomSize, avatarBloomSize), offset = DpOffset(24.dp, 24.dp + statusBarPadding), - clipToSize = if (appBarHeight > 0) DpSize( - avatarBloomSize, - appBarHeight.toDp() - ) else DpSize.Unspecified, + clipToSize = if (appBarHeight > 0) { + DpSize( + avatarBloomSize, + appBarHeight.toDp() + ) + } else { + DpSize.Unspecified + }, bottomSoftEdgeColor = ElementTheme.materialColors.background, bottomSoftEdgeAlpha = 1f - collapsedFraction, alpha = if (areSearchResultsDisplayed) 0f else 1f, diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryPlaceholderRow.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryPlaceholderRow.kt index ae9aed918c..7181afea7a 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryPlaceholderRow.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/components/RoomSummaryPlaceholderRow.kt @@ -31,12 +31,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.atomic.atoms.PlaceholderAtom 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.theme.placeholderBackground -import io.element.android.compound.theme.ElementTheme /** * https://www.figma.com/file/0MMNu7cTOzLOlWb7ctTkv3/Element-X?node-id=6547%3A147623 diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/InviteStateDataSource.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/InviteStateDataSource.kt index f44ec1ea83..b53dfd07ae 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/InviteStateDataSource.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/InviteStateDataSource.kt @@ -23,5 +23,4 @@ interface InviteStateDataSource { @Composable fun inviteState(): InvitesState - } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/LoggerTag.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/LoggerTag.kt index b8b56f5ace..49497f1a9a 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/LoggerTag.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/LoggerTag.kt @@ -22,4 +22,3 @@ private val loggerTag = LoggerTag("SecureBackup") val loggerTagRoot = LoggerTag("Root", loggerTag) val loggerTagSetup = LoggerTag("Setup", loggerTag) val loggerTagDisable = LoggerTag("Disable", loggerTag) - 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 54c37761ed..754beb6d5f 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 @@ -23,6 +23,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter +import io.element.android.compound.theme.ElementTheme import io.element.android.features.securebackup.impl.R import io.element.android.libraries.architecture.AsyncData import io.element.android.libraries.designsystem.components.async.AsyncLoading @@ -41,7 +42,6 @@ import io.element.android.libraries.designsystem.utils.snackbar.SnackbarHost import io.element.android.libraries.designsystem.utils.snackbar.rememberSnackbarHostState import io.element.android.libraries.matrix.api.encryption.BackupState import io.element.android.libraries.matrix.api.encryption.RecoveryState -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings @Composable diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupNode.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupNode.kt index 84cee69110..6776a67764 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupNode.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupNode.kt @@ -68,10 +68,11 @@ class SecureBackupSetupNode @AssistedInject constructor( private fun CoroutineScope.postSuccessSnackbar() = launch { snackbarDispatcher.post( SnackbarMessage( - messageResId = if (inputs.isChangeRecoveryKeyUserStory) + messageResId = if (inputs.isChangeRecoveryKeyUserStory) { R.string.screen_recovery_key_change_success - else + } else { R.string.screen_recovery_key_setup_success + } ) ) } diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupStateMachine.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupStateMachine.kt index 7e2c633a61..999d0a63c0 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupStateMachine.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupStateMachine.kt @@ -24,8 +24,7 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi import javax.inject.Inject import com.freeletics.flowredux.dsl.State as MachineState -class SecureBackupSetupStateMachine @Inject constructor( -) : FlowReduxStateMachine( +class SecureBackupSetupStateMachine @Inject constructor() : FlowReduxStateMachine( initialState = State.Initial ) { diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupView.kt index abdf8e9563..c62072b4a5 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/SecureBackupSetupView.kt @@ -80,10 +80,11 @@ private fun SecureBackupSetupState.canGoBack(): Boolean { private fun title(state: SecureBackupSetupState): String { return when (state.setupState) { SetupState.Init, - SetupState.Creating -> if (state.isChangeRecoveryKeyUserStory) + SetupState.Creating -> if (state.isChangeRecoveryKeyUserStory) { stringResource(id = R.string.screen_recovery_key_change_title) - else + } else { stringResource(id = R.string.screen_recovery_key_setup_title) + } is SetupState.Created, is SetupState.CreatedAndSaved -> stringResource(id = R.string.screen_recovery_key_save_title) @@ -94,10 +95,11 @@ private fun title(state: SecureBackupSetupState): String { private fun subtitle(state: SecureBackupSetupState): String { return when (state.setupState) { SetupState.Init, - SetupState.Creating -> if (state.isChangeRecoveryKeyUserStory) + SetupState.Creating -> if (state.isChangeRecoveryKeyUserStory) { stringResource(id = R.string.screen_recovery_key_change_description) - else + } else { stringResource(id = R.string.screen_recovery_key_setup_description) + } is SetupState.Created, is SetupState.CreatedAndSaved -> stringResource(id = R.string.screen_recovery_key_save_description) diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt index 34b731b1ab..5cb8f0739b 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/setup/views/RecoveryKeyView.kt @@ -41,6 +41,8 @@ import androidx.compose.ui.text.input.VisualTransformation import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.PreviewParameter 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.features.securebackup.impl.tools.RecoveryKeyVisualTransformation import io.element.android.libraries.designsystem.modifiers.clickableIfNotNull @@ -52,8 +54,6 @@ import io.element.android.libraries.designsystem.theme.components.OutlinedTextFi import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.autofill import io.element.android.libraries.designsystem.utils.CommonDrawables -import io.element.android.compound.theme.ElementTheme -import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -209,10 +209,11 @@ private fun RecoveryKeyFooter(state: RecoveryKeyViewState) { ) Text( text = stringResource( - id = if (state.recoveryKeyUserStory == RecoveryKeyUserStory.Change) + id = if (state.recoveryKeyUserStory == RecoveryKeyUserStory.Change) { R.string.screen_recovery_key_change_generate_key_description - else + } else { R.string.screen_recovery_key_setup_generate_key_description + } ), color = ElementTheme.colors.textSecondary, modifier = Modifier.padding(start = 8.dp), diff --git a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/tools/RecoveryKeyVisualTransformation.kt b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/tools/RecoveryKeyVisualTransformation.kt index f15acaa458..d35dbf5ee9 100644 --- a/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/tools/RecoveryKeyVisualTransformation.kt +++ b/features/securebackup/impl/src/main/kotlin/io/element/android/features/securebackup/impl/tools/RecoveryKeyVisualTransformation.kt @@ -37,10 +37,11 @@ class RecoveryKeyVisualTransformation : VisualTransformation { override fun originalToTransformed(offset: Int): Int { if (offset == 0) return 0 val numberOfChunks = offset / 4 - return if (offset == text.length && offset % 4 == 0) + return if (offset == text.length && offset % 4 == 0) { offset + numberOfChunks - 1 - else + } else { offset + numberOfChunks + } } override fun transformedToOriginal(offset: Int): Int { diff --git a/features/signedout/api/src/main/kotlin/io/element/android/features/signedout/api/SignedOutEntryPoint.kt b/features/signedout/api/src/main/kotlin/io/element/android/features/signedout/api/SignedOutEntryPoint.kt index 7a156998d1..17640642dc 100644 --- a/features/signedout/api/src/main/kotlin/io/element/android/features/signedout/api/SignedOutEntryPoint.kt +++ b/features/signedout/api/src/main/kotlin/io/element/android/features/signedout/api/SignedOutEntryPoint.kt @@ -34,4 +34,3 @@ interface SignedOutEntryPoint : FeatureEntryPoint { fun build(): Node } } - diff --git a/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutView.kt b/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutView.kt index 66d552423e..9f62546c1a 100644 --- a/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutView.kt +++ b/features/signedout/impl/src/main/kotlin/io/element/android/features/signedout/impl/SignedOutView.kt @@ -31,6 +31,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.atomic.molecules.ButtonColumnMolecule import io.element.android.libraries.designsystem.atomic.molecules.IconTitleSubtitleMolecule import io.element.android.libraries.designsystem.atomic.organisms.InfoListItem @@ -41,7 +42,6 @@ import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Button import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial import io.element.android.libraries.designsystem.utils.CommonDrawables -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.persistentListOf diff --git a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionViewEvents.kt b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionViewEvents.kt index 10e95bc09a..8f9c69085c 100644 --- a/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionViewEvents.kt +++ b/features/verifysession/impl/src/main/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionViewEvents.kt @@ -17,10 +17,10 @@ package io.element.android.features.verifysession.impl sealed interface VerifySelfSessionViewEvents { - data object RequestVerification: VerifySelfSessionViewEvents - data object StartSasVerification: VerifySelfSessionViewEvents - data object Restart: VerifySelfSessionViewEvents - data object ConfirmVerification: VerifySelfSessionViewEvents - data object DeclineVerification: VerifySelfSessionViewEvents - data object CancelAndClose: VerifySelfSessionViewEvents + data object RequestVerification : VerifySelfSessionViewEvents + data object StartSasVerification : VerifySelfSessionViewEvents + data object Restart : VerifySelfSessionViewEvents + data object ConfirmVerification : VerifySelfSessionViewEvents + data object DeclineVerification : VerifySelfSessionViewEvents + data object CancelAndClose : VerifySelfSessionViewEvents } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 411d16ed8c..4976dd9556 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -210,7 +210,7 @@ kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } anvil = { id = "com.squareup.anvil", version.ref = "anvil" } detekt = "io.gitlab.arturbosch.detekt:1.23.4" -ktlint = "org.jlleitschuh.gradle.ktlint:12.0.3" +ktlint = "org.jlleitschuh.gradle.ktlint:12.1.0" dependencygraph = "com.savvasdalkitsis.module-dependency-graph:0.12" dependencycheck = "org.owasp.dependencycheck:9.0.8" dependencyanalysis = { id = "com.autonomousapps.dependency-analysis", version.ref = "dependencyAnalysis" } diff --git a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/accessibility/ContextExt.kt b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/accessibility/ContextExt.kt index bb223e43fb..803c140c58 100644 --- a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/accessibility/ContextExt.kt +++ b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/accessibility/ContextExt.kt @@ -36,4 +36,3 @@ fun Context.isScreenReaderEnabled(): Boolean { it.isEnabled && it.isTouchExplorationEnabled } } - diff --git a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/compat/Compat.kt b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/compat/Compat.kt index ca00f72fb7..3c897b3d88 100644 --- a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/compat/Compat.kt +++ b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/compat/Compat.kt @@ -26,6 +26,6 @@ fun PackageManager.getApplicationInfoCompat(packageName: String, flags: Int): Ap packageName, PackageManager.ApplicationInfoFlags.of(flags.toLong()) ) - else -> @Suppress("DEPRECATION") getApplicationInfo(packageName, flags) + else -> getApplicationInfo(packageName, flags) } } diff --git a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/compressFile.kt b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/FileCompression.kt similarity index 100% rename from libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/compressFile.kt rename to libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/file/FileCompression.kt diff --git a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hardware/vibrator.kt b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hardware/VibratorTools.kt similarity index 100% rename from libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hardware/vibrator.kt rename to libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hardware/VibratorTools.kt diff --git a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hash/Hash.kt b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hash/Hash.kt index 6d4cc321a0..c9c0ce956a 100644 --- a/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hash/Hash.kt +++ b/libraries/androidutils/src/main/kotlin/io/element/android/libraries/androidutils/hash/Hash.kt @@ -26,8 +26,8 @@ fun String.hash() = try { val digest = MessageDigest.getInstance("SHA-512") digest.update(toByteArray()) digest.digest() - .joinToString("") { String.format(Locale.ROOT, "%02X", it) } - .lowercase(Locale.ROOT) + .joinToString("") { String.format(Locale.ROOT, "%02X", it) } + .lowercase(Locale.ROOT) } catch (exc: Exception) { // Should not happen, but just in case hashCode().toString() diff --git a/libraries/androidutils/src/test/kotlin/io/element/android/libraries/androidutils/filesize/AndroidFileSizeFormatterTest.kt b/libraries/androidutils/src/test/kotlin/io/element/android/libraries/androidutils/filesize/AndroidFileSizeFormatterTest.kt index 4d83a2367a..32239ca36b 100644 --- a/libraries/androidutils/src/test/kotlin/io/element/android/libraries/androidutils/filesize/AndroidFileSizeFormatterTest.kt +++ b/libraries/androidutils/src/test/kotlin/io/element/android/libraries/androidutils/filesize/AndroidFileSizeFormatterTest.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package io.element.android.libraries.androidutils.filesize +package io.element.android.libraries.androidutils.filesize import android.os.Build import com.google.common.truth.Truth.assertThat diff --git a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/overlay/HideOverlayBackPressHandler.kt b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/overlay/HideOverlayBackPressHandler.kt index 38149f2e92..82d5651825 100644 --- a/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/overlay/HideOverlayBackPressHandler.kt +++ b/libraries/architecture/src/main/kotlin/io/element/android/libraries/architecture/overlay/HideOverlayBackPressHandler.kt @@ -23,8 +23,8 @@ import io.element.android.libraries.architecture.overlay.operation.Hide import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map -class HideOverlayBackPressHandler - : BaseBackPressHandlerStrategy() { +class HideOverlayBackPressHandler : + BaseBackPressHandlerStrategy() { override val canHandleBackPressFlow: Flow by lazy { navModel.elements.map(::areThereElements) diff --git a/libraries/cryptography/impl/src/test/kotlin/io/element/android/libraries/cryptography/impl/AESEncryptionDecryptionServiceTest.kt b/libraries/cryptography/impl/src/test/kotlin/io/element/android/libraries/cryptography/impl/AESEncryptionDecryptionServiceTest.kt index 38e1c924ca..fbda2314d4 100644 --- a/libraries/cryptography/impl/src/test/kotlin/io/element/android/libraries/cryptography/impl/AESEncryptionDecryptionServiceTest.kt +++ b/libraries/cryptography/impl/src/test/kotlin/io/element/android/libraries/cryptography/impl/AESEncryptionDecryptionServiceTest.kt @@ -50,5 +50,4 @@ class AESEncryptionDecryptionServiceTest { encryptionDecryptionService.decrypt(decryptionKey, encryptionResult) } } - } diff --git a/libraries/dateformatter/impl/src/main/kotlin/io/element/android/libraries/dateformatter/impl/di/DateFormatterModule.kt b/libraries/dateformatter/impl/src/main/kotlin/io/element/android/libraries/dateformatter/impl/di/DateFormatterModule.kt index 352306da65..bd83d3abce 100644 --- a/libraries/dateformatter/impl/src/main/kotlin/io/element/android/libraries/dateformatter/impl/di/DateFormatterModule.kt +++ b/libraries/dateformatter/impl/src/main/kotlin/io/element/android/libraries/dateformatter/impl/di/DateFormatterModule.kt @@ -22,7 +22,7 @@ import dagger.Provides import io.element.android.libraries.di.AppScope import kotlinx.datetime.Clock import kotlinx.datetime.TimeZone -import java.util.* +import java.util.Locale @Module @ContributesTo(AppScope::class) diff --git a/libraries/deeplink/src/main/kotlin/io/element/android/libraries/deeplink/usecase/InviteFriendsUseCase.kt b/libraries/deeplink/src/main/kotlin/io/element/android/libraries/deeplink/usecase/InviteFriendsUseCase.kt index 8ee94c31fe..24296f8798 100644 --- a/libraries/deeplink/src/main/kotlin/io/element/android/libraries/deeplink/usecase/InviteFriendsUseCase.kt +++ b/libraries/deeplink/src/main/kotlin/io/element/android/libraries/deeplink/usecase/InviteFriendsUseCase.kt @@ -21,11 +21,11 @@ import io.element.android.libraries.androidutils.system.startSharePlainTextInten import io.element.android.libraries.core.meta.BuildMeta import io.element.android.libraries.matrix.api.MatrixClient import io.element.android.libraries.matrix.api.permalink.PermalinkBuilder +import io.element.android.libraries.ui.strings.CommonStrings import io.element.android.services.toolbox.api.strings.StringProvider import timber.log.Timber import javax.inject.Inject import io.element.android.libraries.androidutils.R as AndroidUtilsR -import io.element.android.libraries.ui.strings.CommonStrings class InviteFriendsUseCase @Inject constructor( private val stringProvider: StringProvider, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/ElementLogoAtom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/ElementLogoAtom.kt index e08f156340..338ad05349 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/ElementLogoAtom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/ElementLogoAtom.kt @@ -38,8 +38,8 @@ import io.element.android.libraries.designsystem.R import io.element.android.libraries.designsystem.modifiers.blurCompat import io.element.android.libraries.designsystem.modifiers.blurredShapeShadow import io.element.android.libraries.designsystem.modifiers.canUseBlurMaskFilter -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight @Composable fun ElementLogoAtom( @@ -49,7 +49,6 @@ fun ElementLogoAtom( darkTheme: Boolean = isSystemInDarkTheme(), ) { val blur = if (darkTheme) 160.dp else 24.dp - //box-shadow: 0px 6.075949668884277px 24.30379867553711px 0px #1B1D2280; val shadowColor = if (darkTheme) size.shadowColorDark else size.shadowColorLight val logoShadowColor = if (darkTheme) size.logoShadowColorDark else size.logoShadowColorLight val backgroundColor = if (darkTheme) Color.White.copy(alpha = 0.2f) else Color.White.copy(alpha = 0.4f) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/PlaceholderAtom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/PlaceholderAtom.kt index a892667379..96c23c4ae7 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/PlaceholderAtom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/PlaceholderAtom.kt @@ -26,10 +26,10 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.libraries.designsystem.preview.ElementPreview -import io.element.android.libraries.designsystem.theme.placeholderBackground import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.theme.placeholderBackground @Composable fun PlaceholderAtom( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt index 772bc723d7..8985446a68 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RedIndicatorAtom.kt @@ -28,9 +28,9 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.compound.theme.ElementTheme @Composable fun RedIndicatorAtom( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RoundedIconAtom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RoundedIconAtom.kt index 1bb7915fa3..ac0c7ec80a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RoundedIconAtom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/RoundedIconAtom.kt @@ -32,11 +32,11 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial -import io.element.android.compound.theme.ElementTheme /** * RoundedIconAtom is an atom which displays an icon inside a rounded container. diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/UnreadIndicatorAtom.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/UnreadIndicatorAtom.kt index 99b0c8363c..a770cdcaec 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/UnreadIndicatorAtom.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/atoms/UnreadIndicatorAtom.kt @@ -26,10 +26,10 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.libraries.designsystem.preview.ElementPreview -import io.element.android.libraries.designsystem.theme.unreadIndicator import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.theme.unreadIndicator @Composable fun UnreadIndicatorAtom( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonColumnMolecule.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonColumnMolecule.kt index bdd5fa4cf3..fd5be7c680 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonColumnMolecule.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonColumnMolecule.kt @@ -24,8 +24,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -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.theme.components.Button import io.element.android.libraries.designsystem.theme.components.OutlinedButton import io.element.android.libraries.designsystem.theme.components.TextButton diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonRowMolecule.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonRowMolecule.kt index 0d5afbe714..9388b54880 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonRowMolecule.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/molecules/ButtonRowMolecule.kt @@ -22,8 +22,8 @@ import androidx.compose.foundation.layout.RowScope import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -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.theme.components.TextButton @Composable diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/organisms/InfoListOrganism.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/organisms/InfoListOrganism.kt index 47ae6d46d0..e3611de5db 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/organisms/InfoListOrganism.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/organisms/InfoListOrganism.kt @@ -29,13 +29,13 @@ import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.text.TextStyle import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.atomic.molecules.InfoListItemMolecule import io.element.android.libraries.designsystem.atomic.molecules.InfoListItemPosition import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/HeaderFooterPage.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/HeaderFooterPage.kt index 0c94df7bf2..c08eb5149a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/HeaderFooterPage.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/HeaderFooterPage.kt @@ -26,11 +26,11 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Scaffold import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme /** * @param modifier Classical modifier. diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/OnBoardingPage.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/OnBoardingPage.kt index 7a66ac97a5..1b8aed72c2 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/OnBoardingPage.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/atomic/pages/OnBoardingPage.kt @@ -29,11 +29,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.ContentScale import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.R -import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.libraries.designsystem.preview.ElementPreview -import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.R +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.theme.components.Text /** * Page for onboarding screens, with content and optional footer. diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/colors/AvatarColors.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/colors/AvatarColors.kt index abac299ca6..ed56bde5ce 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/colors/AvatarColors.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/colors/AvatarColors.kt @@ -22,4 +22,3 @@ data class AvatarColors( val background: Color, val foreground: Color, ) - diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt index 701d2945ba..4995d4afdf 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ClickableLinkText.kt @@ -184,4 +184,3 @@ private fun ContentToPreview() { interactionSource = remember { MutableInteractionSource() }, ) } - diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledOutlinedTextField.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledOutlinedTextField.kt index 9b31970da0..615abcb187 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledOutlinedTextField.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledOutlinedTextField.kt @@ -25,11 +25,11 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.OutlinedTextField import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable fun LabelledOutlinedTextField( @@ -83,4 +83,3 @@ internal fun LabelledOutlinedTextFieldPreview() = ElementPreview { ) } } - diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledTextField.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledTextField.kt index 027aeb8f95..9ea59545ee 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledTextField.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/LabelledTextField.kt @@ -25,11 +25,11 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TextField -import io.element.android.compound.theme.ElementTheme @Composable fun LabelledTextField( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/PinIcon.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/PinIcon.kt index 11bed90654..7ad7ec17ec 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/PinIcon.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/PinIcon.kt @@ -24,11 +24,11 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.R -import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.libraries.designsystem.preview.ElementPreview -import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.R +import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.libraries.designsystem.theme.components.Icon @Composable fun PinIcon( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt index e678f7817c..b2ccab88d4 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/ProgressDialog.kt @@ -35,10 +35,10 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties -import io.element.android.libraries.designsystem.theme.components.DialogPreview import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator +import io.element.android.libraries.designsystem.theme.components.DialogPreview import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.TextButton import io.element.android.libraries.ui.strings.CommonStrings diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncFailure.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncFailure.kt index e3186f5600..c6b226e055 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncFailure.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncFailure.kt @@ -26,8 +26,8 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp -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.theme.components.Button import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.ui.strings.CommonStrings diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncLoading.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncLoading.kt index 7f6385658d..544f35c038 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncLoading.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/async/AsyncLoading.kt @@ -23,8 +23,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp -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.theme.components.CircularProgressIndicator @Composable diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/MultipleSelectionDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/MultipleSelectionDialog.kt index 055843edae..e790cb1921 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/MultipleSelectionDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/MultipleSelectionDialog.kt @@ -29,9 +29,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.airbnb.android.showkase.annotation.ShowkaseComposable import io.element.android.libraries.designsystem.components.list.CheckboxListItem -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewGroup +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.DialogPreview import io.element.android.libraries.designsystem.theme.components.ListSupportingText import io.element.android.libraries.designsystem.theme.components.SimpleAlertDialogContent diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/SingleSelectionDialog.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/SingleSelectionDialog.kt index 36869bf270..2462fd779f 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/SingleSelectionDialog.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/dialogs/SingleSelectionDialog.kt @@ -27,9 +27,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.airbnb.android.showkase.annotation.ShowkaseComposable import io.element.android.libraries.designsystem.components.list.RadioButtonListItem -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewGroup +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.DialogPreview import io.element.android.libraries.designsystem.theme.components.ListSupportingText import io.element.android.libraries.designsystem.theme.components.SimpleAlertDialogContent diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/SingleSelectionListItem.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/SingleSelectionListItem.kt index 01dff71991..d119025b9b 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/SingleSelectionListItem.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/SingleSelectionListItem.kt @@ -166,7 +166,7 @@ internal fun SingleSelectionListItemCustomFormattertPreview() { options = listOptionOf("Option 1", "Option 2", "Option 3"), supportingText = "Supporting text", onSelectionChanged = {}, - resultFormatter = { "Selected index: $it"}, + resultFormatter = { "Selected index: $it" }, selected = 1, displayResultInTrailingContent = true, ) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/TextFieldListItem.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/TextFieldListItem.kt index c26c12c7ea..f0e9458a02 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/TextFieldListItem.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/list/TextFieldListItem.kt @@ -24,11 +24,11 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.tooling.preview.Preview +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup import io.element.android.libraries.designsystem.theme.components.OutlinedTextField import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme @Composable fun TextFieldListItem( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt index 0672ee68b5..6aa96cf6c5 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/media/WaveformPlaybackView.kt @@ -123,7 +123,9 @@ fun WaveformPlaybackView( requestDisallowInterceptTouchEvent.invoke(true) seekProgress.value = e.x / waveformWidthPx true - } else false + } else { + false + } } MotionEvent.ACTION_MOVE -> { if (e.x in 0F..waveformWidthPx) { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt index 03631634a6..4af926547c 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceCategory.kt @@ -24,11 +24,11 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.icons.CompoundDrawables import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme -import io.element.android.libraries.designsystem.icons.CompoundDrawables @Composable fun PreferenceCategory( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt index 1727c68ca5..a87bb06da1 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/components/preferences/PreferenceDivider.kt @@ -19,10 +19,10 @@ package io.element.android.libraries.designsystem.components.preferences import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup import io.element.android.libraries.designsystem.theme.components.HorizontalDivider -import io.element.android.compound.theme.ElementTheme @Composable fun PreferenceDivider( diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt index a131410646..8bd7d2b16e 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/icons/IconsPreview.kt @@ -55,7 +55,7 @@ internal class OtherIconListPreviewProvider : PreviewParameterProvider - IconChunk(index = index+1, total = chunks.size, icons = chunk.toPersistentList()) + IconChunk(index = index + 1, total = chunks.size, icons = chunk.toPersistentList()) } .asSequence() } @@ -76,7 +76,8 @@ internal fun IconsCompoundPreview(@PreviewParameter(CompoundIconListPreviewProvi iconNameTransform = { name -> name.removePrefix("ic_compound_") .replace("_", " ") - }) + } + ) } @PreviewsDayNight @@ -88,7 +89,8 @@ internal fun IconsOtherPreview(@PreviewParameter(OtherIconListPreviewProvider::c iconNameTransform = { name -> name.removePrefix("ic_") .replace("_", " ") - }) + } + ) } @Composable diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/modifiers/CircularReveal.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/modifiers/CircularReveal.kt index 9675c54a20..3f9ea0040e 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/modifiers/CircularReveal.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/modifiers/CircularReveal.kt @@ -78,10 +78,11 @@ fun Modifier.circularReveal( val path = Path() val center = revealFrom.mapTo(size) val radius = calculateRadius(revealFrom, size) - val scrimColor = if (showScrim) + val scrimColor = if (showScrim) { Color.Gray - else + } else { Color.Transparent + } path.addOval(Rect(center, radius * transitionProgress.value)) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt index a7fba965dc..e489419e8c 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/preview/ElementPreview.kt @@ -18,8 +18,8 @@ package io.element.android.libraries.designsystem.preview import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.runtime.Composable -import io.element.android.libraries.designsystem.theme.components.Surface import io.element.android.compound.theme.ElementTheme +import io.element.android.libraries.designsystem.theme.components.Surface @Composable @Suppress("ModifierMissing") diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/HorizontalRuler.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/HorizontalRuler.kt index f5636aaf10..545abd4291 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/HorizontalRuler.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/HorizontalRuler.kt @@ -26,8 +26,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight /** * Horizontal ruler is a debug composable that displays a horizontal ruler. diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/VerticalRuler.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/VerticalRuler.kt index 057cb543b3..7d1f879e74 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/VerticalRuler.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/VerticalRuler.kt @@ -26,8 +26,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight /** * Vertical ruler is a debug composable that displays a vertical ruler. diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/WithRulers.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/WithRulers.kt index fd8f6ba37a..c24b34271f 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/WithRulers.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/ruler/WithRulers.kt @@ -21,8 +21,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.layout.Layout import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -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.theme.components.ButtonSize import io.element.android.libraries.designsystem.theme.components.OutlinedButton diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/text/DpScale.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/text/DpScale.kt index a593e81f7b..9db1255df3 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/text/DpScale.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/text/DpScale.kt @@ -25,10 +25,10 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.WithFontScale import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme /** * Return the maximum value between the receiver value and the value with fontScale applied. diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt index d81484d512..938cbf03c6 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/ColorAliases.kt @@ -109,7 +109,7 @@ val SemanticColors.pinDigitBg } val SemanticColors.currentUserMentionPillText - get() = if (isLight) { + get() = if (isLight) { // We want LightDesignTokens.colorGreen1100 Color(0xff005c45) } else { @@ -118,7 +118,7 @@ val SemanticColors.currentUserMentionPillText } val SemanticColors.currentUserMentionPillBackground - get() = if (isLight) { + get() = if (isLight) { // We want LightDesignTokens.colorGreenAlpha400 Color(0x3b07b661) } else { @@ -130,7 +130,7 @@ val SemanticColors.mentionPillText get() = textPrimary val SemanticColors.mentionPillBackground - get() = if (isLight) { + get() = if (isLight) { // We want LightDesignTokens.colorGray400 Color(0x1f052e61) } else { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/AlertDialogContent.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/AlertDialogContent.kt index 70a906f758..8ea42eef88 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/AlertDialogContent.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/AlertDialogContent.kt @@ -232,10 +232,11 @@ internal fun AlertDialogContent( // Align the title to the center when an icon is present. Modifier .then( - if (applyPaddingToContents) + if (applyPaddingToContents) { Modifier - else + } else { Modifier.padding(DialogContentDefaults.externalHorizontalPadding) + } ) .padding(DialogContentDefaults.titlePadding) .align( @@ -364,8 +365,10 @@ private fun AlertDialogFlowRow( val mainAxisPositions = IntArray(childrenMainAxisSizes.size) { 0 } with(arrangement) { arrange( - mainAxisLayoutSize, childrenMainAxisSizes, - layoutDirection, mainAxisPositions + mainAxisLayoutSize, + childrenMainAxisSizes, + layoutDirection, + mainAxisPositions ) } placeables.forEachIndexed { j, placeable -> @@ -444,7 +447,8 @@ internal fun DialogWithTitleIconAndOkButtonPreview() { ) }, title = "Dialog Title", - content = "A dialog is a type of modal window that appears in front of app content to provide critical information, or prompt for a decision to be made. Learn more", + content = "A dialog is a type of modal window that appears in front of app content to provide critical information," + + " or prompt for a decision to be made. Learn more", submitText = "OK", onSubmitClicked = {}, ) @@ -460,7 +464,8 @@ internal fun DialogWithTitleAndOkButtonPreview() { DialogPreview { SimpleAlertDialogContent( title = "Dialog Title", - content = "A dialog is a type of modal window that appears in front of app content to provide critical information, or prompt for a decision to be made. Learn more", + content = "A dialog is a type of modal window that appears in front of app content to provide critical information," + + " or prompt for a decision to be made. Learn more", submitText = "OK", onSubmitClicked = {}, ) @@ -475,7 +480,8 @@ internal fun DialogWithOnlyMessageAndOkButtonPreview() { ElementThemedPreview(showBackground = false) { DialogPreview { SimpleAlertDialogContent( - content = "A dialog is a type of modal window that appears in front of app content to provide critical information, or prompt for a decision to be made. Learn more", + content = "A dialog is a type of modal window that appears in front of app content to provide critical information," + + " or prompt for a decision to be made. Learn more", submitText = "OK", onSubmitClicked = {}, ) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BottomSheetDragHandle.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BottomSheetDragHandle.kt index da1bf0e4fe..ae331e7ba1 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BottomSheetDragHandle.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/BottomSheetDragHandle.kt @@ -33,9 +33,9 @@ import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.compound.theme.ElementTheme @Composable fun BottomSheetDragHandle( @@ -68,7 +68,6 @@ fun BottomSheetDragHandle( } } - @PreviewsDayNight @Composable internal fun BottomSheetDragHandlePreview() = ElementPreview { diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt index fe0d807745..d80c32510a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Button.kt @@ -147,25 +147,29 @@ private fun ButtonInternal( val contentPadding = when (size) { ButtonSize.Medium -> when (style) { ButtonStyle.Filled, - ButtonStyle.Outlined -> if (hasStartDrawable) + ButtonStyle.Outlined -> if (hasStartDrawable) { PaddingValues(start = 16.dp, top = 10.dp, end = 24.dp, bottom = 10.dp) - else + } else { PaddingValues(start = 24.dp, top = 10.dp, end = 24.dp, bottom = 10.dp) - ButtonStyle.Text -> if (hasStartDrawable) + } + ButtonStyle.Text -> if (hasStartDrawable) { PaddingValues(start = 12.dp, top = 10.dp, end = 16.dp, bottom = 10.dp) - else + } else { PaddingValues(start = 12.dp, top = 10.dp, end = 12.dp, bottom = 10.dp) + } } ButtonSize.Large -> when (style) { ButtonStyle.Filled, - ButtonStyle.Outlined -> if (hasStartDrawable) + ButtonStyle.Outlined -> if (hasStartDrawable) { PaddingValues(start = 24.dp, top = 13.dp, end = 32.dp, bottom = 13.dp) - else + } else { PaddingValues(start = 32.dp, top = 13.dp, end = 32.dp, bottom = 13.dp) - ButtonStyle.Text -> if (hasStartDrawable) + } + ButtonStyle.Text -> if (hasStartDrawable) { PaddingValues(start = 12.dp, top = 13.dp, end = 16.dp, bottom = 13.dp) - else + } else { PaddingValues(start = 16.dp, top = 13.dp, end = 16.dp, bottom = 13.dp) + } } } @@ -179,12 +183,13 @@ private fun ButtonInternal( ButtonStyle.Filled -> null ButtonStyle.Outlined -> BorderStroke( width = 1.dp, - color = if (destructive) + color = if (destructive) { ElementTheme.colors.borderCriticalPrimary.copy( alpha = if (enabled) 1f else 0.5f ) - else + } else { ElementTheme.colors.borderInteractiveSecondary + } ) ButtonStyle.Text -> null } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt index 95cf0b412e..500f1c8767 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Checkbox.kt @@ -31,9 +31,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.state.ToggleableState import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup -import io.element.android.compound.theme.ElementTheme // Designs in https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&mode=design&t=qb99xBP5mwwCtGkN-1 diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt index 5c869db9eb..c4b42dc32c 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/CircularProgressIndicator.kt @@ -75,8 +75,7 @@ internal fun CircularProgressIndicatorPreview() = ElementThemedPreview(vertical private fun ContentToPreview() { Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { // Indeterminate progress - CircularProgressIndicator( - ) + CircularProgressIndicator() // Fixed progress CircularProgressIndicator( progress = { 0.90F } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt index 6d081da298..6a482bd257 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/LinearProgressIndicator.kt @@ -80,8 +80,7 @@ internal fun LinearProgressIndicatorPreview() = ElementThemedPreview(vertical = private fun ContentToPreview() { Column(verticalArrangement = Arrangement.spacedBy(4.dp)) { // Indeterminate progress - LinearProgressIndicator( - ) + LinearProgressIndicator() // Fixed progress LinearProgressIndicator( progress = { 0.90F } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListItem.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListItem.kt index ebb8358321..b90d147983 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListItem.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListItem.kt @@ -119,9 +119,13 @@ fun ListItem( androidx.compose.material3.ListItem( headlineContent = decoratedHeadlineContent, - modifier = if (onClick != null) Modifier - .clickable(enabled = enabled, onClick = onClick) - .then(modifier) else modifier, + modifier = if (onClick != null) { + Modifier + .clickable(enabled = enabled, onClick = onClick) + .then(modifier) + } else { + modifier + }, overlineContent = null, supportingContent = decoratedSupportingContent, leadingContent = decoratedLeadingContent, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListSectionHeader.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListSectionHeader.kt index 4ad6a3c48d..b50d0c985e 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListSectionHeader.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ListSectionHeader.kt @@ -27,9 +27,9 @@ import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup -import io.element.android.compound.theme.ElementTheme // Designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=425%3A24208&mode=design&t=G5hCfkLB6GgXDuWe-1 diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt index 234a0e0b60..08624dab3a 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheet.kt @@ -34,11 +34,11 @@ import androidx.compose.ui.graphics.Shape import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.PreviewGroup import io.element.android.libraries.designsystem.preview.sheetStateForPreview -import io.element.android.compound.theme.ElementTheme import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt index 30e5882f26..029efe473d 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/ModalBottomSheetLayout.kt @@ -117,9 +117,12 @@ private fun ContentToPreview() { displayHandle = true, sheetState = ModalBottomSheetState(ModalBottomSheetValue.Expanded, density = LocalDensity.current), sheetContent = { - Text(text = "Sheet Content", modifier = Modifier - .padding(start = 16.dp, end = 16.dp, bottom = 20.dp) - .background(color = Color.Green)) + Text( + text = "Sheet Content", + modifier = Modifier + .padding(start = 16.dp, end = 16.dp, bottom = 20.dp) + .background(color = Color.Green) + ) } ) { Text(text = "Content", modifier = Modifier.background(color = Color.Red)) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt index 038e74d982..0e5c2a10f6 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/RadioButton.kt @@ -30,9 +30,9 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup -import io.element.android.compound.theme.ElementTheme // Designs in https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=425%3A24202&mode=design&t=qb99xBP5mwwCtGkN-1 diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Switch.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Switch.kt index b11cf433e0..7efb9d52eb 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Switch.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/Switch.kt @@ -32,9 +32,9 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup -import io.element.android.compound.theme.ElementTheme import androidx.compose.material3.Switch as Material3Switch // Designs in https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=425%3A24203&mode=design&t=qb99xBP5mwwCtGkN-1 diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomBottomSheetScaffold.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomBottomSheetScaffold.kt index 22b55c19af..734291ecd9 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomBottomSheetScaffold.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomBottomSheetScaffold.kt @@ -498,10 +498,10 @@ internal fun rememberSheetState( initialValue: SheetValue = SheetValue.Hidden, skipHiddenState: Boolean = false, ): CustomSheetState { - val density = LocalDensity.current return rememberSaveable( - skipPartiallyExpanded, confirmValueChange, + skipPartiallyExpanded, + confirmValueChange, saver = CustomSheetState.Saver( skipPartiallyExpanded = skipPartiallyExpanded, confirmValueChange = confirmValueChange, diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomSheetState.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomSheetState.kt index 9a2ff713db..080681c0d8 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomSheetState.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/bottomsheet/CustomSheetState.kt @@ -35,15 +35,17 @@ import kotlinx.coroutines.CancellationException @OptIn(ExperimentalFoundationApi::class) @Stable @ExperimentalMaterial3Api -class CustomSheetState @Deprecated( +class CustomSheetState +@Deprecated( message = "This constructor is deprecated. " + - "Please use the constructor that provides a [Density]", + "Please use the constructor that provides a [Density]", replaceWith = ReplaceWith( "SheetState(" + - "skipPartiallyExpanded, LocalDensity.current, initialValue, " + - "confirmValueChange, skipHiddenState)" + "skipPartiallyExpanded, LocalDensity.current, initialValue, " + + "confirmValueChange, skipHiddenState)" ) -) constructor( +) +constructor( internal val skipPartiallyExpanded: Boolean, initialValue: SheetValue = Hidden, confirmValueChange: (SheetValue) -> Boolean = { true }, @@ -77,11 +79,12 @@ class CustomSheetState @Deprecated( ) : this(skipPartiallyExpanded, initialValue, confirmValueChange, skipHiddenState) { this.density = density } + init { if (skipPartiallyExpanded) { require(initialValue != PartiallyExpanded) { "The initial value must not be set to PartiallyExpanded if skipPartiallyExpanded " + - "is set to true." + "is set to true." } } if (skipHiddenState) { @@ -168,7 +171,7 @@ class CustomSheetState @Deprecated( suspend fun partialExpand() { check(!skipPartiallyExpanded) { "Attempted to animate to partial expanded when skipPartiallyExpanded was enabled. Set" + - " skipPartiallyExpanded to false to use this function." + " skipPartiallyExpanded to false to use this function." } animateTo(PartiallyExpanded) } @@ -194,7 +197,7 @@ class CustomSheetState @Deprecated( suspend fun hide() { check(!skipHiddenState) { "Attempted to animate to hidden when skipHiddenState was enabled. Set skipHiddenState" + - " to false to use this function." + " to false to use this function." } animateTo(Hidden) } @@ -254,7 +257,7 @@ class CustomSheetState @Deprecated( internal var density: Density? = null private fun requireDensity() = requireNotNull(density) { "SheetState did not have a density attached. Are you using SheetState with " + - "BottomSheetScaffold or ModalBottomSheet component?" + "BottomSheetScaffold or ModalBottomSheet component?" } companion object { @@ -278,7 +281,7 @@ class CustomSheetState @Deprecated( */ @Deprecated( message = "This function is deprecated. Please use the overload where Density is" + - " provided.", + " provided.", replaceWith = ReplaceWith( "Saver(skipPartiallyExpanded, confirmValueChange, LocalDensity.current)" ) @@ -290,7 +293,7 @@ class CustomSheetState @Deprecated( ) = Saver( save = { it.currentValue }, restore = { savedValue -> - CustomSheetState(skipPartiallyExpanded, savedValue, confirmValueChange) + CustomSheetState(skipPartiallyExpanded, savedValue, confirmValueChange) } ) } diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt index 1b2bfd2188..9f8c02cc12 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt @@ -23,10 +23,10 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.rememberDatePickerState import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview -import io.element.android.libraries.designsystem.theme.components.AlertDialogContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.PreviewGroup +import io.element.android.libraries.designsystem.theme.components.AlertDialogContent @Preview(group = PreviewGroup.DateTimePickers) @Composable diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/TimePickerPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/TimePickerPreview.kt index 9e56a38137..94e596c360 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/TimePickerPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/TimePickerPreview.kt @@ -24,11 +24,11 @@ import androidx.compose.material3.TimePickerLayoutType import androidx.compose.material3.rememberTimePickerState import androidx.compose.runtime.Composable import androidx.compose.ui.tooling.preview.Preview -import io.element.android.libraries.designsystem.theme.components.AlertDialogContent import io.element.android.libraries.designsystem.preview.ElementPreviewDark import io.element.android.libraries.designsystem.preview.ElementPreviewLight import io.element.android.libraries.designsystem.preview.ElementThemedPreview import io.element.android.libraries.designsystem.preview.PreviewGroup +import io.element.android.libraries.designsystem.theme.components.AlertDialogContent @OptIn(ExperimentalMaterial3Api::class) @Preview(widthDp = 600, group = PreviewGroup.DateTimePickers) diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/CommonResources.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/CommonDrawables.kt similarity index 100% rename from libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/CommonResources.kt rename to libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/CommonDrawables.kt diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarHost.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarHost.kt index a327d2f651..2eb4dda75d 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarHost.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarHost.kt @@ -38,7 +38,9 @@ fun SnackbarHost(hostState: SnackbarHostState, modifier: Modifier = Modifier) { IconSource.Vector(CompoundIcons.Close), data::dismiss ) - } else null, + } else { + null + }, ) } } diff --git a/libraries/designsystem/src/test/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarDispatcherTests.kt b/libraries/designsystem/src/test/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarDispatcherTests.kt index fbccaa4e75..65418141c5 100644 --- a/libraries/designsystem/src/test/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarDispatcherTests.kt +++ b/libraries/designsystem/src/test/kotlin/io/element/android/libraries/designsystem/utils/snackbar/SnackbarDispatcherTests.kt @@ -87,5 +87,4 @@ class SnackbarDispatcherTests { assertThat(awaitItem()).isNull() } } - } 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 6119fa00d9..78228f1d84 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 @@ -72,43 +72,43 @@ class DefaultRoomLastMessageFormatter @Inject constructor( 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 StickerContent -> { + content.body + } + is UnableToDecryptContent -> { + val message = sp.getString(CommonStrings.common_waiting_for_decryption_key) + if (!isDmRoom) { + prefix(message, senderDisplayName) + } else { + message } - 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) + } + 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/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/FeatureFlagProvider.kt b/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/FeatureFlagProvider.kt index e40d59ec5b..5fe716caa3 100644 --- a/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/FeatureFlagProvider.kt +++ b/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/FeatureFlagProvider.kt @@ -28,4 +28,3 @@ interface FeatureFlagProvider { const val LOW_PRIORITY = 0 const val MEDIUM_PRIORITY = 1 const val HIGH_PRIORITY = 2 - diff --git a/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/di/FeatureFlagModule.kt b/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/di/FeatureFlagModule.kt index b2f0a4106d..42f3dc9f63 100644 --- a/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/di/FeatureFlagModule.kt +++ b/libraries/featureflag/impl/src/main/kotlin/io/element/android/libraries/featureflag/impl/di/FeatureFlagModule.kt @@ -22,9 +22,9 @@ import dagger.Provides import dagger.multibindings.ElementsIntoSet import io.element.android.libraries.core.meta.BuildType import io.element.android.libraries.di.AppScope -import io.element.android.libraries.featureflag.impl.StaticFeatureFlagProvider import io.element.android.libraries.featureflag.impl.FeatureFlagProvider import io.element.android.libraries.featureflag.impl.PreferencesFeatureFlagProvider +import io.element.android.libraries.featureflag.impl.StaticFeatureFlagProvider @Module @ContributesTo(AppScope::class) diff --git a/libraries/featureflag/ui/src/main/kotlin/io/element/android/libraries/featureflag/ui/FeatureListView.kt b/libraries/featureflag/ui/src/main/kotlin/io/element/android/libraries/featureflag/ui/FeatureListView.kt index 6bf4467de8..a0e298db26 100644 --- a/libraries/featureflag/ui/src/main/kotlin/io/element/android/libraries/featureflag/ui/FeatureListView.kt +++ b/libraries/featureflag/ui/src/main/kotlin/io/element/android/libraries/featureflag/ui/FeatureListView.kt @@ -20,8 +20,8 @@ import androidx.compose.foundation.layout.Column import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import io.element.android.libraries.designsystem.components.preferences.PreferenceCheckbox -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.featureflag.ui.model.FeatureUiModel import io.element.android.libraries.featureflag.ui.model.aFeatureUiModelList import kotlinx.collections.immutable.ImmutableList diff --git a/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapUpdater.kt b/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapUpdater.kt index e4e3565f22..aad4701a2c 100644 --- a/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapUpdater.kt +++ b/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapUpdater.kt @@ -16,6 +16,7 @@ * limitations under the License. */ @file:Suppress("MatchingDeclarationName") + package io.element.android.libraries.maplibre.compose import android.annotation.SuppressLint diff --git a/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt b/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt index 5af79e7524..4fab4b506f 100644 --- a/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt +++ b/libraries/maplibre-compose/src/main/kotlin/io/element/android/libraries/maplibre/compose/MapboxMap.kt @@ -24,7 +24,7 @@ import android.content.res.Configuration import android.os.Bundle import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box -import androidx.compose.material.Text +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.runtime.Composition import androidx.compose.runtime.CompositionContext @@ -81,7 +81,10 @@ public fun MapboxMap( uiSettings: MapUiSettings = DefaultMapUiSettings, symbolManagerSettings: MapSymbolManagerSettings = DefaultMapSymbolManagerSettings, locationSettings: MapLocationSettings = DefaultMapLocationSettings, - content: (@Composable @MapboxMapComposable () -> Unit)? = null, + content: ( + @Composable @MapboxMapComposable + () -> Unit + )? = null, ) { // When in preview, early return a Box with the received modifier preserving layout if (LocalInspectionMode.current) { @@ -158,7 +161,8 @@ private suspend inline fun CompositionContext.newComposition( val style = map.awaitStyle(context, styleUri, images) val symbolManager = SymbolManager(mapView, map, style) return Composition( - MapApplier(map, style, symbolManager), this + MapApplier(map, style, symbolManager), + this ).apply { setContent(content) } @@ -234,7 +238,7 @@ private fun MapView.lifecycleObserver(previousState: MutableState this.onPause() Lifecycle.Event.ON_STOP -> this.onStop() Lifecycle.Event.ON_DESTROY -> { - //handled in onDispose + // handled in onDispose } Lifecycle.Event.ON_ANY -> error("ON_ANY should never be used") } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/auth/MatrixHomeServerDetails.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/auth/MatrixHomeServerDetails.kt index f5fc38eb16..f360c12096 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/auth/MatrixHomeServerDetails.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/auth/MatrixHomeServerDetails.kt @@ -24,4 +24,4 @@ data class MatrixHomeServerDetails( val url: String, val supportsPasswordLogin: Boolean, val supportsOidcLogin: Boolean, -): Parcelable +) : Parcelable diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/SpaceId.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/SpaceId.kt index 89901b7350..2ccc7dacba 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/SpaceId.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/SpaceId.kt @@ -25,8 +25,8 @@ value class SpaceId(val value: String) : Serializable { if (BuildConfig.DEBUG && !MatrixPatterns.isSpaceId(value)) { error( "`$value` is not a valid space id.\n" + - "Space ids are the same as room ids.\n" + - "Example space id: `!space_id:domain`." + "Space ids are the same as room ids.\n" + + "Example space id: `!space_id:domain`." ) } } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/ThreadId.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/ThreadId.kt index b6ec9766f4..83212b8d53 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/ThreadId.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/core/ThreadId.kt @@ -25,8 +25,8 @@ value class ThreadId(val value: String) : Serializable { if (BuildConfig.DEBUG && !MatrixPatterns.isThreadId(value)) { error( "`$value` is not a valid thread id.\n" + - "Thread ids are the same as event ids.\n" + - "Example thread id: `\$Rqnc-F-dvnEYJTyHq_iKxU2bZ1CI92-kuZq3a5lr5Zg`." + "Thread ids are the same as event ids.\n" + + "Example thread id: `\$Rqnc-F-dvnEYJTyHq_iKxU2bZ1CI92-kuZq3a5lr5Zg`." ) } } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/encryption/BackupState.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/encryption/BackupState.kt index 03f650e316..ba023d8a12 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/encryption/BackupState.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/encryption/BackupState.kt @@ -31,5 +31,5 @@ enum class BackupState { RESUMING, ENABLED, DOWNLOADING, - DISABLING; + DISABLING } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notificationsettings/NotificationSettingsService.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notificationsettings/NotificationSettingsService.kt index f1fe18d6e6..2a6cb42e33 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notificationsettings/NotificationSettingsService.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/notificationsettings/NotificationSettingsService.kt @@ -26,7 +26,7 @@ interface NotificationSettingsService { /** * State of the current room notification settings flow ([MatrixRoomNotificationSettingsState.Unknown] if not started). */ - val notificationSettingsChangeFlow : SharedFlow + val notificationSettingsChangeFlow: SharedFlow suspend fun getRoomNotificationSettings(roomId: RoomId, isEncrypted: Boolean, isOneToOne: Boolean): Result suspend fun getDefaultRoomNotificationMode(isEncrypted: Boolean, isOneToOne: Boolean): Result suspend fun setDefaultRoomNotificationMode(isEncrypted: Boolean, mode: RoomNotificationMode, isOneToOne: Boolean): Result diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParser.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParser.kt index dcd5221de8..67828ecb56 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParser.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParser.kt @@ -130,7 +130,9 @@ object PermalinkParser { val splitNameValue = it.split("=") if (splitNameValue.size == 2) { Pair(splitNameValue[0], URLDecoder.decode(splitNameValue[1], "UTF-8")) - } else null + } else { + null + } } private fun String.getViaParameters(): List { diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoomMembersState.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoomMembersState.kt index 9a25aaa12e..759b0f46cb 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoomMembersState.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoomMembersState.kt @@ -35,5 +35,3 @@ fun MatrixRoomMembersState.roomMembers(): List? { else -> null } } - - diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/Mention.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/Mention.kt index 6a1b1f60ef..47fd900a8f 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/Mention.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/Mention.kt @@ -20,7 +20,7 @@ import io.element.android.libraries.matrix.api.core.RoomId import io.element.android.libraries.matrix.api.core.UserId sealed interface Mention { - data class User(val userId: UserId): Mention - data object AtRoom: Mention - data class Room(val roomId: RoomId?, val roomAlias: String?): Mention + data class User(val userId: UserId) : Mention + data object AtRoom : Mention + data class Room(val roomId: RoomId?, val roomAlias: String?) : Mention } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt index 3cfacf4a23..487623970e 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/StateEventType.kt @@ -38,5 +38,5 @@ enum class StateEventType { ROOM_TOMBSTONE, ROOM_TOPIC, SPACE_CHILD, - SPACE_PARENT; + SPACE_PARENT } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/powerlevels/MatrixRoomPowerLevels.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/powerlevels/MatrixRoomPowerLevels.kt index e0ba452efe..3a89f61d9d 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/powerlevels/MatrixRoomPowerLevels.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/powerlevels/MatrixRoomPowerLevels.kt @@ -39,4 +39,3 @@ suspend fun MatrixRoom.canSendMessage(type: MessageEventType): Result = * Shortcut for calling [MatrixRoom.canUserRedact] with our own user. */ suspend fun MatrixRoom.canRedact(): Result = canUserRedact(sessionId) - diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimelineItem.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimelineItem.kt index ae4e07a8f4..b677332e5f 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimelineItem.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimelineItem.kt @@ -30,4 +30,3 @@ sealed interface MatrixTimelineItem { data class Virtual(val uniqueId: String, val virtual: VirtualTimelineItem) : MatrixTimelineItem data object Other : MatrixTimelineItem } - diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/ReceiptType.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/ReceiptType.kt index 7f02285b7e..3cf556dc5a 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/ReceiptType.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/ReceiptType.kt @@ -19,5 +19,5 @@ package io.element.android.libraries.matrix.api.timeline enum class ReceiptType { READ, READ_PRIVATE, - FULLY_READ; + FULLY_READ } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventType.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventType.kt index 8141528f34..67b57b6a07 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventType.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/EventType.kt @@ -88,12 +88,12 @@ object EventType { fun isCallEvent(type: String): Boolean { return type == CALL_INVITE || - type == CALL_CANDIDATES || - type == CALL_ANSWER || - type == CALL_HANGUP || - type == CALL_SELECT_ANSWER || - type == CALL_NEGOTIATE || - type == CALL_REJECT || - type == CALL_REPLACES + type == CALL_CANDIDATES || + type == CALL_ANSWER || + type == CALL_HANGUP || + type == CALL_SELECT_ANSWER || + type == CALL_NEGOTIATE || + type == CALL_REJECT || + type == CALL_REPLACES } } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MembershipChange.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MembershipChange.kt index 8aa8845f23..6159391928 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MembershipChange.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/MembershipChange.kt @@ -33,5 +33,5 @@ enum class MembershipChange { KNOCK_ACCEPTED, KNOCK_RETRACTED, KNOCK_DENIED, - NOT_IMPLEMENTED; + NOT_IMPLEMENTED } diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/ReactionSender.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/ReactionSender.kt index 60398cffd5..7d26e0257b 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/ReactionSender.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/ReactionSender.kt @@ -28,4 +28,3 @@ data class ReactionSender( val senderId: UserId, val timestamp: Long ) - diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/TimelineItemEventOrigin.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/TimelineItemEventOrigin.kt index 0f906e6719..dd0674afb0 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/TimelineItemEventOrigin.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/item/event/TimelineItemEventOrigin.kt @@ -17,5 +17,5 @@ package io.element.android.libraries.matrix.api.timeline.item.event enum class TimelineItemEventOrigin { - LOCAL, SYNC, PAGINATION; + LOCAL, SYNC, PAGINATION } diff --git a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/auth/AuthErrorCodeTest.kt b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/auth/AuthErrorCodeTest.kt index 5f987ad725..5b7b5cb499 100644 --- a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/auth/AuthErrorCodeTest.kt +++ b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/auth/AuthErrorCodeTest.kt @@ -44,5 +44,4 @@ class AuthErrorCodeTest { val error = AuthenticationException.Generic("Some other error") assertThat(error.errorCode).isEqualTo(AuthErrorCode.UNKNOWN) } - } diff --git a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/MatrixToConverterTest.kt b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/MatrixToConverterTest.kt index d3d928c189..908abebe8b 100644 --- a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/MatrixToConverterTest.kt +++ b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/MatrixToConverterTest.kt @@ -54,5 +54,4 @@ class MatrixToConverterTest { val url = Uri.parse("https://element.io/") assertThat(MatrixToConverter.convert(url)).isNull() } - } diff --git a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkDataTest.kt b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkDataTest.kt index 08955411d8..88c4b2e583 100644 --- a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkDataTest.kt +++ b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkDataTest.kt @@ -25,10 +25,10 @@ class PermalinkDataTest { @Test fun `getRoomId() returns value when isRoomAlias is false`() { val permalinkData = PermalinkData.RoomLink( - roomIdOrAlias = "!abcdef123456:matrix.org", - isRoomAlias = false, - eventId = null, - viaParameters = persistentListOf(), + roomIdOrAlias = "!abcdef123456:matrix.org", + isRoomAlias = false, + eventId = null, + viaParameters = persistentListOf(), ) assertThat(permalinkData.getRoomId()).isNotNull() assertThat(permalinkData.getRoomAlias()).isNull() @@ -45,5 +45,4 @@ class PermalinkDataTest { assertThat(permalinkData.getRoomId()).isNull() assertThat(permalinkData.getRoomAlias()).isNotNull() } - } diff --git a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParserTest.kt b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParserTest.kt index 590be150c4..2c5592fee3 100644 --- a/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParserTest.kt +++ b/libraries/matrix/api/src/test/kotlin/io/element/android/libraries/matrix/api/permalink/PermalinkParserTest.kt @@ -53,9 +53,9 @@ class PermalinkParserTest { fun `parsing a valid user url returns a user link`() { val url = "https://app.element.io/#/user/@test:matrix.org" assertThat(PermalinkParser.parse(url)).isEqualTo( - PermalinkData.UserLink( - userId = "@test:matrix.org" - ) + PermalinkData.UserLink( + userId = "@test:matrix.org" + ) ) } @@ -115,12 +115,12 @@ class PermalinkParserTest { fun `parsing a valid room alias url returns a room link`() { val url = "https://app.element.io/#/room/#element-android:matrix.org" assertThat(PermalinkParser.parse(url)).isEqualTo( - PermalinkData.RoomLink( - roomIdOrAlias = "#element-android:matrix.org", - isRoomAlias = true, - eventId = null, - viaParameters = persistentListOf(), - ) + PermalinkData.RoomLink( + roomIdOrAlias = "#element-android:matrix.org", + isRoomAlias = true, + eventId = null, + viaParameters = persistentListOf(), + ) ) } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt index f7c157d2ba..985e0e9eae 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt @@ -105,7 +105,7 @@ class RustMatrixClient( override val sessionId: UserId = UserId(client.userId()) private val innerRoomListService = syncService.roomListService() private val sessionDispatcher = dispatchers.io.limitedParallelism(64) - private val sessionCoroutineScope = appCoroutineScope.childScope(dispatchers.main, "Session-${sessionId}") + private val sessionCoroutineScope = appCoroutineScope.childScope(dispatchers.main, "Session-$sessionId") private val rustSyncService = RustSyncService(syncService, sessionCoroutineScope) private val verificationService = RustSessionVerificationService(rustSyncService, sessionCoroutineScope) private val pushersService = RustPushersService( @@ -137,7 +137,7 @@ class RustMatrixClient( Timber.w("didReceiveAuthError(isSoftLogout=$isSoftLogout)") if (isLoggingOut.getAndSet(true).not()) { Timber.v("didReceiveAuthError -> do the cleanup") - //TODO handle isSoftLogout parameter. + // TODO handle isSoftLogout parameter. appCoroutineScope.launch { val existingData = sessionStore.getSession(client.userId()) if (existingData != null) { @@ -204,7 +204,7 @@ class RustMatrixClient( // Check if already in memory... var cachedPairOfRoom = pairOfRoom(roomId) if (cachedPairOfRoom == null) { - //... otherwise, lets wait for the SS to load all rooms and check again. + // ... otherwise, lets wait for the SS to load all rooms and check again. roomListService.allRooms.awaitLoaded() cachedPairOfRoom = pairOfRoom(roomId) } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/media/MediaUploadHandlerImpl.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/media/MediaUploadHandlerImpl.kt index 639f9149c4..5241c920ab 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/media/MediaUploadHandlerImpl.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/media/MediaUploadHandlerImpl.kt @@ -29,7 +29,7 @@ class MediaUploadHandlerImpl( runCatching { sendAttachmentJoinHandle.join() } - .also { cleanUpFiles() } + .also { cleanUpFiles() } override fun cancel() { sendAttachmentJoinHandle.cancel() diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/MatrixRoomInfoMapper.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/MatrixRoomInfoMapper.kt index 3ea1895e22..a857e8f6dd 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/MatrixRoomInfoMapper.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/MatrixRoomInfoMapper.kt @@ -43,7 +43,7 @@ class MatrixRoomInfoMapper( canonicalAlias = it.canonicalAlias, alternativeAliases = it.alternativeAliases.toImmutableList(), currentUserMembership = it.membership.map(), - latestEvent = it.latestEvent?.use (timelineItemMapper::map), + latestEvent = it.latestEvent?.use(timelineItemMapper::map), inviter = it.inviter?.use(RoomMemberMapper::map), activeMembersCount = it.activeMembersCount.toLong(), invitedMembersCount = it.invitedMembersCount.toLong(), @@ -57,13 +57,13 @@ class MatrixRoomInfoMapper( } } -fun RustMembership.map(): CurrentUserMembership = when(this) { +fun RustMembership.map(): CurrentUserMembership = when (this) { RustMembership.INVITED -> CurrentUserMembership.INVITED RustMembership.JOINED -> CurrentUserMembership.JOINED RustMembership.LEFT -> CurrentUserMembership.LEFT } -fun RustRoomNotificationMode.map(): RoomNotificationMode = when(this) { +fun RustRoomNotificationMode.map(): RoomNotificationMode = when (this) { RustRoomNotificationMode.ALL_MESSAGES -> RoomNotificationMode.ALL_MESSAGES RustRoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY -> RoomNotificationMode.MENTIONS_AND_KEYWORDS_ONLY RustRoomNotificationMode.MUTE -> RoomNotificationMode.MUTE diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustMatrixRoom.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustMatrixRoom.kt index fc7215f583..66f7654ab2 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustMatrixRoom.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/room/RustMatrixRoom.kt @@ -122,7 +122,7 @@ class RustMatrixRoom( // Create a dispatcher for all room methods... private val roomDispatcher = coroutineDispatchers.io.limitedParallelism(32) - //...except getMember methods as it could quickly fill the roomDispatcher... + // ...except getMember methods as it could quickly fill the roomDispatcher... private val roomMembersDispatcher = coroutineDispatchers.io.limitedParallelism(8) private val roomCoroutineScope = sessionCoroutineScope.childScope(coroutineDispatchers.main, "RoomScope-$roomId") diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactory.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactory.kt index 17bff4f5b7..17c3e214ed 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactory.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomListFactory.kt @@ -135,4 +135,3 @@ private fun DynamicRoomList.Filter.toRustFilter(): RoomListEntriesDynamicFilterK DynamicRoomList.Filter.AllNonLeft -> RoomListEntriesDynamicFilterKind.AllNonLeft } } - diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt index 41c8ad40dd..ac25883ea8 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt @@ -45,4 +45,3 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto ) } } - diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt index 547ccf1377..b7723c08f9 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt @@ -257,7 +257,7 @@ class RustMatrixTimeline( private fun List.hasEncryptionHistoryBanner(): Boolean { val firstItem = firstOrNull() - return firstItem is MatrixTimelineItem.Virtual - && firstItem.virtual is VirtualTimelineItem.EncryptedHistoryBanner + return firstItem is MatrixTimelineItem.Virtual && + firstItem.virtual is VirtualTimelineItem.EncryptedHistoryBanner } } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt index 4e965fc4ef..755126df60 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventTimelineItemMapper.kt @@ -100,11 +100,11 @@ private fun List?.map(): ImmutableList { private fun Map.map(): ImmutableList { return map { - Receipt( - userId = UserId(it.key), - timestamp = it.value.timestamp?.toLong() ?: 0 - ) - } + Receipt( + userId = UserId(it.key), + timestamp = it.value.timestamp?.toLong() ?: 0 + ) + } .sortedByDescending { it.timestamp } .toImmutableList() } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt index ee28b18d08..0c5ec47175 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/TimelineEventContentMapper.kt @@ -147,7 +147,7 @@ private fun RustMembershipChange.map(): MembershipChange { } } -//TODO extract state events? +// TODO extract state events? private fun RustOtherState.map(): OtherState { return when (this) { is RustOtherState.Custom -> OtherState.Custom(eventType) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/tracing/LogEventLocation.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/tracing/LogEventLocation.kt index 712735649c..5d10006225 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/tracing/LogEventLocation.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/tracing/LogEventLocation.kt @@ -37,4 +37,3 @@ data class LogEventLocation( } } } - diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/RustWidgetDriver.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/RustWidgetDriver.kt index 641be4c618..fd950ae670 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/RustWidgetDriver.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/widget/RustWidgetDriver.kt @@ -34,7 +34,7 @@ class RustWidgetDriver( widgetSettings: MatrixWidgetSettings, private val room: Room, private val widgetCapabilitiesProvider: WidgetCapabilitiesProvider, -): MatrixWidgetDriver { +) : MatrixWidgetDriver { // It's important to have extra capacity here to make sure we don't drop any messages override val incomingMessages = MutableSharedFlow(extraBufferCapacity = 10) diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/auth/AuthenticationExceptionMappingTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/auth/AuthenticationExceptionMappingTest.kt index b0c02c9dcd..e1d3f1a492 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/auth/AuthenticationExceptionMappingTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/auth/AuthenticationExceptionMappingTest.kt @@ -41,12 +41,12 @@ class AuthenticationExceptionMappingTest { @Test fun `mapping specific exceptions map to their kotlin counterparts`() { assertThat(RustAuthenticationException.ClientMissing("Client missing").mapAuthenticationException()) - .isException("Client missing") + .isException("Client missing") assertThat(RustAuthenticationException.Generic("Generic").mapAuthenticationException()).isException("Generic") assertThat(RustAuthenticationException.InvalidServerName("Invalid server name").mapAuthenticationException()) - .isException("Invalid server name") + .isException("Invalid server name") assertThat(RustAuthenticationException.SessionMissing("Session missing").mapAuthenticationException()) .isException("Session missing") diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/roomlist/SimplePagedRoomList.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/roomlist/SimplePagedRoomList.kt index e94002bd1d..c0374ac372 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/roomlist/SimplePagedRoomList.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/roomlist/SimplePagedRoomList.kt @@ -33,7 +33,7 @@ data class SimplePagedRoomList( override val loadedPages = MutableStateFlow(1) override suspend fun loadMore() { - //No-op + // No-op loadedPages.getAndUpdate { it + 1 } } @@ -46,6 +46,6 @@ data class SimplePagedRoomList( } override suspend fun rebuildSummaries() { - //No-op + // No-op } } diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/TimelineFixture.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/TimelineFixture.kt index 0cbbe81eef..d53bc7b18f 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/TimelineFixture.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/TimelineFixture.kt @@ -119,7 +119,9 @@ fun aTimelineItemDebugInfo( originalJson: String? = null, latestEditedJson: String? = null, ) = TimelineItemDebugInfo( - model, originalJson, latestEditedJson + model, + originalJson, + latestEditedJson ) fun aPollContent( diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/AvatarActionBottomSheet.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/AvatarActionBottomSheet.kt index 5ca418073e..fd154928ef 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/AvatarActionBottomSheet.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/AvatarActionBottomSheet.kt @@ -34,6 +34,7 @@ import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.res.stringResource +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.components.list.ListItemContent import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight @@ -43,7 +44,6 @@ import io.element.android.libraries.designsystem.theme.components.ListItemStyle import io.element.android.libraries.designsystem.theme.components.ModalBottomSheetLayout import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.matrix.ui.media.AvatarAction -import io.element.android.compound.theme.ElementTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.coroutines.launch diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt index 8a00be4663..581b70dfb1 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeader.kt @@ -29,15 +29,15 @@ import androidx.compose.ui.draw.clipToBounds import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.components.avatar.Avatar 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.theme.components.Text import io.element.android.libraries.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.ui.model.getAvatarData import io.element.android.libraries.matrix.ui.model.getBestName -import io.element.android.compound.theme.ElementTheme @Composable fun MatrixUserHeader( diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeaderPlaceholder.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeaderPlaceholder.kt index 0df8b027f9..03f0055463 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeaderPlaceholder.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserHeaderPlaceholder.kt @@ -31,12 +31,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.atomic.atoms.PlaceholderAtom 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.theme.placeholderBackground -import io.element.android.compound.theme.ElementTheme @Composable fun MatrixUserHeaderPlaceholder( diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt index 947afd8bbd..5197ca0ebd 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/MatrixUserRow.kt @@ -20,8 +20,8 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.PreviewParameter 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.matrix.api.user.MatrixUser import io.element.android.libraries.matrix.ui.model.getAvatarData import io.element.android.libraries.matrix.ui.model.getBestName diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/UnsavedAvatar.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/UnsavedAvatar.kt index 0303e2eb6c..c67e918e34 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/UnsavedAvatar.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/components/UnsavedAvatar.kt @@ -35,12 +35,12 @@ import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.unit.dp import coil.compose.AsyncImage import coil.request.ImageRequest -import io.element.android.libraries.designsystem.preview.PreviewsDayNight +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview +import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.preview.debugPlaceholderBackground import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial -import io.element.android.compound.theme.ElementTheme /** * An avatar that the user has selected, but which has not yet been uploaded to Matrix. diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestData.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestData.kt index 979d42b826..5fdf6cb422 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestData.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestData.kt @@ -42,4 +42,3 @@ data class MediaRequestData( } } } - diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestDataKeyer.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestDataKeyer.kt index 0064c1b63b..5a7b93ad90 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestDataKeyer.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/media/MediaRequestDataKeyer.kt @@ -34,5 +34,5 @@ internal class MediaRequestDataKeyer : Keyer { private fun MediaRequestData.toKey(): String? { if (source == null) return null - return "${source.url}_${kind}" + return "${source.url}_$kind" } 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 056aa5e8be..b3c6a0bf86 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 @@ -37,17 +37,17 @@ fun FormattedBody.toHtmlDocument(prefix: String? = null): Document? { // 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 { - Jsoup.parse(formattedBody) + val dom = if (prefix != null) { + Jsoup.parse("$prefix $formattedBody") + } else { + Jsoup.parse(formattedBody) + } + + // Prepend `@` to mentions + fixMentions(dom) + + dom } - - // Prepend `@` to mentions - fixMentions(dom) - - dom - } } private fun fixMentions(dom: Document) { diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToPlainText.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToPlainText.kt index f20252c42a..0cea2d7ae2 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToPlainText.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/messages/ToPlainText.kt @@ -17,8 +17,8 @@ package io.element.android.libraries.matrix.ui.messages import io.element.android.libraries.matrix.api.timeline.item.event.FormattedBody -import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import io.element.android.libraries.matrix.api.timeline.item.event.MessageFormat +import io.element.android.libraries.matrix.api.timeline.item.event.TextMessageType import org.jsoup.nodes.Document import org.jsoup.nodes.Element import org.jsoup.nodes.Node diff --git a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/room/MatrixRoomState.kt b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/room/MatrixRoomState.kt index f2a73545bf..dea6195ba8 100644 --- a/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/room/MatrixRoomState.kt +++ b/libraries/matrixui/src/main/kotlin/io/element/android/libraries/matrix/ui/room/MatrixRoomState.kt @@ -37,4 +37,3 @@ fun MatrixRoom.canRedactAsState(updateKey: Long): State { value = canRedact().getOrElse { false } } } - diff --git a/libraries/matrixui/src/test/kotlin/io/element/android/libraries/matrixui/messages/ToPlainTextTest.kt b/libraries/matrixui/src/test/kotlin/io/element/android/libraries/matrixui/messages/ToPlainTextTest.kt index 3c1a469f42..0bf72c9d0e 100644 --- a/libraries/matrixui/src/test/kotlin/io/element/android/libraries/matrixui/messages/ToPlainTextTest.kt +++ b/libraries/matrixui/src/test/kotlin/io/element/android/libraries/matrixui/messages/ToPlainTextTest.kt @@ -40,7 +40,8 @@ class ToPlainTextTest { """.trimIndent() ) - assertThat(document.toPlainText()).isEqualTo(""" + assertThat(document.toPlainText()).isEqualTo( + """ Hello world • This is an unordered list. 1. This is an ordered list. @@ -59,7 +60,8 @@ class ToPlainTextTest {
""".trimIndent() ) - assertThat(formattedBody.toPlainText()).isEqualTo(""" + assertThat(formattedBody.toPlainText()).isEqualTo( + """ Hello world • This is an unordered list. 1. This is an ordered list. @@ -95,7 +97,8 @@ class ToPlainTextTest { """.trimIndent() ) ) - assertThat(messageType.toPlainText()).isEqualTo(""" + assertThat(messageType.toPlainText()).isEqualTo( + """ Hello world • This is an unordered list. 1. This is an ordered list. diff --git a/libraries/mediapickers/api/src/test/kotlin/io/element/android/libraries/mediapickers/PickerTypeTest.kt b/libraries/mediapickers/api/src/test/kotlin/io/element/android/libraries/mediapickers/PickerTypeTest.kt index d759dc3020..609ee3e0f6 100644 --- a/libraries/mediapickers/api/src/test/kotlin/io/element/android/libraries/mediapickers/PickerTypeTest.kt +++ b/libraries/mediapickers/api/src/test/kotlin/io/element/android/libraries/mediapickers/PickerTypeTest.kt @@ -62,5 +62,4 @@ class PickerTypeTest { assertThat(pickerType.getContract()).isInstanceOf(ActivityResultContracts.CaptureVideo::class.java) assertThat(pickerType.getDefaultRequest()).isEqualTo(uri) } - } diff --git a/libraries/mediapickers/impl/src/main/kotlin/io/element/android/libraries/mediapickers/impl/PickerProviderImpl.kt b/libraries/mediapickers/impl/src/main/kotlin/io/element/android/libraries/mediapickers/impl/PickerProviderImpl.kt index f3c186a34f..16f4a64796 100644 --- a/libraries/mediapickers/impl/src/main/kotlin/io/element/android/libraries/mediapickers/impl/PickerProviderImpl.kt +++ b/libraries/mediapickers/impl/src/main/kotlin/io/element/android/libraries/mediapickers/impl/PickerProviderImpl.kt @@ -40,7 +40,7 @@ import javax.inject.Inject class PickerProviderImpl(private val isInTest: Boolean) : PickerProvider { @Inject - constructor(): this(false) + constructor() : this(false) /** * Remembers and returns a [PickerLauncher] for a certain media/file [type]. diff --git a/libraries/mediaupload/api/src/main/kotlin/io/element/android/libraries/mediaupload/api/MediaPreProcessor.kt b/libraries/mediaupload/api/src/main/kotlin/io/element/android/libraries/mediaupload/api/MediaPreProcessor.kt index 9a48b50aca..db1197f81a 100644 --- a/libraries/mediaupload/api/src/main/kotlin/io/element/android/libraries/mediaupload/api/MediaPreProcessor.kt +++ b/libraries/mediaupload/api/src/main/kotlin/io/element/android/libraries/mediaupload/api/MediaPreProcessor.kt @@ -33,4 +33,3 @@ interface MediaPreProcessor { data class Failure(override val cause: Throwable?) : Exception(cause) } - diff --git a/libraries/mediaupload/impl/src/main/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessor.kt b/libraries/mediaupload/impl/src/main/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessor.kt index 486364a7d7..884336c48e 100644 --- a/libraries/mediaupload/impl/src/main/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessor.kt +++ b/libraries/mediaupload/impl/src/main/kotlin/io/element/android/libraries/mediaupload/impl/AndroidMediaPreProcessor.kt @@ -124,7 +124,6 @@ class AndroidMediaPreProcessor @Inject constructor( } private suspend fun processImage(uri: Uri, mimeType: String, shouldBeCompressed: Boolean): MediaUploadInfo { - suspend fun processImageWithCompression(): MediaUploadInfo { // Read the orientation metadata from its own stream. Trying to reuse this stream for compression will fail. val orientation = contentResolver.openInputStream(uri).use { input -> @@ -272,4 +271,3 @@ private fun MediaMetadataRetriever.extractDuration(): Duration { val durationInMs = extractMetadata(MediaMetadataRetriever.METADATA_KEY_DURATION)?.toLong() ?: 0L return durationInMs.milliseconds } - diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/helper/fileExtensionAndSize.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/helper/FileExtensionAndSizeFormatter.kt similarity index 100% rename from libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/helper/fileExtensionAndSize.kt rename to libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/helper/FileExtensionAndSizeFormatter.kt diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaActions.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaActions.kt index 158c748a94..9f81b4a0b9 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaActions.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaActions.kt @@ -41,4 +41,3 @@ interface LocalMediaActions { */ suspend fun open(localMedia: LocalMedia): Result } - diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaView.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaView.kt index 1e81f75e9f..af6b5f4251 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaView.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/LocalMediaView.kt @@ -56,9 +56,6 @@ import androidx.media3.common.util.UnstableApi import androidx.media3.ui.AspectRatioFrameLayout import androidx.media3.ui.PlayerView import io.element.android.compound.theme.ElementTheme -import io.element.android.libraries.mediaviewer.api.local.exoplayer.ExoPlayerWrapper -import io.element.android.libraries.mediaviewer.api.local.pdf.PdfViewer -import io.element.android.libraries.mediaviewer.api.local.pdf.rememberPdfViewerState import io.element.android.libraries.core.bool.orFalse import io.element.android.libraries.core.mimetype.MimeTypes import io.element.android.libraries.core.mimetype.MimeTypes.isMimeTypeAudio @@ -70,6 +67,9 @@ import io.element.android.libraries.designsystem.utils.CommonDrawables import io.element.android.libraries.designsystem.utils.KeepScreenOn import io.element.android.libraries.designsystem.utils.OnLifecycleEvent import io.element.android.libraries.mediaviewer.api.helper.formatFileExtensionAndSize +import io.element.android.libraries.mediaviewer.api.local.exoplayer.ExoPlayerWrapper +import io.element.android.libraries.mediaviewer.api.local.pdf.PdfViewer +import io.element.android.libraries.mediaviewer.api.local.pdf.rememberPdfViewerState import io.element.android.libraries.ui.strings.CommonStrings import me.saket.telephoto.zoomable.ZoomSpec import me.saket.telephoto.zoomable.ZoomableState @@ -107,7 +107,7 @@ fun LocalMediaView( zoomableState = zoomableState, modifier = modifier ) - //TODO handle audio with exoplayer + // TODO handle audio with exoplayer else -> MediaFileView( localMediaViewState = localMediaViewState, uri = localMedia?.uri, diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/MediaInfo.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/MediaInfo.kt index 726c9dcf0b..1def7b4522 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/MediaInfo.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/MediaInfo.kt @@ -29,21 +29,36 @@ data class MediaInfo( ) : Parcelable fun anImageInfo(): MediaInfo = MediaInfo( - "an image file.jpg", MimeTypes.Jpeg, "4MB", "jpg" + "an image file.jpg", + MimeTypes.Jpeg, + "4MB", + "jpg" ) fun aVideoInfo(): MediaInfo = MediaInfo( - "a video file.mp4", MimeTypes.Mp4, "14MB", "mp4" + "a video file.mp4", + MimeTypes.Mp4, + "14MB", + "mp4" ) fun aPdfInfo(): MediaInfo = MediaInfo( - "a pdf file.pdf", MimeTypes.Pdf, "23MB", "pdf" + "a pdf file.pdf", + MimeTypes.Pdf, + "23MB", + "pdf" ) fun aFileInfo(): MediaInfo = MediaInfo( - "an apk file.apk", MimeTypes.Apk, "50MB", "apk" + "an apk file.apk", + MimeTypes.Apk, + "50MB", + "apk" ) fun anAudioInfo(): MediaInfo = MediaInfo( - "an audio file.mp3", MimeTypes.Mp3, "7MB", "mp3" + "an audio file.mp3", + MimeTypes.Mp3, + "7MB", + "mp3" ) diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfPage.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfPage.kt index 1da6d1a21c..c10bea9703 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfPage.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfPage.kt @@ -92,7 +92,9 @@ class PdfPage( private fun PdfRenderer.openPageRenderAndClose(index: Int, bitmapWidth: Int, bitmapHeight: Int): Bitmap { fun createBitmap(bitmapWidth: Int, bitmapHeight: Int): Bitmap { val bitmap = Bitmap.createBitmap( - bitmapWidth, bitmapHeight, Bitmap.Config.ARGB_8888 + bitmapWidth, + bitmapHeight, + Bitmap.Config.ARGB_8888 ) val canvas = Canvas(bitmap) canvas.drawColor(Color.WHITE) @@ -106,6 +108,3 @@ class PdfPage( } } } - - - diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfViewerState.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfViewerState.kt index 8df8bfdecf..6a80ae5825 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfViewerState.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/local/pdf/PdfViewerState.kt @@ -45,10 +45,10 @@ class PdfViewerState( private var pdfRendererManager by mutableStateOf(null) @Composable - fun getPages(): List{ + fun getPages(): List { return pdfRendererManager?.run { pdfPages.collectAsState().value - }?: emptyList() + } ?: emptyList() } fun openForWidth(maxWidth: Int) { diff --git a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerEvents.kt b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerEvents.kt index b9f8b0aa4d..4d82a04105 100644 --- a/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerEvents.kt +++ b/libraries/mediaviewer/api/src/main/kotlin/io/element/android/libraries/mediaviewer/api/viewer/MediaViewerEvents.kt @@ -17,9 +17,9 @@ package io.element.android.libraries.mediaviewer.api.viewer sealed interface MediaViewerEvents { - data object SaveOnDisk: MediaViewerEvents - data object Share: MediaViewerEvents - data object OpenWith: MediaViewerEvents + data object SaveOnDisk : MediaViewerEvents + data object Share : MediaViewerEvents + data object OpenWith : MediaViewerEvents data object RetryLoading : MediaViewerEvents data object ClearLoadingError : MediaViewerEvents } 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 574c6344f1..6aeda5bc1e 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 @@ -132,7 +132,7 @@ class MediaViewerPresenter @AssistedInject constructor( val snackbarMessage = SnackbarMessage(mediaActionsError(it)) snackbarDispatcher.post(snackbarMessage) } - } else Unit + } } private fun CoroutineScope.share(localMedia: AsyncData) = launch { @@ -142,7 +142,7 @@ class MediaViewerPresenter @AssistedInject constructor( val snackbarMessage = SnackbarMessage(mediaActionsError(it)) snackbarDispatcher.post(snackbarMessage) } - } else Unit + } } private fun CoroutineScope.open(localMedia: AsyncData) = launch { @@ -152,7 +152,7 @@ class MediaViewerPresenter @AssistedInject constructor( val snackbarMessage = SnackbarMessage(mediaActionsError(it)) snackbarDispatcher.post(snackbarMessage) } - } else Unit + } } private fun mediaActionsError(throwable: Throwable): Int { @@ -163,6 +163,3 @@ class MediaViewerPresenter @AssistedInject constructor( } } } - - - 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 1fb557c126..2d5412cc25 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 @@ -75,7 +75,6 @@ fun MediaViewerView( onBackPressed: () -> Unit, modifier: Modifier = Modifier, ) { - fun onRetry() { state.eventSink(MediaViewerEvents.RetryLoading) } 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 c8589e2adb..e4a6126c24 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 @@ -28,11 +28,11 @@ import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatch import io.element.android.libraries.matrix.test.media.FakeMediaLoader import io.element.android.libraries.matrix.test.media.aMediaSource import io.element.android.libraries.mediaviewer.api.local.aFileInfo -import io.element.android.libraries.mediaviewer.test.FakeLocalMediaActions -import io.element.android.libraries.mediaviewer.test.FakeLocalMediaFactory import io.element.android.libraries.mediaviewer.api.viewer.MediaViewerEvents import io.element.android.libraries.mediaviewer.api.viewer.MediaViewerNode import io.element.android.libraries.mediaviewer.api.viewer.MediaViewerPresenter +import io.element.android.libraries.mediaviewer.test.FakeLocalMediaActions +import io.element.android.libraries.mediaviewer.test.FakeLocalMediaFactory import io.element.android.tests.testutils.WarmUpRule import io.mockk.mockk import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -47,7 +47,6 @@ class MediaViewerPresenterTest { @get:Rule val warmUpRule = WarmUpRule() - private val mockMediaUri: Uri = mockk("localMediaUri") private val localMediaFactory = FakeLocalMediaFactory(mockMediaUri) @@ -136,7 +135,7 @@ class MediaViewerPresenterTest { assertThat(failureState.downloadedMedia).isInstanceOf(AsyncData.Failure::class.java) mediaLoader.shouldFail = false failureState.eventSink(MediaViewerEvents.RetryLoading) - //There is one recomposition because of the retry mechanism + // There is one recomposition because of the retry mechanism skipItems(1) val retryLoadingState = awaitItem() assertThat(retryLoadingState.downloadedMedia).isInstanceOf(AsyncData.Loading::class.java) diff --git a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/local/AndroidLocalMediaFactory.kt b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/local/AndroidLocalMediaFactory.kt index 1c026ce53b..2a62a61684 100644 --- a/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/local/AndroidLocalMediaFactory.kt +++ b/libraries/mediaviewer/impl/src/main/kotlin/io/element/android/libraries/mediaviewer/impl/local/AndroidLocalMediaFactory.kt @@ -73,4 +73,3 @@ class AndroidLocalMediaFactory @Inject constructor( ) } } - diff --git a/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaActions.kt b/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaActions.kt index 8c303de541..313eaa5a36 100644 --- a/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaActions.kt +++ b/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaActions.kt @@ -27,7 +27,7 @@ class FakeLocalMediaActions : LocalMediaActions { @Composable override fun Configure() { - //NOOP + // NOOP } override suspend fun saveOnDisk(localMedia: LocalMedia): Result = simulateLongTask { diff --git a/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaFactory.kt b/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaFactory.kt index 84f1d87613..eda1584c2e 100644 --- a/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaFactory.kt +++ b/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/FakeLocalMediaFactory.kt @@ -22,9 +22,9 @@ import io.element.android.libraries.matrix.api.media.MediaFile import io.element.android.libraries.mediaviewer.api.local.LocalMedia import io.element.android.libraries.mediaviewer.api.local.LocalMediaFactory import io.element.android.libraries.mediaviewer.api.local.MediaInfo -import io.element.android.libraries.mediaviewer.test.viewer.aLocalMedia import io.element.android.libraries.mediaviewer.api.util.FileExtensionExtractor import io.element.android.libraries.mediaviewer.api.util.FileExtensionExtractorWithoutValidation +import io.element.android.libraries.mediaviewer.test.viewer.aLocalMedia class FakeLocalMediaFactory( private val localMediaUri: Uri, diff --git a/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/media.kt b/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/LocalMedia.kt similarity index 99% rename from libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/media.kt rename to libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/LocalMedia.kt index e19113c163..876e82000d 100644 --- a/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/media.kt +++ b/libraries/mediaviewer/test/src/main/kotlin/io/element/android/libraries/mediaviewer/test/viewer/LocalMedia.kt @@ -28,4 +28,3 @@ fun aLocalMedia( uri = uri, info = mediaInfo ) - diff --git a/libraries/network/src/main/kotlin/io/element/android/libraries/network/interceptors/FormattedJsonHttpLogger.kt b/libraries/network/src/main/kotlin/io/element/android/libraries/network/interceptors/FormattedJsonHttpLogger.kt index d6c3144c5c..e10bee2261 100644 --- a/libraries/network/src/main/kotlin/io/element/android/libraries/network/interceptors/FormattedJsonHttpLogger.kt +++ b/libraries/network/src/main/kotlin/io/element/android/libraries/network/interceptors/FormattedJsonHttpLogger.kt @@ -23,7 +23,7 @@ import org.json.JSONObject import timber.log.Timber internal class FormattedJsonHttpLogger( - private val level: HttpLoggingInterceptor.Level + private val level: HttpLoggingInterceptor.Level ) : HttpLoggingInterceptor.Logger { companion object { @@ -68,8 +68,8 @@ internal class FormattedJsonHttpLogger( private fun logJson(formattedJson: String) { formattedJson - .lines() - .dropLastWhile { it.isEmpty() } - .forEach { Timber.v(it) } + .lines() + .dropLastWhile { it.isEmpty() } + .forEach { Timber.v(it) } } } diff --git a/libraries/permissions/api/src/main/kotlin/io/element/android/libraries/permissions/api/PermissionsView.kt b/libraries/permissions/api/src/main/kotlin/io/element/android/libraries/permissions/api/PermissionsView.kt index 9e2413fff9..38b40e6403 100644 --- a/libraries/permissions/api/src/main/kotlin/io/element/android/libraries/permissions/api/PermissionsView.kt +++ b/libraries/permissions/api/src/main/kotlin/io/element/android/libraries/permissions/api/PermissionsView.kt @@ -22,8 +22,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import io.element.android.libraries.designsystem.components.dialogs.ConfirmationDialog -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.ui.strings.CommonStrings @Composable diff --git a/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionStateProvider.kt b/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionStateProvider.kt index 86cc646982..c05df3de46 100644 --- a/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionStateProvider.kt +++ b/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/DefaultPermissionStateProvider.kt @@ -31,7 +31,7 @@ import javax.inject.Inject class DefaultPermissionStateProvider @Inject constructor( @ApplicationContext private val context: Context, private val permissionsStore: PermissionsStore, -): PermissionStateProvider { +) : PermissionStateProvider { override fun isPermissionGranted(permission: String): Boolean { return context.checkSelfPermission(permission) == android.content.pm.PackageManager.PERMISSION_GRANTED } diff --git a/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/FakePermissionStateProvider.kt b/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/FakePermissionStateProvider.kt index 364f8072a1..9d7d4d4e65 100644 --- a/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/FakePermissionStateProvider.kt +++ b/libraries/permissions/impl/src/main/kotlin/io/element/android/libraries/permissions/impl/FakePermissionStateProvider.kt @@ -24,7 +24,7 @@ class FakePermissionStateProvider( private var permissionGranted: Boolean = true, permissionDenied: Boolean = false, permissionAsked: Boolean = false, -): PermissionStateProvider { +) : PermissionStateProvider { private val permissionDeniedFlow = MutableStateFlow(permissionDenied) private val permissionAskedFlow = MutableStateFlow(permissionAsked) diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/FilteredEventDetector.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/FilteredEventDetector.kt index 2d4d27472b..012712d1dd 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/FilteredEventDetector.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/FilteredEventDetector.kt @@ -20,7 +20,7 @@ import io.element.android.libraries.push.impl.notifications.model.NotifiableEven import javax.inject.Inject class FilteredEventDetector @Inject constructor( - //private val activeSessionDataSource: ActiveSessionDataSource + // private val activeSessionDataSource: ActiveSessionDataSource ) { /** diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotificationAction.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotificationAction.kt index b3f0b1e0f2..4b04c7dc5d 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotificationAction.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/NotificationAction.kt @@ -17,9 +17,9 @@ package io.element.android.libraries.push.impl.notifications data class NotificationAction( - val shouldNotify: Boolean, - val highlight: Boolean, - val soundName: String? + val shouldNotify: Boolean, + val highlight: Boolean, + val soundName: String? ) /* diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/OutdatedEventDetector.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/OutdatedEventDetector.kt index 27713399fc..72140131b5 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/OutdatedEventDetector.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/OutdatedEventDetector.kt @@ -20,7 +20,7 @@ import io.element.android.libraries.push.impl.notifications.model.NotifiableEven import javax.inject.Inject class OutdatedEventDetector @Inject constructor( - /// private val activeSessionDataSource: ActiveSessionDataSource + // / private val activeSessionDataSource: ActiveSessionDataSource ) { /** diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/SummaryGroupMessageCreator.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/SummaryGroupMessageCreator.kt index f46df7d3a5..316a18916a 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/SummaryGroupMessageCreator.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/SummaryGroupMessageCreator.kt @@ -73,7 +73,7 @@ class SummaryGroupMessageCreator @Inject constructor( val nbEvents = roomNotifications.size + simpleNotifications.size val sumTitle = stringProvider.getQuantityString(R.plurals.notification_compat_summary_title, nbEvents, nbEvents) summaryInboxStyle.setBigContentTitle(sumTitle.annotateForDebug(43)) - //.setSummaryText(stringProvider.getQuantityString(R.plurals.notification_unread_notified_messages, nbEvents, nbEvents).annotateForDebug(44)) + // .setSummaryText(stringProvider.getQuantityString(R.plurals.notification_unread_notified_messages, nbEvents, nbEvents).annotateForDebug(44)) // Use account name now, for multi-session .setSummaryText(currentUser.userId.value.annotateForDebug(44)) return if (useCompleteNotificationFormat) { @@ -119,7 +119,8 @@ class SummaryGroupMessageCreator @Inject constructor( // Invitation and message val messageStr = stringProvider.getQuantityString( R.plurals.notification_new_messages_for_room, - messageNotificationCount, messageNotificationCount + messageNotificationCount, + messageNotificationCount ) if (roomCount > 1) { // In several rooms diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannels.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannels.kt index 74020f9323..c66e530837 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannels.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/channels/NotificationChannels.kt @@ -91,7 +91,8 @@ class NotificationChannels @Inject constructor( enableVibration(true) enableLights(true) lightColor = accentColor - }) + } + ) /** * Low notification importance: shows everywhere, but is not intrusive. @@ -107,7 +108,8 @@ class NotificationChannels @Inject constructor( setSound(null, null) enableLights(true) lightColor = accentColor - }) + } + ) notificationManager.createNotificationChannel( NotificationChannel( @@ -119,7 +121,8 @@ class NotificationChannels @Inject constructor( description = stringProvider.getString(R.string.notification_channel_listening_for_events) setSound(null, null) setShowBadge(false) - }) + } + ) notificationManager.createNotificationChannel( NotificationChannel( @@ -132,7 +135,8 @@ class NotificationChannels @Inject constructor( setSound(null, null) enableLights(true) lightColor = accentColor - }) + } + ) } private fun getChannel(channelId: String): NotificationChannel? { diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableMessageEvent.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableMessageEvent.kt index 4b30bbe86d..f757b26c06 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableMessageEvent.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/notifications/model/NotifiableMessageEvent.kt @@ -71,9 +71,9 @@ fun NotifiableEvent.shouldIgnoreEventInRoom(appNavigationState: AppNavigationSta val currentSessionId = appNavigationState.navigationState.currentSessionId() ?: return false return when (val currentRoomId = appNavigationState.navigationState.currentRoomId()) { null -> false - else -> appNavigationState.isInForeground - && sessionId == currentSessionId - && roomId == currentRoomId - && (this as? NotifiableMessageEvent)?.threadId == appNavigationState.navigationState.currentThreadId() + else -> appNavigationState.isInForeground && + sessionId == currentSessionId && + roomId == currentRoomId && + (this as? NotifiableMessageEvent)?.threadId == appNavigationState.navigationState.currentThreadId() } } diff --git a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/pushgateway/PushGatewayAPI.kt b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/pushgateway/PushGatewayAPI.kt index 02bd7850e9..d8de5429ef 100644 --- a/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/pushgateway/PushGatewayAPI.kt +++ b/libraries/push/impl/src/main/kotlin/io/element/android/libraries/push/impl/pushgateway/PushGatewayAPI.kt @@ -15,7 +15,6 @@ */ package io.element.android.libraries.push.impl.pushgateway - import retrofit2.http.Body import retrofit2.http.POST diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventProcessorTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventProcessorTest.kt index 28b001ca28..294a693174 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventProcessorTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotifiableEventProcessorTest.kt @@ -30,8 +30,8 @@ import io.element.android.libraries.push.impl.notifications.fixtures.aNotifiable import io.element.android.libraries.push.impl.notifications.fixtures.aSimpleNotifiableEvent import io.element.android.libraries.push.impl.notifications.fixtures.anInviteNotifiableEvent import io.element.android.libraries.push.impl.notifications.model.NotifiableEvent -import io.element.android.services.appnavstate.api.NavigationState import io.element.android.services.appnavstate.api.AppNavigationState +import io.element.android.services.appnavstate.api.NavigationState import io.element.android.services.appnavstate.test.FakeAppNavigationStateService import io.element.android.services.appnavstate.test.aNavigationState import kotlinx.coroutines.flow.MutableStateFlow diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationFactoryTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationFactoryTest.kt index ca41fcc15a..9204f836fa 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationFactoryTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationFactoryTest.kt @@ -130,7 +130,9 @@ class NotificationFactoryTest { fun `given room with message when mapping to notification then delegates to room group message creator`() = testWith(notificationFactory) { val events = listOf(A_MESSAGE_EVENT) val expectedNotification = roomGroupMessageCreator.givenCreatesRoomMessageFor( - MatrixUser(A_SESSION_ID, A_SESSION_ID.value, MY_AVATAR_URL), events, A_ROOM_ID + MatrixUser(A_SESSION_ID, A_SESSION_ID.value, MY_AVATAR_URL), + events, + A_ROOM_ID ) val roomWithMessage = mapOf(A_ROOM_ID to listOf(ProcessedEvent(ProcessedEvent.Type.KEEP, A_MESSAGE_EVENT))) diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationRendererTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationRendererTest.kt index 18f2266b87..efc6c96bf3 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationRendererTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationRendererTest.kt @@ -41,7 +41,11 @@ private val A_SUMMARY_NOTIFICATION = SummaryNotification.Update(mockk()) private val A_REMOVE_SUMMARY_NOTIFICATION = SummaryNotification.Removed private val A_NOTIFICATION = mockk() private val MESSAGE_META = RoomNotification.Message.Meta( - summaryLine = "ignored", messageCount = 1, latestTimestamp = -1, roomId = A_ROOM_ID, shouldBing = false + summaryLine = "ignored", + messageCount = 1, + latestTimestamp = -1, + roomId = A_ROOM_ID, + shouldBing = false ) private val ONE_SHOT_META = OneShotNotification.Append.Meta(key = "ignored", summaryLine = "ignored", isNoisy = false, timestamp = -1) diff --git a/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnifiedPushGatewayResolver.kt b/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnifiedPushGatewayResolver.kt index 3b2abaf38a..4842484ef5 100644 --- a/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnifiedPushGatewayResolver.kt +++ b/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnifiedPushGatewayResolver.kt @@ -32,7 +32,7 @@ class UnifiedPushGatewayResolver @Inject constructor( val gateway = UnifiedPushConfig.default_push_gateway_http_url val url = URL(endpoint) val port = if (url.port != -1) { ":${url.port}" } else { "" } - val customBase = "${url.protocol}://${url.host}${port}" + val customBase = "${url.protocol}://${url.host}$port" val customUrl = "$customBase/_matrix/push/v1/notify" Timber.i("Testing $customUrl") try { diff --git a/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnregisterUnifiedPushUseCase.kt b/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnregisterUnifiedPushUseCase.kt index 4bf8217914..17f4c2f4a4 100644 --- a/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnregisterUnifiedPushUseCase.kt +++ b/libraries/pushproviders/unifiedpush/src/main/kotlin/io/element/android/libraries/pushproviders/unifiedpush/UnregisterUnifiedPushUseCase.kt @@ -24,14 +24,14 @@ import javax.inject.Inject class UnregisterUnifiedPushUseCase @Inject constructor( @ApplicationContext private val context: Context, - //private val pushDataStore: PushDataStore, + // private val pushDataStore: PushDataStore, private val unifiedPushStore: UnifiedPushStore, // private val unifiedPushGatewayResolver: UnifiedPushGatewayResolver, ) { suspend fun execute(clientSecret: String /*pushersManager: PushersManager?*/) { - //val mode = BackgroundSyncMode.FDROID_BACKGROUND_SYNC_MODE_FOR_REALTIME - //pushDataStore.setFdroidSyncBackgroundMode(mode) + // val mode = BackgroundSyncMode.FDROID_BACKGROUND_SYNC_MODE_FOR_REALTIME + // pushDataStore.setFdroidSyncBackgroundMode(mode) try { unifiedPushStore.getEndpoint(clientSecret)?.let { Timber.d("Removing $it") diff --git a/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/UserPushStore.kt b/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/UserPushStore.kt index a10413fdf5..fcfd6475c3 100644 --- a/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/UserPushStore.kt +++ b/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/UserPushStore.kt @@ -17,7 +17,6 @@ package io.element.android.libraries.pushstore.api import kotlinx.coroutines.flow.Flow - /** * Store data related to push about a user. */ diff --git a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt index 718ddb51fa..a79eafbbfd 100644 --- a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt +++ b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt @@ -63,7 +63,7 @@ class UserPushStoreDataStore( } override fun getNotificationEnabledForDevice(): Flow { - return context.dataStore.data.map{ it[notificationEnabled].orTrue() } + return context.dataStore.data.map { it[notificationEnabled].orTrue() } } override suspend fun setNotificationEnabledForDevice(enabled: Boolean) { diff --git a/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStore.kt b/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStore.kt index c697e0d3c9..f51021aa9d 100644 --- a/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStore.kt +++ b/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStore.kt @@ -20,7 +20,7 @@ import io.element.android.libraries.pushstore.api.UserPushStore import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableStateFlow -class FakeUserPushStore: UserPushStore { +class FakeUserPushStore : UserPushStore { private var pushProviderName: String? = null private var currentRegisteredPushKey: String? = null @@ -54,6 +54,5 @@ class FakeUserPushStore: UserPushStore { } override suspend fun reset() { - } } diff --git a/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStoreFactory.kt b/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStoreFactory.kt index f51893b00a..a529e34bc1 100644 --- a/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStoreFactory.kt +++ b/libraries/pushstore/test/src/main/kotlin/com/element/android/libraries/pushstore/test/userpushstore/FakeUserPushStoreFactory.kt @@ -20,9 +20,8 @@ import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.pushstore.api.UserPushStore import io.element.android.libraries.pushstore.api.UserPushStoreFactory -class FakeUserPushStoreFactory: UserPushStoreFactory { +class FakeUserPushStoreFactory : UserPushStoreFactory { override fun create(userId: SessionId): UserPushStore { return FakeUserPushStore() } } - diff --git a/libraries/roomselect/api/src/main/kotlin/io/element/android/libraries/roomselect/api/RoomSelectEntryPoint.kt b/libraries/roomselect/api/src/main/kotlin/io/element/android/libraries/roomselect/api/RoomSelectEntryPoint.kt index 873d6f4a9b..e8ff7f2328 100644 --- a/libraries/roomselect/api/src/main/kotlin/io/element/android/libraries/roomselect/api/RoomSelectEntryPoint.kt +++ b/libraries/roomselect/api/src/main/kotlin/io/element/android/libraries/roomselect/api/RoomSelectEntryPoint.kt @@ -39,4 +39,3 @@ interface RoomSelectEntryPoint : FeatureEntryPoint { fun onCancel() } } - diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/DefaultRoomSelectEntryPoint.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/DefaultRoomSelectEntryPoint.kt index d3700c96f5..29f879bc50 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/DefaultRoomSelectEntryPoint.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/DefaultRoomSelectEntryPoint.kt @@ -47,4 +47,3 @@ class DefaultRoomSelectEntryPoint @Inject constructor() : RoomSelectEntryPoint { } } } - diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt index 8535031c16..3eb3582227 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenter.kt @@ -26,12 +26,12 @@ import androidx.compose.runtime.setValue import dagger.assisted.Assisted import dagger.assisted.AssistedFactory import dagger.assisted.AssistedInject -import io.element.android.libraries.roomselect.api.RoomSelectMode import io.element.android.libraries.architecture.Presenter import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.MatrixClient import io.element.android.libraries.matrix.api.roomlist.RoomSummary import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails +import io.element.android.libraries.roomselect.api.RoomSelectMode import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf import kotlinx.collections.immutable.toPersistentList diff --git a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectState.kt b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectState.kt index 20fa7d910d..c451570cf5 100644 --- a/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectState.kt +++ b/libraries/roomselect/impl/src/main/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectState.kt @@ -16,9 +16,9 @@ package io.element.android.libraries.roomselect.impl -import io.element.android.libraries.roomselect.api.RoomSelectMode import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.roomlist.RoomSummaryDetails +import io.element.android.libraries.roomselect.api.RoomSelectMode import kotlinx.collections.immutable.ImmutableList data class RoomSelectState( diff --git a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt index ec85358ebd..e181b57576 100644 --- a/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt +++ b/libraries/roomselect/impl/src/test/kotlin/io/element/android/libraries/roomselect/impl/RoomSelectPresenterTests.kt @@ -20,12 +20,12 @@ 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.roomselect.api.RoomSelectMode import io.element.android.libraries.designsystem.theme.components.SearchBarResultState import io.element.android.libraries.matrix.api.roomlist.RoomSummary import io.element.android.libraries.matrix.test.FakeMatrixClient import io.element.android.libraries.matrix.test.room.aRoomSummaryDetail import io.element.android.libraries.matrix.test.roomlist.FakeRoomListService +import io.element.android.libraries.roomselect.api.RoomSelectMode import io.element.android.tests.testutils.WarmUpRule import kotlinx.collections.immutable.persistentListOf import kotlinx.coroutines.test.runTest diff --git a/libraries/session-storage/impl/src/main/kotlin/io/element/android/libraries/sessionstorage/impl/di/SessionStorageModule.kt b/libraries/session-storage/impl/src/main/kotlin/io/element/android/libraries/sessionstorage/impl/di/SessionStorageModule.kt index 323aa93bb7..052943388e 100644 --- a/libraries/session-storage/impl/src/main/kotlin/io/element/android/libraries/sessionstorage/impl/di/SessionStorageModule.kt +++ b/libraries/session-storage/impl/src/main/kotlin/io/element/android/libraries/sessionstorage/impl/di/SessionStorageModule.kt @@ -34,10 +34,10 @@ object SessionStorageModule { @SingleIn(AppScope::class) fun provideMatrixDatabase(@ApplicationContext context: Context): SessionDatabase { val name = "session_database" - val secretFile = context.getDatabasePath("${name}.key") + val secretFile = context.getDatabasePath("$name.key") val passphraseProvider = RandomSecretPassphraseProvider(context, secretFile) val driver = SqlCipherDriverFactory(passphraseProvider) - .create(SessionDatabase.Schema, "${name}.db", context) + .create(SessionDatabase.Schema, "$name.db", context) return SessionDatabase(driver) } } diff --git a/libraries/testtags/src/main/kotlin/io/element/android/libraries/testtags/TestTags.kt b/libraries/testtags/src/main/kotlin/io/element/android/libraries/testtags/TestTags.kt index 6c31db3a9f..7542194bab 100644 --- a/libraries/testtags/src/main/kotlin/io/element/android/libraries/testtags/TestTags.kt +++ b/libraries/testtags/src/main/kotlin/io/element/android/libraries/testtags/TestTags.kt @@ -65,5 +65,3 @@ object TestTags { val dialogNegative = TestTag("dialog-negative") val dialogNeutral = TestTag("dialog-neutral") } - - diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt index a7620cced0..ba98c0f973 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/ElementRichTextEditorStyle.kt @@ -31,7 +31,7 @@ object ElementRichTextEditorStyle { @Composable fun composerStyle( hasFocus: Boolean, - ) : RichTextEditorStyle { + ): RichTextEditorStyle { val baseStyle = common() return baseStyle.copy( text = baseStyle.text.copy( diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt index c43d6b14b2..06585d3b31 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt @@ -591,47 +591,52 @@ private fun ReplyToModeView( @PreviewsDayNight @Composable internal fun TextComposerSimplePreview() = ElementPreview { - PreviewColumn(items = persistentListOf( - { - ATextComposer( - RichTextEditorState("", initialFocus = true), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Normal, - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost"), - ) - }, { - ATextComposer( - RichTextEditorState("A message", initialFocus = true), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Normal, - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") + PreviewColumn( + items = persistentListOf( + { + ATextComposer( + RichTextEditorState("", initialFocus = true), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Normal, + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost"), + ) + }, + { + ATextComposer( + RichTextEditorState("A message", initialFocus = true), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Normal, + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState( + "A message\nWith several lines\nTo preview larger textfields and long lines with overflow", + initialFocus = true + ), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Normal, + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState("A message without focus", initialFocus = false), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Normal, + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + } ) - }, { - ATextComposer( - RichTextEditorState( - "A message\nWith several lines\nTo preview larger textfields and long lines with overflow", - initialFocus = true - ), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Normal, - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }, { - ATextComposer( - RichTextEditorState("A message without focus", initialFocus = false), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Normal, - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }) ) } @@ -689,122 +694,129 @@ internal fun TextComposerEditPreview() = ElementPreview { @PreviewsDayNight @Composable internal fun TextComposerReplyPreview() = ElementPreview { - PreviewColumn(items = persistentListOf({ - ATextComposer( - RichTextEditorState(""), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Reply( - isThreaded = false, - senderName = "Alice", - eventId = EventId("$1234"), - attachmentThumbnailInfo = null, - defaultContent = "A message\n" + - "With several lines\n" + - "To preview larger textfields and long lines with overflow" - ), - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") + PreviewColumn( + items = persistentListOf( + { + ATextComposer( + RichTextEditorState(""), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Reply( + isThreaded = false, + senderName = "Alice", + eventId = EventId("$1234"), + attachmentThumbnailInfo = null, + defaultContent = "A message\n" + + "With several lines\n" + + "To preview larger textfields and long lines with overflow" + ), + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState(""), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Reply( + isThreaded = true, + senderName = "Alice", + eventId = EventId("$1234"), + attachmentThumbnailInfo = null, + defaultContent = "A message\n" + + "With several lines\n" + + "To preview larger textfields and long lines with overflow" + ), + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState("A message"), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Reply( + isThreaded = true, + senderName = "Alice", + eventId = EventId("$1234"), + attachmentThumbnailInfo = AttachmentThumbnailInfo( + thumbnailSource = MediaSource("https://domain.com/image.jpg"), + textContent = "image.jpg", + type = AttachmentThumbnailType.Image, + blurHash = A_BLUR_HASH, + ), + defaultContent = "image.jpg" + ), + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState("A message"), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Reply( + isThreaded = false, + senderName = "Alice", + eventId = EventId("$1234"), + attachmentThumbnailInfo = AttachmentThumbnailInfo( + thumbnailSource = MediaSource("https://domain.com/video.mp4"), + textContent = "video.mp4", + type = AttachmentThumbnailType.Video, + blurHash = A_BLUR_HASH, + ), + defaultContent = "video.mp4" + ), + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState("A message"), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Reply( + isThreaded = false, + senderName = "Alice", + eventId = EventId("$1234"), + attachmentThumbnailInfo = AttachmentThumbnailInfo( + thumbnailSource = null, + textContent = "logs.txt", + type = AttachmentThumbnailType.File, + blurHash = null, + ), + defaultContent = "logs.txt" + ), + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + }, + { + ATextComposer( + RichTextEditorState("A message", initialFocus = true), + voiceMessageState = VoiceMessageState.Idle, + composerMode = MessageComposerMode.Reply( + isThreaded = false, + senderName = "Alice", + eventId = EventId("$1234"), + attachmentThumbnailInfo = AttachmentThumbnailInfo( + thumbnailSource = null, + textContent = null, + type = AttachmentThumbnailType.Location, + blurHash = null, + ), + defaultContent = "Shared location" + ), + enableTextFormatting = true, + enableVoiceMessages = true, + currentUserId = UserId("@alice:localhost") + ) + } ) - }, - { - ATextComposer( - RichTextEditorState(""), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Reply( - isThreaded = true, - senderName = "Alice", - eventId = EventId("$1234"), - attachmentThumbnailInfo = null, - defaultContent = "A message\n" + - "With several lines\n" + - "To preview larger textfields and long lines with overflow" - ), - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }, { - ATextComposer( - RichTextEditorState("A message"), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Reply( - isThreaded = true, - senderName = "Alice", - eventId = EventId("$1234"), - attachmentThumbnailInfo = AttachmentThumbnailInfo( - thumbnailSource = MediaSource("https://domain.com/image.jpg"), - textContent = "image.jpg", - type = AttachmentThumbnailType.Image, - blurHash = A_BLUR_HASH, - ), - defaultContent = "image.jpg" - ), - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }, { - ATextComposer( - RichTextEditorState("A message"), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Reply( - isThreaded = false, - senderName = "Alice", - eventId = EventId("$1234"), - attachmentThumbnailInfo = AttachmentThumbnailInfo( - thumbnailSource = MediaSource("https://domain.com/video.mp4"), - textContent = "video.mp4", - type = AttachmentThumbnailType.Video, - blurHash = A_BLUR_HASH, - ), - defaultContent = "video.mp4" - ), - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }, { - ATextComposer( - RichTextEditorState("A message"), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Reply( - isThreaded = false, - senderName = "Alice", - eventId = EventId("$1234"), - attachmentThumbnailInfo = AttachmentThumbnailInfo( - thumbnailSource = null, - textContent = "logs.txt", - type = AttachmentThumbnailType.File, - blurHash = null, - ), - defaultContent = "logs.txt" - ), - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }, { - ATextComposer( - RichTextEditorState("A message", initialFocus = true), - voiceMessageState = VoiceMessageState.Idle, - composerMode = MessageComposerMode.Reply( - isThreaded = false, - senderName = "Alice", - eventId = EventId("$1234"), - attachmentThumbnailInfo = AttachmentThumbnailInfo( - thumbnailSource = null, - textContent = null, - type = AttachmentThumbnailType.Location, - blurHash = null, - ), - defaultContent = "Shared location" - ), - enableTextFormatting = true, - enableVoiceMessages = true, - currentUserId = UserId("@alice:localhost") - ) - }) ) } diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposerLinkDialog.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposerLinkDialog.kt index 82b84889d3..b0078a40eb 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposerLinkDialog.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposerLinkDialog.kt @@ -24,13 +24,13 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.components.dialogs.ListDialog import io.element.android.libraries.designsystem.components.list.TextFieldListItem import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.ListItem import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings import io.element.android.wysiwyg.view.models.LinkAction @@ -234,4 +234,3 @@ internal fun TextComposerLinkDialogEditLinkPreview() = ElementPreview { onRemoveLinkRequest = {}, ) } - diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt index c11516558e..e37c8ebc49 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/ComposerOptionsButton.kt @@ -21,13 +21,13 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.IconButton import io.element.android.libraries.designsystem.utils.CommonDrawables import io.element.android.libraries.textcomposer.R -import io.element.android.compound.theme.ElementTheme @Composable internal fun ComposerOptionsButton( @@ -53,4 +53,3 @@ internal fun ComposerOptionsButton( internal fun ComposerOptionsButtonPreview() = ElementPreview { ComposerOptionsButton(onClick = {}) } - diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/DismissTextFormattingButton.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/DismissTextFormattingButton.kt index e2cca41f1d..110ec776c6 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/DismissTextFormattingButton.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/DismissTextFormattingButton.kt @@ -21,12 +21,12 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.IconButton import io.element.android.libraries.designsystem.utils.CommonDrawables -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.strings.CommonStrings @Composable @@ -53,4 +53,3 @@ internal fun DismissTextFormattingButton( internal fun DismissTextFormattingButtonPreview() = ElementPreview { DismissTextFormattingButton(onClick = {}) } - diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt index 850a0e3c38..ea768c4f3b 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOption.kt @@ -32,12 +32,12 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.res.vectorResource import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.iconSuccessPrimaryBackground import io.element.android.libraries.designsystem.utils.CommonDrawables -import io.element.android.compound.theme.ElementTheme @Composable internal fun FormattingOption( @@ -112,4 +112,3 @@ internal fun FormattingButtonPreview() = ElementPreview { ) } } - diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOptionState.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOptionState.kt index 386fa5a668..97cffe87c7 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOptionState.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/FormattingOptionState.kt @@ -19,4 +19,3 @@ package io.element.android.libraries.textcomposer.components internal enum class FormattingOptionState { Default, Selected, Disabled } - diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt index afd10d49d7..b8bb6eb439 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/LiveWaveformView.kt @@ -39,16 +39,17 @@ import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.DpSize import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.components.media.drawWaveform import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight -import io.element.android.compound.theme.ElementTheme import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toPersistentList import java.lang.Float.min private const val DEFAULT_GRAPHICS_LAYER_ALPHA: Float = 0.99F private val waveFormHeight = 26.dp + @Composable fun LiveWaveformView( levels: ImmutableList, @@ -67,7 +68,8 @@ fun LiveWaveformView( } } - Box(contentAlignment = Alignment.CenterEnd, + Box( + contentAlignment = Alignment.CenterEnd, modifier = modifier .fillMaxWidth() .height(waveFormHeight) @@ -97,7 +99,6 @@ fun LiveWaveformView( @Composable internal fun LiveWaveformViewPreview() = ElementPreview { Column { - LiveWaveformView( levels = List(100) { it.toFloat() / 100 }.toPersistentList(), modifier = Modifier.height(34.dp), diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/TextFormatting.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/TextFormatting.kt index 2df01c5f3a..81fd1ca81c 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/TextFormatting.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/TextFormatting.kt @@ -48,7 +48,6 @@ internal fun TextFormatting( state: RichTextEditorState, modifier: Modifier = Modifier, ) { - val scrollState = rememberScrollState() val coroutineScope = rememberCoroutineScope() diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt index 08415e9e10..98e93c1a01 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessagePreview.kt @@ -36,6 +36,7 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.components.media.WaveformPlaybackView import io.element.android.libraries.designsystem.components.media.createFakeWaveform import io.element.android.libraries.designsystem.preview.ElementPreview @@ -44,7 +45,6 @@ import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.IconButton 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.ui.strings.CommonStrings import io.element.android.libraries.ui.utils.time.formatShort import kotlinx.collections.immutable.ImmutableList diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecorderButton.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecorderButton.kt index 01403ee3d7..c3825cef1d 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecorderButton.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecorderButton.kt @@ -14,7 +14,6 @@ * limitations under the License. */ - package io.element.android.libraries.textcomposer.components import androidx.compose.foundation.background @@ -28,14 +27,14 @@ import androidx.compose.ui.hapticfeedback.HapticFeedbackType import androidx.compose.ui.platform.LocalHapticFeedback import androidx.compose.ui.res.stringResource 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.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Icon import io.element.android.libraries.designsystem.theme.components.IconButton import io.element.android.libraries.designsystem.utils.CommonDrawables import io.element.android.libraries.textcomposer.model.VoiceMessageRecorderEvent -import io.element.android.compound.theme.ElementTheme -import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.libraries.ui.strings.CommonStrings @Composable diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecording.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecording.kt index 877e4832f4..f98fbd5b9e 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecording.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/components/VoiceMessageRecording.kt @@ -38,10 +38,10 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.alpha import androidx.compose.ui.unit.dp +import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.designsystem.preview.ElementPreview import io.element.android.libraries.designsystem.preview.PreviewsDayNight import io.element.android.libraries.designsystem.theme.components.Text -import io.element.android.compound.theme.ElementTheme import io.element.android.libraries.ui.utils.time.formatShort import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.toPersistentList diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/MessageComposerMode.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/MessageComposerMode.kt index 9abf6bc52e..2e2869aec7 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/MessageComposerMode.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/MessageComposerMode.kt @@ -26,7 +26,7 @@ import kotlinx.parcelize.Parcelize @Immutable sealed interface MessageComposerMode : Parcelable { @Parcelize - data object Normal: MessageComposerMode + data object Normal : MessageComposerMode sealed class Special(open val eventId: EventId?, open val defaultContent: String) : MessageComposerMode diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/Suggestion.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/Suggestion.kt index e3174f74d0..015677c99c 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/Suggestion.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/Suggestion.kt @@ -25,7 +25,7 @@ data class Suggestion( val type: SuggestionType, val text: String, ) { - constructor(suggestion: SuggestionPattern): this( + constructor(suggestion: SuggestionPattern) : this( suggestion.start.toInt(), suggestion.end.toInt(), SuggestionType.fromPatternKey(suggestion.key), diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessagePlayerEvent.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessagePlayerEvent.kt index 193c72969b..1b35eca80b 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessagePlayerEvent.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessagePlayerEvent.kt @@ -17,10 +17,10 @@ package io.element.android.libraries.textcomposer.model sealed interface VoiceMessagePlayerEvent { - data object Play: VoiceMessagePlayerEvent - data object Pause: VoiceMessagePlayerEvent + data object Play : VoiceMessagePlayerEvent + data object Pause : VoiceMessagePlayerEvent data class Seek( val position: Float - ): VoiceMessagePlayerEvent + ) : VoiceMessagePlayerEvent } diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageRecorderEvent.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageRecorderEvent.kt index 17091930c5..7536f96a68 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageRecorderEvent.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageRecorderEvent.kt @@ -17,7 +17,7 @@ package io.element.android.libraries.textcomposer.model sealed interface VoiceMessageRecorderEvent { - data object Start: VoiceMessageRecorderEvent - data object Stop: VoiceMessageRecorderEvent - data object Cancel: VoiceMessageRecorderEvent + data object Start : VoiceMessageRecorderEvent + data object Stop : VoiceMessageRecorderEvent + data object Cancel : VoiceMessageRecorderEvent } diff --git a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageState.kt b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageState.kt index 94a854a491..ec9118e330 100644 --- a/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageState.kt +++ b/libraries/textcomposer/impl/src/main/kotlin/io/element/android/libraries/textcomposer/model/VoiceMessageState.kt @@ -22,7 +22,7 @@ import kotlin.time.Duration @Immutable sealed interface VoiceMessageState { - data object Idle: VoiceMessageState + data object Idle : VoiceMessageState data class Preview( val isSending: Boolean, @@ -31,10 +31,10 @@ sealed interface VoiceMessageState { val playbackProgress: Float, val time: Duration, val waveform: ImmutableList, - ): VoiceMessageState + ) : VoiceMessageState data class Recording( val duration: Duration, val levels: ImmutableList, - ): VoiceMessageState + ) : VoiceMessageState } diff --git a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserListDataSource.kt b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserListDataSource.kt index b204af447a..569717f511 100644 --- a/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserListDataSource.kt +++ b/libraries/usersearch/api/src/main/kotlin/io/element/android/libraries/usersearch/api/UserListDataSource.kt @@ -20,7 +20,7 @@ import io.element.android.libraries.matrix.api.core.UserId import io.element.android.libraries.matrix.api.user.MatrixUser interface UserListDataSource { - //TODO should probably have a flow + // TODO should probably have a flow suspend fun search(query: String, count: Long): List suspend fun getProfile(userId: UserId): MatrixUser? } diff --git a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt index fa09a5ce9a..0d05e789e7 100644 --- a/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt +++ b/libraries/usersearch/impl/src/main/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepository.kt @@ -70,7 +70,8 @@ class MatrixUserRepository @Inject constructor( 0, dataSource.getProfile(UserId(query)) ?.let { UserSearchResult(it) } - ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true)) + ?: UserSearchResult(MatrixUser(UserId(query)), isUnresolved = true) + ) } return UserSearchResultState(results = results, isSearching = false) diff --git a/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt b/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt index e775547efc..580d701b3a 100644 --- a/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt +++ b/libraries/usersearch/impl/src/test/kotlin/io/element/android/libraries/usersearch/impl/MatrixUserRepositoryTest.kt @@ -212,5 +212,4 @@ internal class MatrixUserRepositoryTest { private fun List.toUserSearchResults() = map { UserSearchResult(it) } private fun placeholderResult(id: UserId = A_USER_ID, isUnresolved: Boolean = false) = UserSearchResult(MatrixUser(id), isUnresolved = isUnresolved) - } diff --git a/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt b/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt index 3ca2320a26..a45fd94495 100644 --- a/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt +++ b/libraries/usersearch/test/src/main/kotlin/io/element/android/libraries/usersearch/test/FakeUserRepository.kt @@ -36,5 +36,4 @@ class FakeUserRepository : UserRepository { suspend fun emitState(state: UserSearchResultState) { flow.emit(state) } - } diff --git a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImpl.kt b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImpl.kt index 5a1cfe537b..3c4d7dd15f 100644 --- a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImpl.kt +++ b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImpl.kt @@ -104,7 +104,7 @@ class VoiceRecorderImpl @Inject constructor( is Audio.Data -> { val audioLevel = audioLevelCalculator.calculateAudioLevel(audio.buffer) - lock.withLock{ + lock.withLock { levels.add(audioLevel) _state.emit(VoiceRecorderState.Recording(elapsedTime, levels.toList())) } @@ -136,7 +136,6 @@ class VoiceRecorderImpl @Inject constructor( audioReader = null encoder.release() - lock.withLock { if (cancelled) { deleteRecording() diff --git a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AndroidAudioReader.kt b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AndroidAudioReader.kt index a2342f3c2f..da13136313 100644 --- a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AndroidAudioReader.kt +++ b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AndroidAudioReader.kt @@ -29,7 +29,8 @@ import kotlinx.coroutines.isActive import kotlinx.coroutines.withContext class AndroidAudioReader -@RequiresPermission(Manifest.permission.RECORD_AUDIO) private constructor( +@RequiresPermission(Manifest.permission.RECORD_AUDIO) +private constructor( private val config: AudioConfig, private val dispatchers: CoroutineDispatchers, ) : AudioReader { diff --git a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AudioReader.kt b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AudioReader.kt index 230c9533fd..4031a5ef45 100644 --- a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AudioReader.kt +++ b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/AudioReader.kt @@ -33,5 +33,4 @@ interface AudioReader { interface Factory { fun create(config: AudioConfig, dispatchers: CoroutineDispatchers): AudioReader } - } diff --git a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/DefaultEncoder.kt b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/DefaultEncoder.kt index a888824fe5..814ed2f891 100644 --- a/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/DefaultEncoder.kt +++ b/libraries/voicerecorder/impl/src/main/kotlin/io/element/android/libraries/voicerecorder/impl/audio/DefaultEncoder.kt @@ -33,7 +33,7 @@ class DefaultEncoder @Inject constructor( config: AudioConfig, ) : Encoder { private val bitRate = config.bitRate -private val sampleRate = config.sampleRate.asEncoderModel() + private val sampleRate = config.sampleRate.asEncoderModel() private var encoder: OggOpusEncoder? = null override fun init( diff --git a/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImplTest.kt b/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImplTest.kt index 030545a3bc..671649d1c3 100644 --- a/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImplTest.kt +++ b/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/impl/VoiceRecorderImplTest.kt @@ -155,7 +155,7 @@ class VoiceRecorderImplTest { companion object { const val FILE_ID: String = "recording" - const val FILE_PATH = "voice_recordings/${FILE_ID}.ogg" + const val FILE_PATH = "voice_recordings/$FILE_ID.ogg" private lateinit var AUDIO_FORMAT: AudioFormat // FakeEncoder doesn't actually encode, it just writes the data to the file diff --git a/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/test/FakeAudioRecorderFactory.kt b/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/test/FakeAudioRecorderFactory.kt index 01943f4d10..02d8b4742c 100644 --- a/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/test/FakeAudioRecorderFactory.kt +++ b/libraries/voicerecorder/impl/src/test/kotlin/io/element/android/libraries/voicerecorder/test/FakeAudioRecorderFactory.kt @@ -23,7 +23,7 @@ import io.element.android.libraries.voicerecorder.impl.audio.AudioReader class FakeAudioRecorderFactory( private val audio: List
diff --git a/features/rageshake/impl/src/main/res/values-it/translations.xml b/features/rageshake/impl/src/main/res/values-it/translations.xml index 2c95849db0..852a8f68ff 100644 --- a/features/rageshake/impl/src/main/res/values-it/translations.xml +++ b/features/rageshake/impl/src/main/res/values-it/translations.xml @@ -1,14 +1,15 @@ "Allega istantanea schermo" - "Potete contattarmi per qualsiasi altra domanda" + "Potete contattarmi per qualsiasi altra domanda." + "Contattami" "Modifica istantanea schermo" - "Descrivi il bug. Che cosa hai fatto? Cosa ti aspettavi che accadesse? Cosa è effettivamente accaduto. Si prega di inserire il maggior numero di dettagli possibile." + "Descrivi il problema. Che cosa hai fatto? Cosa ti aspettavi che accadesse? Cosa è effettivamente accaduto. Si prega di inserire il maggior numero di dettagli possibile." "Descrivi il problema…" "Se possibile, scrivere la descrizione in inglese." "Invia i log degli arresti anomali" - "Invia i log per aiutarci" + "Consenti i log" "Invia istantanea schermo" - "Per verificare che le cose funzionino come previsto, i log verranno inviati con il tuo messaggio. Questi saranno privati. Per inviare solo il tuo messaggio, disattiva questa impostazione." + "Per verificare che le cose funzionino come previsto, i log verranno inviati con il tuo messaggio. Per inviare solo il tuo messaggio, disattiva questa impostazione." "%1$s si è chiuso inaspettatamente l\'ultima volta che è stato usato. Vuoi condividere con noi un rapporto sull\'arresto anomalo?" diff --git a/features/roomdetails/impl/src/main/res/values-it/translations.xml b/features/roomdetails/impl/src/main/res/values-it/translations.xml index 3217efe862..9b4672a51f 100644 --- a/features/roomdetails/impl/src/main/res/values-it/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-it/translations.xml @@ -4,18 +4,51 @@ "1 persona" "%1$d persone" + "Si è verificato un errore durante l\'aggiornamento delle impostazioni di notifica." + "Il tuo homeserver non supporta questa opzione nelle stanze criptate, quindi potresti non ricevere notifiche in alcune stanze." + "Sondaggi" + "Aggiungi argomento" + "Già membro" + "Già invitato" + "Modifica stanza" + "Si è verificato un errore sconosciuto e non è stato possibile modificare le informazioni." + "Impossibile aggiornare la stanza" "I messaggi sono protetti da lucchetti. Solo tu e i destinatari avete le chiavi univoche per sbloccarli." "Crittografia messaggi abilitata" + "Si è verificato un errore durante il caricamento delle impostazioni di notifica." + "Impostazione del silenzioso fallita per questa stanza, riprova." + "Disattivazione del silenzioso di questa stanza fallita, riprova." "Invita persone" + "Personalizzato" + "Predefinito" + "Notifiche" + "Nome stanza" "Condividi stanza" + "Aggiornamento della stanza…" + "In attesa" + "Membri della stanza" + "Consenti impostazione personalizzata" + "L\'attivazione di questa opzione sovrascriverà l\'impostazione predefinita" + "Avvisami in questa chat per" + "Puoi cambiarlo nelle tue %1$s." + "impostazioni globali" + "Impostazione predefinita" + "Rimuovi l\'impostazione personalizzata" + "Si è verificato un errore durante il caricamento delle impostazioni di notifica." + "Ripristino della modalità predefinita fallito, riprova." + "Impossibile impostare la modalità, riprova." + "Il tuo homeserver non supporta questa opzione nelle stanze criptate, quindi non riceverai notifiche in questa stanza." + "Tutti i messaggi" + "In questa stanza, avvisami per" "Si è verificato un errore durante il tentativo di avviare una chat" "Blocca" - "Gli utenti bloccati non saranno in grado di inviarti nuovi messaggi e tutti quelli già esistenti saranno nascosti. Potrai annullare questa azione in qualsiasi momento." + "Gli utenti bloccati non saranno in grado di inviarti messaggi e tutti quelli già ricevuti saranno nascosti. Puoi sbloccarli in qualsiasi momento." "Blocca utente" "Sblocca" - "Dopo aver sbloccato l\'utente, potrai vedere nuovamente tutti i suoi messaggi." + "Potrai vedere di nuovo tutti i suoi messaggi." "Sblocca utente" "Esci dalla stanza" "Sicurezza" "Oggetto" + "Solo menzioni e parole chiave" diff --git a/features/roomdetails/impl/src/main/res/values-ru/translations.xml b/features/roomdetails/impl/src/main/res/values-ru/translations.xml index d83820dbbf..9f586230b2 100644 --- a/features/roomdetails/impl/src/main/res/values-ru/translations.xml +++ b/features/roomdetails/impl/src/main/res/values-ru/translations.xml @@ -12,7 +12,7 @@ "Уже зарегистрирован" "Уже приглашены" "Редактировать комнату" - "Произошла неизвестная ошибка, и информацию нельзя было изменить." + "Произошла неизвестная ошибка и информацию не удалось изменить." "Не удалось обновить комнату" "Сообщения зашифрованы. Только у вас и у получателей есть уникальные ключи для их разблокировки." "Шифрование сообщений включено" diff --git a/features/roomlist/impl/src/main/res/values-it/translations.xml b/features/roomlist/impl/src/main/res/values-it/translations.xml index cbe93e52d9..2d186453a9 100644 --- a/features/roomlist/impl/src/main/res/values-it/translations.xml +++ b/features/roomlist/impl/src/main/res/values-it/translations.xml @@ -1,7 +1,11 @@ + "Il backup della chat non è attualmente sincronizzato. Devi confermare la chiave di recupero per mantenere l\'accesso al backup della chat." + "Conferma la chiave di recupero" "Crea una nuova conversazione o stanza" + "Inizia inviando un messaggio a qualcuno." + "Ancora nessuna chat." "Tutte le conversazioni" - "Sembra che tu stia utilizzando un nuovo dispositivo. Verifica di essere tu per accedere ai tuoi messaggi crittografati." - "Accedi alla cronologia dei messaggi" + "Sembra che tu stia usando un nuovo dispositivo. Verificati con un altro dispositivo per accedere ai tuoi messaggi cifrati." + "Verifica che sei tu" diff --git a/features/roomlist/impl/src/main/res/values-ru/translations.xml b/features/roomlist/impl/src/main/res/values-ru/translations.xml index caba3f6dfe..261feda31d 100644 --- a/features/roomlist/impl/src/main/res/values-ru/translations.xml +++ b/features/roomlist/impl/src/main/res/values-ru/translations.xml @@ -6,6 +6,6 @@ "Начните переписку с отправки сообщения." "Пока нет доступных чатов." "Все чаты" - "Похоже, вы используете новое устройство. Чтобы получить доступ к зашифрованным сообщениям в дальнейшем, проверьте их на другом устройстве." + "Похоже, вы используете новое устройство. Чтобы получить доступ к зашифрованным сообщениям пройдите верификацию с другим устройством." "Подтвердите, что это вы" diff --git a/features/securebackup/impl/src/main/res/values-it/translations.xml b/features/securebackup/impl/src/main/res/values-it/translations.xml new file mode 100644 index 0000000000..2670c5b052 --- /dev/null +++ b/features/securebackup/impl/src/main/res/values-it/translations.xml @@ -0,0 +1,44 @@ + + + "Disattiva il backup" + "Attiva il backup" + "Il backup ti garantisce di non perdere la cronologia dei messaggi. %1$s." + "Backup" + "Cambia la chiave di recupero" + "Conferma la chiave di recupero" + "Il backup della chat attualmente non è sincronizzato." + "Configura il recupero" + "Ottieni l\'accesso ai tuoi messaggi cifrati se perdi tutti i tuoi dispositivi o se sei disconnesso da %1$s ovunque." + "Disattiva" + "Perderai i tuoi messaggi cifrati se sei disconnesso da tutti i dispositivi." + "Vuoi davvero disattivare il backup?" + "La disattivazione del backup rimuoverà il backup dell\'attuale chiave crittografica e disattiverà altre funzioni di sicurezza. In questo caso:" + "Non avrai la cronologia dei messaggi cifrati su nuovi dispositivi" + "Perderai l\'accesso ai tuoi messaggi cifrati se ti sei disconnesso da %1$s ovunque" + "Vuoi davvero disattivare il backup?" + "Ottieni una nuova chiave di recupero se hai perso quella esistente. Dopo averla cambiata, quella vecchia non funzionerà più." + "Genera una nuova chiave di recupero" + "Assicurati di conservare la chiave di recupero in un posto sicuro" + "Chiave di recupero cambiata" + "Cambiare la chiave di recupero?" + "Inserisci la tua chiave di recupero per confermare l\'accesso al backup della chat." + "Riprova per confermare l\'accesso al backup della chat." + "Chiave di recupero errata" + "Inserisci il codice di 48 caratteri." + "Inserisci…" + "Chiave di recupero confermata" + "Conferma la chiave di recupero" + "Chiave di recupero copiata" + "Generazione…" + "Salva la chiave di recupero" + "Annota la chiave di recupero in un posto sicuro o salvala in un gestore di password." + "Tocca per copiare la chiave di recupero" + "Salva la tua chiave di recupero" + "Dopo questo passaggio non potrai accedere alla nuova chiave di recupero." + "Hai salvato la chiave di recupero?" + "Il backup della chat è protetto da una chiave di recupero. Se hai bisogno di una nuova chiave di recupero dopo la configurazione, puoi ricrearla selezionando \"Cambia chiave di recupero\"." + "Genera la tua chiave di recupero" + "Assicurati di conservare la chiave di recupero in un posto sicuro" + "Configurazione del recupero completata" + "Configura il recupero" + diff --git a/features/signedout/impl/src/main/res/values-it/translations.xml b/features/signedout/impl/src/main/res/values-it/translations.xml new file mode 100644 index 0000000000..c9da145562 --- /dev/null +++ b/features/signedout/impl/src/main/res/values-it/translations.xml @@ -0,0 +1,8 @@ + + + "Hai cambiato la password in un\'altra sessione" + "Hai eliminato la sessione da un\'altra sessione" + "L\'amministratore del tuo server ha invalidato il tuo accesso" + "Potresti essere stato disconnesso per uno dei motivi elencati di seguito. Accedi di nuovo per continuare a usare %s." + "Sei disconnesso" + diff --git a/features/verifysession/impl/src/main/res/values-it/translations.xml b/features/verifysession/impl/src/main/res/values-it/translations.xml index 852e94b463..0f4f86adf4 100644 --- a/features/verifysession/impl/src/main/res/values-it/translations.xml +++ b/features/verifysession/impl/src/main/res/values-it/translations.xml @@ -3,12 +3,15 @@ "C\'è qualcosa che non va. La richiesta è scaduta o è stata rifiutata." "Verifica che gli emoji sottostanti corrispondano a quelli mostrati nell\'altra sessione." "Confronta le emoji" + "Conferma che i numeri seguenti corrispondano a quelli mostrati nell\'altra sessione." + "Confronta i numeri" "La tua nuova sessione è ora verificata. Ha accesso ai tuoi messaggi crittografati e gli altri utenti la vedranno come attendibile." "Dimostra la tua identità per accedere alla cronologia dei messaggi crittografati." "Apri una sessione esistente" "Riprova la verifica" "Sono pronto" "In attesa di un riscontro" + "Confronta un set unico di emoji." "Confronta le emoji uniche, assicurandoti che appaiano nello stesso ordine." "Non corrispondono" "Corrispondono" diff --git a/features/verifysession/impl/src/main/res/values-ru/translations.xml b/features/verifysession/impl/src/main/res/values-ru/translations.xml index 8351059b5d..78bc282cf4 100644 --- a/features/verifysession/impl/src/main/res/values-ru/translations.xml +++ b/features/verifysession/impl/src/main/res/values-ru/translations.xml @@ -1,7 +1,7 @@ - "Кажется, что-то не так. Время ожидания запроса истекло, либо запрос был отклонен." - "Убедитесь, что приведенные ниже смайлики совпадают со смайликами, показанными во время другого сеанса." + "Похоже, что-то не так. Время ожидания запроса либо истекло, либо запрос был отклонен." + "Убедитесь, что приведенные ниже емоджи совпадают с емоджи показанными во время другого сеанса." "Сравните емодзи" "Убедитесь, что приведенные ниже числа совпадают с цифрами, показанными в другом сеансе." "Сравните числа" diff --git a/libraries/eventformatter/impl/src/main/res/values-it/translations.xml b/libraries/eventformatter/impl/src/main/res/values-it/translations.xml index 2e2e914dfe..85a55d51a4 100644 --- a/libraries/eventformatter/impl/src/main/res/values-it/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-it/translations.xml @@ -39,6 +39,8 @@ "Hai cambiato il nome della stanza in: %1$s" "%1$s ha rimosso il nome della stanza" "Hai rimosso il nome della stanza" + "%1$s non ha apportato modifiche" + "Non hai apportato modifiche" "%1$s ha rifiutato l\'invito" "Hai rifiutato l\'invito" "%1$s ha rimosso %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 7930c496dc..d2cfadc57f 100644 --- a/libraries/eventformatter/impl/src/main/res/values-ru/translations.xml +++ b/libraries/eventformatter/impl/src/main/res/values-ru/translations.xml @@ -55,5 +55,5 @@ "Вы удалили тему комнаты" "%1$s разблокирован %2$s" "Вы разблокировали %1$s" - "%1$s внес неизвестное изменение в составе" + "%1$s внес неизвестное изменение для своих участников" diff --git a/libraries/permissions/api/src/main/res/values-hu/translations.xml b/libraries/permissions/api/src/main/res/values-hu/translations.xml index de3573fce2..aea9a1f772 100644 --- a/libraries/permissions/api/src/main/res/values-hu/translations.xml +++ b/libraries/permissions/api/src/main/res/values-hu/translations.xml @@ -1,7 +1,7 @@ "Hogy az alkalmazás használhassa a kamerát, adja meg az engedélyt a rendszerbeállításokban." - "Adja meg az engedélyt a rendszerbeállításokban." + "Add meg az engedélyt a rendszerbeállításokban." "Hogy az alkalmazás használhassa a mikrofont, adja meg az engedélyt a rendszerbeállításokban." "Hogy az alkalmazás megjeleníthesse az értesítéseket, adja meg az engedélyt a rendszerbeállításokban." diff --git a/libraries/permissions/api/src/main/res/values-it/translations.xml b/libraries/permissions/api/src/main/res/values-it/translations.xml new file mode 100644 index 0000000000..2fe09c68ba --- /dev/null +++ b/libraries/permissions/api/src/main/res/values-it/translations.xml @@ -0,0 +1,7 @@ + + + "Per permettere all\'applicazione di usare la fotocamera, concedi l\'autorizzazione nelle impostazioni di sistema." + "Concedi l\'autorizzazione nelle impostazioni di sistema." + "Per permettere all\'applicazione di usare il microfono, concedi l\'autorizzazione nelle impostazioni di sistema." + "Per permettere all\'applicazione di mostrare notifiche, concedi l\'autorizzazione nelle impostazioni di sistema." + diff --git a/libraries/push/impl/src/main/res/values-hu/translations.xml b/libraries/push/impl/src/main/res/values-hu/translations.xml index f87455630b..23c3998bb8 100644 --- a/libraries/push/impl/src/main/res/values-hu/translations.xml +++ b/libraries/push/impl/src/main/res/values-hu/translations.xml @@ -4,7 +4,7 @@ "Események figyelése" "Zajos értesítések" "Csendes értesítések" - "** Nem sikerült elküldeni – nyissa meg a szobát" + "** Nem sikerült elküldeni – kérlek nyisd meg a szobát" "Csatlakozás" "Elutasítás" "Meghívta, hogy csevegjen" @@ -14,7 +14,7 @@ "Megjelölés olvasottként" "Meghívta, hogy csatlakozzon a szobához" "Én" - "Az értesítést nézi! Kattintson ide!" + "Az értesítést nézed! Kattints ide!" "%1$s: %2$s" "%1$s: %2$s %3$s" "%1$s és %2$s" @@ -44,7 +44,7 @@ "%d szoba" "%d szoba" - "Válassza ki az értesítések fogadásának módját" + "Válaszd ki az értesítések fogadásának módját" "Háttérszinkronizálás" "Google szolgáltatások" "A Google Play szolgáltatások nem találhatók. Előfordulhat, hogy az értesítések nem működnek megfelelően." diff --git a/libraries/push/impl/src/main/res/values-it/translations.xml b/libraries/push/impl/src/main/res/values-it/translations.xml index 92c5c06f9b..9e512001be 100644 --- a/libraries/push/impl/src/main/res/values-it/translations.xml +++ b/libraries/push/impl/src/main/res/values-it/translations.xml @@ -1,5 +1,51 @@ + "Chiamata" + "Notifiche silenziose" + "** Invio fallito - si prega di aprire la stanza" + "Entra" + "Rifiuta" + "Ti ha invitato a chattare" + "Ti ha menzionato: %1$s" + "Nuovi messaggi" + "Ha reagito con %1$s" + "Segna come letto" + "Ti ha invitato ad entrare nella stanza" + "Io" + "Stai visualizzando la notifica! Cliccami!" + "%1$s: %2$s" + "%1$s: %2$s %3$s" + "%1$s e %2$s" + "%1$s in %2$s" + "%1$s in %2$s e %3$s" + + "%1$s: %2$d messaggio" + "%1$s: %2$d messaggi" + + + "%d notifica" + "%d notifiche" + + + "%d invito" + "%d inviti" + + + "%d nuovo messaggio" + "%d nuovi messaggi" + + + "%d messaggio notificato non letto" + "%d messaggi notificati non letti" + + + "%d stanza" + "%d stanze" + + "Scegli come ricevere le notifiche" + "Sincronizzazione in background" + "Servizi Google" + "Google Play Services non trovato. Le notifiche non funzioneranno bene." "Notifica" "Risposta rapida" diff --git a/libraries/textcomposer/impl/src/main/res/values-it/translations.xml b/libraries/textcomposer/impl/src/main/res/values-it/translations.xml index e3034e8dfe..18bd369d74 100644 --- a/libraries/textcomposer/impl/src/main/res/values-it/translations.xml +++ b/libraries/textcomposer/impl/src/main/res/values-it/translations.xml @@ -1,8 +1,11 @@ "Attiva/disattiva l\'elenco puntato" + "Chiudi le opzioni di formattazione" "Attiva/disattiva il blocco di codice" "Messaggio…" + "Crea un collegamento" + "Modifica collegamento" "Applica il formato in grassetto" "Applicare il formato corsivo" "Applica il formato barrato" @@ -12,6 +15,11 @@ "Applicare il formato del codice in linea" "Imposta collegamento" "Attiva/disattiva elenco numerato" + "Apri le opzioni di composizione" "Attiva/disattiva citazione" + "Rimuovi collegamento" "Rientro a sinistra" + "Collegamento" + "Aggiungi allegato" + "Tieni premuto per registrare" diff --git a/libraries/ui-strings/src/main/res/values-de/translations.xml b/libraries/ui-strings/src/main/res/values-de/translations.xml index b1fd043b64..1578326b9f 100644 --- a/libraries/ui-strings/src/main/res/values-de/translations.xml +++ b/libraries/ui-strings/src/main/res/values-de/translations.xml @@ -90,7 +90,7 @@ "Chat starten" "Verifizierung starten" "Tippe, um die Karte zu laden" - "Foto machen" + "Foto aufnehmen" "Für Optionen tippen" "Erneut versuchen" "Quellcode anzeigen" diff --git a/libraries/ui-strings/src/main/res/values-hu/translations.xml b/libraries/ui-strings/src/main/res/values-hu/translations.xml index f59c70a05a..530ab7125b 100644 --- a/libraries/ui-strings/src/main/res/values-hu/translations.xml +++ b/libraries/ui-strings/src/main/res/values-hu/translations.xml @@ -47,7 +47,7 @@ "Engedélyezés" "Szavazás lezárása" "Adja meg a PIN-kódot" - "Elfelejtette a jelszót?" + "Elfelejtetted a jelszavadat?" "Tovább" "Meghívás" "Ismerősök meghívása" @@ -82,17 +82,17 @@ "Üzenet küldése" "Megosztás" "Hivatkozás megosztása" - "Jelentkezzen be újra" + "Jelentkezz be újra" "Kijelentkezés" "Kijelentkezés mindenképp" "Kihagyás" "Indítás" "Csevegés indítása" "Ellenőrzés elindítása" - "Koppintson a térkép betöltéséhez" + "Koppints a térkép betöltéséhez" "Fénykép készítése" "Koppintson a lehetőségekért" - "Próbálja újra" + "Próbáld újra" "Forrás megtekintése" "Igen" "Továbbiak betöltése" @@ -106,7 +106,7 @@ "Csevegés biztonsági mentése" "Szerzői jogok" "Szoba létrehozása…" - "Elhagyta a szobát" + "Elhagytad a szobát" "Sötét" "Visszafejtési hiba" "Fejlesztői beállítások" @@ -115,7 +115,7 @@ "Szerkesztés" "* %1$s %2$s" "Titkosítás engedélyezve" - "Adja meg a PIN-kódját" + "Add meg a PIN-kódodat" "Hiba" "Mindenki" "Fájl" @@ -156,7 +156,7 @@ "Formázott szöveges szerkesztő" "Szoba" "Szoba neve" - "például a projekt neve" + "például a projekted neve" "Képernyőzár" "Személy keresése" "Keresési találatok" @@ -202,9 +202,9 @@ "Nem sikerült létrehozni az állandó hivatkozást" "Az %1$s nem tudta betölteni a térképet. Próbálja meg újra később." "Nem sikerült betölteni az üzeneteket" - "Az %1$s nem tudta elérni a tartózkodási helyét. Próbálja meg újra később." + "A(z) %1$s nem tudta elérni a tartózkodási helyét. Próbáld meg újra később." "Nem sikerült feltölteni a hangüzenetét." - "Az %1$snek nincs engedélye, hogy hozzáférjen a tartózkodási helyéhez. Ezt a beállításokban engedélyezheti." + "Az %1$snek nincs engedélye, hogy hozzáférjen a tartózkodási helyedhez. Ezt a beállításokban engedélyezheted." "Az %1$snek nincs engedélye, hogy hozzáférjen a tartózkodási helyéhez. Engedélyezze alább az elérését." "Az %1$snek nincs engedélye, hogy hozzáférjen a mikrofonjához. Engedélyezze, hogy tudjon hangüzenetet felvenni." "Néhány üzenet nem került elküldésre" diff --git a/libraries/ui-strings/src/main/res/values-it/translations.xml b/libraries/ui-strings/src/main/res/values-it/translations.xml index cfd24d7c08..fc783fae31 100644 --- a/libraries/ui-strings/src/main/res/values-it/translations.xml +++ b/libraries/ui-strings/src/main/res/values-it/translations.xml @@ -1,11 +1,33 @@ + "Elimina" "Nascondi password" + "Vai alla fine" + "Solo menzioni" + "Silenziato" + "Pagina %1$d" + "Pausa" + "Campo del PIN" + "Riproduci" + "Sondaggio" + "Sondaggio terminato" + "Reagisci con %1$s" + "Reagisci con altri emoji" + "Letto da %1$s e %2$s" + "Letto da %1$s" + "Tocca per mostrare tutti" + "Rimuovi la reazione con %1$s" "Invia file" "Mostra password" + "Inizia una chiamata" "Menu utente" + "Registra un messaggio vocale." + "Ferma la registrazione" + "Accetta" + "Aggiungi alla timeline" "Indietro" "Annulla" + "Scegli foto" "Cancella" "Chiudi" "Completa verifica" @@ -13,24 +35,43 @@ "Continua" "Copia" "Copia collegamento" + "Copia link nel messaggio" + "Crea" "Crea una stanza" + "Rifiuta" + "Elimina sondaggio" "Disabilita" "Fine" "Modifica" + "Modifica sondaggio" "Attiva" + "Termina sondaggio" + "Inserisci PIN" + "Password dimenticata?" + "Inoltra" "Invita" - "Invita amici a %1$s" + "Invita persone" + "Invita persone su %1$s" + "Invita persone su %1$s" + "Inviti" + "Entra" "Ulteriori informazioni" "Esci" "Esci dalla stanza" + "Gestisci account" + "Gestisci dispositivi" "Avanti" "No" "Non ora" "OK" + "Impostazioni" + "Apri con" "Risposta rapida" "Citazione" + "Reagisci" "Rimuovi" "Rispondi" + "Rispondi nella conversazione" "Segnala un problema" "Segnala Contenuto" "Riprova" @@ -38,73 +79,166 @@ "Salva" "Ricerca" "Invia" + "Invia messaggio" "Condividi" "Condividi collegamento" + "Accedi di nuovo" + "Disconnetti" + "Disconnetti comunque" "Salta" "Inizia" "Avvia conversazione" "Avvia la verifica" + "Tocca per caricare la mappa" + "Scatta foto" + "Tocca per le opzioni" + "Riprova" "Vedi Sorgente" "Sì" + "Carica di più" "Informazioni" + "Regole sull\'utilizzo consentito" + "Impostazioni avanzate" + "Statistiche" + "Aspetto" "Audio" "Fumetti" + "Backup della chat" + "Copyright" "Creazione stanza…" "Hai lasciato la stanza" + "Scuro" "Errore di decrittazione" "Opzioni sviluppatore" + "Chat diretta" "(modificato)" "Modifica in corso" + "* %1$s %2$s" "Crittografia abilitata" + "Inserisci il PIN" "Errore" + "Tutti" "File" + "File salvato in Download" + "Inoltra messaggio" "GIF" "Immagine" + "In risposta a %1$s" + "Installa APK" + "Questo ID Matrix non può essere trovato, quindi l\'invito potrebbe non essere ricevuto." + "Lasciando la stanza" + "Chiaro" "Collegamento copiato negli appunti" "Caricamento…" "Messaggio" - "Layout del messaggio" + "Azioni del messaggio" + "Impaginazione del messaggio" "Messaggio rimosso" "Moderno" + "Silenzia" "Nessun risultato" "Non in linea" "Password" "Persone" "Collegamento permanente" + "Autorizzazione" + "Voti totali: %1$s" + "I risultati verranno mostrati al termine del sondaggio" + "Informativa sulla privacy" + "Reazione" "Reazioni" + "Chiave di recupero" + "Aggiornamento…" "Risposta a %1$s" "Segnala un problema" + "Segnala un problema" "Segnalazione inviata" + "Editor in rich text" + "Stanza" + "Nome stanza" + "ad es. il nome del tuo progetto" + "Blocco schermo" "Cerca qualcuno" + "Risultati di ricerca" "Sicurezza" + "Visto da" "Invio in corso…" + "Invio fallito" + "Inviato" "Server non supportato" "URL del server" "Impostazioni" + "Posizione condivisa" + "Disconnessione" + "Avvio della chat…" "Adesivo" "Operazione riuscita" "Suggerimenti" + "Sincronizzazione" + "Sistema" + "Testo" + "Comunicazioni di terze parti" + "Conversazione" "Oggetto" + "Di cosa parla questa stanza?" "Impossibile decrittografare" + "Non è stato possibile spedire inviti a uno o più utenti." + "Impossibile inviare inviti" + "Sblocca" + "Annulla silenzioso" "Evento non supportato" "Nome utente" "Verifica annullata" "Verifica completata" "Video" + "Messaggio vocale" "In attesa…" + "In attesa di questo messaggio" + "Vuoi davvero terminare questo sondaggio?" + "Sondaggio: %1$s" + "Verifica dispositivo" "Conferma" "Attenzione" "Impossibile creare il collegamento permanente" + "%1$s non è riuscito a caricare la mappa. Riprova più tardi." "Caricamento dei messaggi non riuscito" + "%1$s non è riuscito ad accedere alla tua posizione. Riprova più tardi." + "Invio del messaggio vocale fallito." + "%1$s non ha l\'autorizzazione di accedere alla tua posizione. Puoi attivare l\'accesso nelle impostazioni." + "%1$s non ha l\'autorizzazione per accedere alla tua posizione. Attiva l\'accesso di seguito." + "%1$s non ha l\'autorizzazione di accedere al microfono. Attiva l\'accesso per registrare un messaggio vocale." "Alcuni messaggi non sono stati inviati" "Siamo spiacenti, si è verificato un errore" + "🔐️ Unisciti a me su %1$s" "Ehi, parlami su %1$s: %2$s" "%1$s Android" + + "%1$d cifra inserita" + "%1$d cifre inserite" + + + "Letto da %1$s e %2$d altro" + "Letto da %1$s e altri %2$d" + "%1$d membro" "%1$d membri" + + "%d voto" + "%d voti" + "Scuoti per segnalare un problema" + "Selezione del file multimediale fallita, riprova." + "Elaborazione del file multimediale da caricare fallita, riprova." + "Caricamento del file multimediale fallito, riprova." + "Condividi posizione" + "Condividi la mia posizione" + "Apri in Apple Maps" + "Apri in Google Maps" + "Apri in OpenStreetMap" + "Condividi questa posizione" + "Posizione" "Versione: %1$s (%2$s)" "it" "Errore" diff --git a/libraries/ui-strings/src/main/res/values-ru/translations.xml b/libraries/ui-strings/src/main/res/values-ru/translations.xml index b6576d988c..4f035ce514 100644 --- a/libraries/ui-strings/src/main/res/values-ru/translations.xml +++ b/libraries/ui-strings/src/main/res/values-ru/translations.xml @@ -98,9 +98,9 @@ "Загрузить еще" "О приложении" "Политика допустимого использования" - "Дополнительные параметры" + "Дополнительные настройки" "Аналитика" - "Оформление" + "Внешний вид" "Аудио" "Пузыри" "Резервная копия чатов" @@ -139,7 +139,7 @@ "Ничего не найдено" "Не в сети" "Пароль" - "Пользователи" + "Люди" "Постоянная ссылка" "Разрешение" "Всего голосов: %1$s" @@ -173,7 +173,7 @@ "Начало чата…" "Стикер" "Успешно" - "Рекомендации" + "Предложения" "Синхронизация" "Системная" "Текст" @@ -232,7 +232,7 @@ "%d голоса" "%d голосов" - "Rageshake сообщит об ошибке" + "Встряхните устройство, чтобы сообщить об ошибке" "Не удалось выбрать носитель, попробуйте еще раз." "Не удалось обработать медиафайл для загрузки, попробуйте еще раз." "Не удалось загрузить медиафайлы, попробуйте еще раз." From 6329aefad986ec5b2dcb02ba84bb4fac5472df58 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 16:12:02 +0000 Subject: [PATCH 151/161] Update dependency com.posthog:posthog-android to v3.1.2 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fd2c62ed3a..d43cd21191 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -172,7 +172,7 @@ opusencoder = "io.element.android:opusencoder:1.1.0" kotlinpoet = "com.squareup:kotlinpoet:1.15.3" # Analytics -posthog = "com.posthog:posthog-android:3.1.1" +posthog = "com.posthog:posthog-android:3.1.2" sentry = "io.sentry:sentry-android:7.2.0" matrix_analytics_events = "com.github.matrix-org:matrix-analytics-events:aa14cbcdf81af2746d20a71779ec751f971e1d7f" From 9f4164a287cc9521a4dc1a4d928b3d20cfbebc03 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Jan 2024 14:02:40 +0100 Subject: [PATCH 152/161] Migrate preferencesDataStoreFile to a file using a hash, to fix a crash if the userId is too long. --- libraries/pushstore/impl/build.gradle.kts | 1 + .../pushstore/impl/UserPushStoreDataStore.kt | 24 ++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/libraries/pushstore/impl/build.gradle.kts b/libraries/pushstore/impl/build.gradle.kts index 17e0268af1..9b01588090 100644 --- a/libraries/pushstore/impl/build.gradle.kts +++ b/libraries/pushstore/impl/build.gradle.kts @@ -34,6 +34,7 @@ anvil { dependencies { implementation(libs.dagger) implementation(projects.libraries.architecture) + implementation(projects.libraries.androidutils) implementation(projects.libraries.core) implementation(projects.libraries.matrix.api) implementation(projects.libraries.pushstore.api) diff --git a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt index a79eafbbfd..506652f98f 100644 --- a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt +++ b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt @@ -23,12 +23,15 @@ import androidx.datastore.preferences.core.booleanPreferencesKey import androidx.datastore.preferences.core.edit import androidx.datastore.preferences.core.stringPreferencesKey import androidx.datastore.preferences.preferencesDataStore +import androidx.datastore.preferences.preferencesDataStoreFile +import io.element.android.libraries.androidutils.hash.hash import io.element.android.libraries.core.bool.orTrue import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.pushstore.api.UserPushStore import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.map +import timber.log.Timber /** * Store data related to push about a user. @@ -37,7 +40,24 @@ class UserPushStoreDataStore( private val context: Context, userId: SessionId, ) : UserPushStore { - private val Context.dataStore: DataStore by preferencesDataStore(name = "push_store_$userId") + // Hash the sessionId to get ride of exotic chars and take only the first 16 chars. + // The risk of collision is not high. + private val preferenceName = "push_store_${userId.value.hash().take(16)}" + + init { + // Migrate legacy data. Previous file can be too long if the userId is too long. The userId can be up to 255 chars. + // Example of long file path, with `averylonguserid` replacing a very longer name + // /data/user/0/io.element.android.x.debug/files/datastore/push_store_@averylonguserid:example.org.preferences_pb + val legacyFile = context.preferencesDataStoreFile("push_store_$userId") + if (legacyFile.exists()) { + Timber.d("Migrating legacy push data store for $userId") + if (!legacyFile.renameTo(context.preferencesDataStoreFile(preferenceName))) { + Timber.w("Failed to migrate legacy push data store for $userId") + } + } + } + + private val Context.dataStore: DataStore by preferencesDataStore(name = preferenceName) private val pushProviderName = stringPreferencesKey("pushProviderName") private val currentPushKey = stringPreferencesKey("currentPushKey") private val notificationEnabled = booleanPreferencesKey("notificationEnabled") @@ -81,4 +101,6 @@ class UserPushStoreDataStore( it.clear() } } + + } } From 504ff46f1b119408ee027afd287cc8203bdcbc22 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Jan 2024 14:14:04 +0100 Subject: [PATCH 153/161] Also delete the preference file when the store is reset. --- .../libraries/pushstore/impl/UserPushStoreDataStore.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt index 506652f98f..8fe59b36c9 100644 --- a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt +++ b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt @@ -100,7 +100,7 @@ class UserPushStoreDataStore( context.dataStore.edit { it.clear() } - } - + // Also delete the file + context.preferencesDataStoreFile(preferenceName).delete() } } From fcb84016ca660959cadaf7f75ba2ddecb211fcfe Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Jan 2024 14:34:06 +0100 Subject: [PATCH 154/161] Ensure client secret is deleted when the user signs out. --- .../api/clientsecret/PushClientSecret.kt | 5 ---- libraries/pushstore/impl/build.gradle.kts | 1 + .../impl/clientsecret/PushClientSecretImpl.kt | 24 +++++++++++++++---- .../clientsecret/PushClientSecretImplTest.kt | 5 ++-- 4 files changed, 24 insertions(+), 11 deletions(-) diff --git a/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/clientsecret/PushClientSecret.kt b/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/clientsecret/PushClientSecret.kt index dbdd22ce07..1700d41181 100644 --- a/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/clientsecret/PushClientSecret.kt +++ b/libraries/pushstore/api/src/main/kotlin/io/element/android/libraries/pushstore/api/clientsecret/PushClientSecret.kt @@ -29,9 +29,4 @@ interface PushClientSecret { * Return null if not found. */ suspend fun getUserIdFromSecret(clientSecret: String): SessionId? - - /** - * To call when the user signs out. - */ - suspend fun resetSecretForUser(userId: SessionId) } diff --git a/libraries/pushstore/impl/build.gradle.kts b/libraries/pushstore/impl/build.gradle.kts index 9b01588090..28e53e011c 100644 --- a/libraries/pushstore/impl/build.gradle.kts +++ b/libraries/pushstore/impl/build.gradle.kts @@ -49,6 +49,7 @@ dependencies { testImplementation(libs.coroutines.test) testImplementation(projects.libraries.matrix.test) testImplementation(projects.services.appnavstate.test) + testImplementation(projects.libraries.sessionStorage.test) androidTestImplementation(libs.coroutines.test) androidTestImplementation(libs.test.core) diff --git a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt index ca0ed14e33..25c0332b43 100644 --- a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt +++ b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt @@ -22,13 +22,20 @@ import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecret import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecretFactory import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecretStore +import io.element.android.libraries.sessionstorage.api.observer.SessionListener +import io.element.android.libraries.sessionstorage.api.observer.SessionObserver import javax.inject.Inject -@ContributesBinding(AppScope::class) +@ContributesBinding(AppScope::class, boundType = PushClientSecret::class) class PushClientSecretImpl @Inject constructor( private val pushClientSecretFactory: PushClientSecretFactory, private val pushClientSecretStore: PushClientSecretStore, -) : PushClientSecret { + private val sessionObserver: SessionObserver, +) : PushClientSecret, SessionListener { + init { + observeSessions() + } + override suspend fun getSecretForUser(userId: SessionId): String { val existingSecret = pushClientSecretStore.getSecret(userId) if (existingSecret != null) { @@ -43,7 +50,16 @@ class PushClientSecretImpl @Inject constructor( return pushClientSecretStore.getUserIdFromSecret(clientSecret) } - override suspend fun resetSecretForUser(userId: SessionId) { - pushClientSecretStore.resetSecret(userId) + private fun observeSessions() { + sessionObserver.addListener(this) + } + + override suspend fun onSessionCreated(userId: String) { + // Nothing to do + } + + override suspend fun onSessionDeleted(userId: String) { + // Delete the secret + pushClientSecretStore.resetSecret(SessionId(userId)) } } diff --git a/libraries/pushstore/impl/src/test/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImplTest.kt b/libraries/pushstore/impl/src/test/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImplTest.kt index 5af4877ed3..dc0e5b3651 100644 --- a/libraries/pushstore/impl/src/test/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImplTest.kt +++ b/libraries/pushstore/impl/src/test/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImplTest.kt @@ -18,6 +18,7 @@ package io.element.android.libraries.pushstore.impl.clientsecret import com.google.common.truth.Truth.assertThat import io.element.android.libraries.matrix.api.core.SessionId +import io.element.android.libraries.sessionstorage.test.observer.NoOpSessionObserver import kotlinx.coroutines.test.runTest import org.junit.Test @@ -31,7 +32,7 @@ internal class PushClientSecretImplTest { fun test() = runTest { val factory = FakePushClientSecretFactory() val store = InMemoryPushClientSecretStore() - val sut = PushClientSecretImpl(factory, store) + val sut = PushClientSecretImpl(factory, store, NoOpSessionObserver()) val secret0 = factory.getSecretForUser(0) val secret1 = factory.getSecretForUser(1) @@ -56,7 +57,7 @@ internal class PushClientSecretImplTest { assertThat(sut.getUserIdFromSecret(A_UNKNOWN_SECRET)).isNull() // User signs out - sut.resetSecretForUser(A_USER_ID_0) + sut.onSessionDeleted(A_USER_ID_0.value) assertThat(store.getSecrets()).hasSize(1) // Create a new secret after reset assertThat(sut.getSecretForUser(A_USER_ID_0)).isEqualTo(secret2) From 64a18afc1bbc17f85c5d9e55f5c729bad5d45b70 Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Tue, 16 Jan 2024 15:49:44 +0100 Subject: [PATCH 155/161] Replace 'leave room' text with 'leave conversation' for DMs (#2231) * Replace 'leave room' text with 'leave conversation' for DMs * Add `isDm` property to both `RoomSummary` and `RoomListRoomSummary` * Remove redundant `leave_conversation_alert_subtitle_*` texts * Fix maestro flow --------- Co-authored-by: ElementBot --- .../tests/roomList/createAndDeleteDM.yaml | 2 +- changelog.d/2218.misc | 1 + .../features/leaveroom/api/LeaveRoomState.kt | 1 + .../leaveroom/api/LeaveRoomStateProvider.kt | 11 +++++--- .../features/leaveroom/api/LeaveRoomView.kt | 14 +++++++++- .../api/src/main/res/values/localazy.xml | 1 + .../leaveroom/impl/LeaveRoomPresenterImpl.kt | 2 ++ .../impl/LeaveRoomPresenterImplTest.kt | 20 ++++++++++++++ .../MessageComposerPresenter.kt | 3 +-- .../roomdetails/impl/RoomDetailsView.kt | 18 +++++++++---- .../impl/src/main/res/values/localazy.xml | 1 + .../roomlist/impl/RoomListContextMenu.kt | 26 +++++++++++++++++-- .../roomlist/impl/RoomListPresenter.kt | 3 ++- .../features/roomlist/impl/RoomListState.kt | 1 + .../roomlist/impl/RoomListStateProvider.kt | 3 ++- .../impl/datasource/RoomListDataSource.kt | 1 + .../impl/model/RoomListRoomSummary.kt | 1 + .../roomlist/impl/RoomListPresenterTests.kt | 4 +-- .../libraries/matrix/api/room/MatrixRoom.kt | 3 +++ .../matrix/api/roomlist/RoomSummary.kt | 1 + .../roomlist/RoomSummaryDetailsFactory.kt | 1 + .../src/main/res/values/localazy.xml | 1 + ...oomView-Day-0_1_null_6,NEXUS_5,1.0,en].png | 3 +++ ...mView-Night-0_2_null_6,NEXUS_5,1.0,en].png | 3 +++ ...eyBanner-Day-4_5_null,NEXUS_5,1.0,en].png} | 0 ...Banner-Night-4_6_null,NEXUS_5,1.0,en].png} | 0 ...ndicator-Day-7_8_null,NEXUS_5,1.0,en].png} | 0 ...icator-Night-7_9_null,NEXUS_5,1.0,en].png} | 0 ...stTopBar-Day-6_7_null,NEXUS_5,1.0,en].png} | 0 ...TopBar-Night-6_8_null,NEXUS_5,1.0,en].png} | 0 ...onHeader-Day-5_6_null,NEXUS_5,1.0,en].png} | 0 ...Header-Night-5_7_null,NEXUS_5,1.0,en].png} | 0 ...olderRow-Day-8_9_null,NEXUS_5,1.0,en].png} | 0 ...erRow-Night-8_10_null,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_0,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_1,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_2,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_3,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_4,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_5,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_6,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_7,NEXUS_5,1.0,en].png} | 0 ...ryRow-Day-9_10_null_8,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_0,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_1,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_2,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_3,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_4,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_5,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_6,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_7,NEXUS_5,1.0,en].png} | 0 ...Row-Night-9_11_null_8,NEXUS_5,1.0,en].png} | 0 ...ontent-Day-10_11_null,NEXUS_5,1.0,en].png} | 0 ...tent-Night-10_12_null,NEXUS_5,1.0,en].png} | 0 ...tentForDm-Day-2_3_null,NEXUS_5,1.0,en].png | 3 +++ ...ntForDm-Night-2_4_null,NEXUS_5,1.0,en].png | 3 +++ ...stView-Day-3_4_null_0,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_1,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_2,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_3,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_4,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_5,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_6,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_7,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_8,NEXUS_5,1.0,en].png} | 0 ...stView-Day-3_4_null_9,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_0,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_1,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_2,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_3,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_4,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_5,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_6,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_7,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_8,NEXUS_5,1.0,en].png} | 0 ...View-Night-3_5_null_9,NEXUS_5,1.0,en].png} | 0 tools/localazy/config.json | 3 ++- 77 files changed, 115 insertions(+), 19 deletions(-) create mode 100644 changelog.d/2218.misc create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Day-0_1_null_6,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Night-0_2_null_6,NEXUS_5,1.0,en].png rename 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 => ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-4_5_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-4_6_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-7_8_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-7_9_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-6_7_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-6_8_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Day-5_6_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RequestVerificationHeader_null_RequestVerificationHeader-Night-5_7_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-8_9_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-8_10_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-9_10_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-9_11_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Day-10_11_null,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl.search_RoomListSearchResultContent_null_RoomListSearchResultContent-Night-10_12_null,NEXUS_5,1.0,en].png} (100%) create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Day-2_3_null,NEXUS_5,1.0,en].png create mode 100644 tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Night-2_4_null,NEXUS_5,1.0,en].png rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Day-3_4_null_9,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_0,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_1,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_2,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_3,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_4,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_5,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_6,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_7,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_8,NEXUS_5,1.0,en].png} (100%) rename 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 => ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-Night-3_5_null_9,NEXUS_5,1.0,en].png} (100%) diff --git a/.maestro/tests/roomList/createAndDeleteDM.yaml b/.maestro/tests/roomList/createAndDeleteDM.yaml index f79a7418e4..6c2ebed11e 100644 --- a/.maestro/tests/roomList/createAndDeleteDM.yaml +++ b/.maestro/tests/roomList/createAndDeleteDM.yaml @@ -9,5 +9,5 @@ appId: ${APP_ID} index: 1 - takeScreenshot: build/maestro/330-createAndDeleteDM - tapOn: "maestroelement2" -- tapOn: "Leave room" +- tapOn: "Leave conversation" - tapOn: "Leave" diff --git a/changelog.d/2218.misc b/changelog.d/2218.misc new file mode 100644 index 0000000000..4f0e42d950 --- /dev/null +++ b/changelog.d/2218.misc @@ -0,0 +1 @@ +Replace 'leave room' text with 'leave conversation' for DMs. diff --git a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomState.kt b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomState.kt index df6d44df4d..f069533d1a 100644 --- a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomState.kt +++ b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomState.kt @@ -26,6 +26,7 @@ data class LeaveRoomState( ) { sealed interface Confirmation { data object Hidden : Confirmation + data class Dm(val roomId: RoomId) : Confirmation data class Generic(val roomId: RoomId) : Confirmation data class PrivateRoom(val roomId: RoomId) : Confirmation data class LastUserInRoom(val roomId: RoomId) : Confirmation diff --git a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomStateProvider.kt b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomStateProvider.kt index f82b58cba3..8c966b1a13 100644 --- a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomStateProvider.kt +++ b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomStateProvider.kt @@ -28,17 +28,17 @@ class LeaveRoomStateProvider : PreviewParameterProvider { error = LeaveRoomState.Error.Hidden, ), aLeaveRoomState( - confirmation = LeaveRoomState.Confirmation.Generic(A_ROOM_ID), + confirmation = LeaveRoomState.Confirmation.Generic(roomId = A_ROOM_ID), progress = LeaveRoomState.Progress.Hidden, error = LeaveRoomState.Error.Hidden, ), aLeaveRoomState( - confirmation = LeaveRoomState.Confirmation.PrivateRoom(A_ROOM_ID), + confirmation = LeaveRoomState.Confirmation.PrivateRoom(roomId = A_ROOM_ID), progress = LeaveRoomState.Progress.Hidden, error = LeaveRoomState.Error.Hidden, ), aLeaveRoomState( - confirmation = LeaveRoomState.Confirmation.LastUserInRoom(A_ROOM_ID), + confirmation = LeaveRoomState.Confirmation.LastUserInRoom(roomId = A_ROOM_ID), progress = LeaveRoomState.Progress.Hidden, error = LeaveRoomState.Error.Hidden, ), @@ -52,6 +52,11 @@ class LeaveRoomStateProvider : PreviewParameterProvider { progress = LeaveRoomState.Progress.Hidden, error = LeaveRoomState.Error.Shown, ), + aLeaveRoomState( + confirmation = LeaveRoomState.Confirmation.Dm(roomId = A_ROOM_ID), + progress = LeaveRoomState.Progress.Hidden, + error = LeaveRoomState.Error.Hidden, + ), ) } diff --git a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt index 0006ae1251..5168ee9936 100644 --- a/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt +++ b/features/leaveroom/api/src/main/kotlin/io/element/android/features/leaveroom/api/LeaveRoomView.kt @@ -47,21 +47,32 @@ private fun LeaveRoomConfirmationDialog( ) { when (state.confirmation) { is LeaveRoomState.Confirmation.Hidden -> {} + + is LeaveRoomState.Confirmation.Dm -> LeaveRoomConfirmationDialog( + text = R.string.leave_conversation_alert_subtitle, + roomId = state.confirmation.roomId, + isDm = true, + eventSink = state.eventSink, + ) + is LeaveRoomState.Confirmation.PrivateRoom -> LeaveRoomConfirmationDialog( text = R.string.leave_room_alert_private_subtitle, roomId = state.confirmation.roomId, + isDm = false, eventSink = state.eventSink, ) is LeaveRoomState.Confirmation.LastUserInRoom -> LeaveRoomConfirmationDialog( text = R.string.leave_room_alert_empty_subtitle, roomId = state.confirmation.roomId, + isDm = false, eventSink = state.eventSink, ) is LeaveRoomState.Confirmation.Generic -> LeaveRoomConfirmationDialog( text = R.string.leave_room_alert_subtitle, roomId = state.confirmation.roomId, + isDm = false, eventSink = state.eventSink, ) } @@ -71,10 +82,11 @@ private fun LeaveRoomConfirmationDialog( private fun LeaveRoomConfirmationDialog( @StringRes text: Int, roomId: RoomId, + isDm: Boolean, eventSink: (LeaveRoomEvent) -> Unit, ) { ConfirmationDialog( - title = stringResource(CommonStrings.action_leave_room), + title = stringResource(if (isDm) CommonStrings.action_leave_conversation else CommonStrings.action_leave_room), content = stringResource(text), submitText = stringResource(CommonStrings.action_leave), onSubmitClicked = { eventSink(LeaveRoomEvent.LeaveRoom(roomId)) }, diff --git a/features/leaveroom/api/src/main/res/values/localazy.xml b/features/leaveroom/api/src/main/res/values/localazy.xml index 262369c9be..f068e772bb 100644 --- a/features/leaveroom/api/src/main/res/values/localazy.xml +++ b/features/leaveroom/api/src/main/res/values/localazy.xml @@ -1,5 +1,6 @@ + "Are you sure that you want to leave this conversation? This conversation is not public and you won\'t be able to rejoin without an invite." "Are you sure that you want to leave this room? You\'re the only person here. If you leave, no one will be able to join in the future, including you." "Are you sure that you want to leave this room? This room is not public and you won\'t be able to rejoin without an invite." "Are you sure that you want to leave the room?" diff --git a/features/leaveroom/impl/src/main/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImpl.kt b/features/leaveroom/impl/src/main/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImpl.kt index 2ad35b38c9..56c2f9b8fd 100644 --- a/features/leaveroom/impl/src/main/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImpl.kt +++ b/features/leaveroom/impl/src/main/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImpl.kt @@ -24,6 +24,7 @@ import androidx.compose.runtime.rememberCoroutineScope import io.element.android.features.leaveroom.api.LeaveRoomEvent import io.element.android.features.leaveroom.api.LeaveRoomPresenter import io.element.android.features.leaveroom.api.LeaveRoomState +import io.element.android.features.leaveroom.api.LeaveRoomState.Confirmation.Dm import io.element.android.features.leaveroom.api.LeaveRoomState.Confirmation.Generic import io.element.android.features.leaveroom.api.LeaveRoomState.Confirmation.LastUserInRoom import io.element.android.features.leaveroom.api.LeaveRoomState.Confirmation.PrivateRoom @@ -85,6 +86,7 @@ private suspend fun showLeaveRoomAlert( ) { matrixClient.getRoom(roomId)?.use { room -> confirmation.value = when { + room.isDm -> Dm(roomId) !room.isPublic -> PrivateRoom(roomId) room.joinedMemberCount == 1L -> LastUserInRoom(roomId) else -> Generic(roomId) diff --git a/features/leaveroom/impl/src/test/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImplTest.kt b/features/leaveroom/impl/src/test/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImplTest.kt index 677df53dc8..8bc8157c05 100644 --- a/features/leaveroom/impl/src/test/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImplTest.kt +++ b/features/leaveroom/impl/src/test/kotlin/io/element/android/features/leaveroom/impl/LeaveRoomPresenterImplTest.kt @@ -114,6 +114,26 @@ class LeaveRoomPresenterImplTest { } } + @Test + fun `present - show DM confirmation`() = runTest { + val presenter = createLeaveRoomPresenter( + client = FakeMatrixClient().apply { + givenGetRoomResult( + roomId = A_ROOM_ID, + result = FakeMatrixRoom(activeMemberCount = 2, isDirect = true, isOneToOne = true), + ) + } + ) + moleculeFlow(RecompositionMode.Immediate) { + presenter.present() + }.test { + val initialState = awaitItem() + initialState.eventSink(LeaveRoomEvent.ShowConfirmation(A_ROOM_ID)) + val confirmationState = awaitItem() + assertThat(confirmationState.confirmation).isEqualTo(LeaveRoomState.Confirmation.Dm(A_ROOM_ID)) + } + } + @Test fun `present - leaving a room leaves the room`() = runTest { val roomMembershipObserver = RoomMembershipObserver() diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index 7a3e1baf13..6044b1abe7 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -183,9 +183,8 @@ class MessageComposerPresenter @Inject constructor( val currentUserId = currentSessionIdHolder.current suspend fun canSendRoomMention(): Boolean { - val roomIsDm = room.isDirect && room.isOneToOne val userCanSendAtRoom = room.canUserTriggerRoomNotification(currentUserId).getOrDefault(false) - return !roomIsDm && userCanSendAtRoom + return !room.isDm && userCanSendAtRoom } // This will trigger a search immediately when `@` is typed diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt index 2879995d82..bbdccbc302 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/RoomDetailsView.kt @@ -190,9 +190,10 @@ fun RoomDetailsView( BlockUserDialogs(roomMemberState) } - OtherActionsSection(onLeaveRoom = { - state.eventSink(RoomDetailsEvent.LeaveRoom) - }) + OtherActionsSection( + isDm = state.roomType is RoomDetailsType.Dm, + onLeaveRoom = { state.eventSink(RoomDetailsEvent.LeaveRoom) } + ) } } } @@ -410,10 +411,17 @@ private fun SecuritySection(modifier: Modifier = Modifier) { } @Composable -private fun OtherActionsSection(onLeaveRoom: () -> Unit, modifier: Modifier = Modifier) { +private fun OtherActionsSection(isDm: Boolean, onLeaveRoom: () -> Unit, modifier: Modifier = Modifier) { PreferenceCategory(showDivider = false, modifier = modifier) { ListItem( - headlineContent = { Text(stringResource(R.string.screen_room_details_leave_room_title)) }, + headlineContent = { + val leaveText = stringResource(id = if (isDm) { + R.string.screen_room_details_leave_conversation_title + } else { + R.string.screen_room_details_leave_room_title + }) + Text(leaveText) + }, leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Leave)), style = ListItemStyle.Destructive, onClick = onLeaveRoom, diff --git a/features/roomdetails/impl/src/main/res/values/localazy.xml b/features/roomdetails/impl/src/main/res/values/localazy.xml index 13219abaf8..2693b40edb 100644 --- a/features/roomdetails/impl/src/main/res/values/localazy.xml +++ b/features/roomdetails/impl/src/main/res/values/localazy.xml @@ -47,6 +47,7 @@ "Unblock" "You\'ll be able to see all messages from them again." "Unblock user" + "Leave conversation" "Leave room" "Security" "Topic" diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListContextMenu.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListContextMenu.kt index 04eb6164a4..1d2cf2c910 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListContextMenu.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListContextMenu.kt @@ -95,7 +95,14 @@ private fun RoomListModalBottomSheetContent( style = ListItemStyle.Primary, ) ListItem( - headlineContent = { Text(text = stringResource(id = CommonStrings.action_leave_room)) }, + headlineContent = { + val leaveText = stringResource(id = if (contextMenu.isDm) { + CommonStrings.action_leave_conversation + } else { + CommonStrings.action_leave_room + }) + Text(text = leaveText) + }, modifier = Modifier.clickable { onLeaveRoomClicked(contextMenu.roomId) }, leadingContent = ListItemContent.Icon( iconSource = IconSource.Vector( @@ -117,7 +124,22 @@ internal fun RoomListModalBottomSheetContentPreview() = ElementPreview { RoomListModalBottomSheetContent( contextMenu = RoomListState.ContextMenu.Shown( roomId = RoomId(value = "!aRoom:aDomain"), - roomName = "aRoom" + roomName = "aRoom", + isDm = false, + ), + onRoomSettingsClicked = {}, + onLeaveRoomClicked = {} + ) +} + +@PreviewsDayNight +@Composable +internal fun RoomListModalBottomSheetContentForDmPreview() = ElementPreview { + RoomListModalBottomSheetContent( + contextMenu = RoomListState.ContextMenu.Shown( + roomId = RoomId(value = "!aRoom:aDomain"), + roomName = "aRoom", + isDm = true, ), onRoomSettingsClicked = {}, onLeaveRoomClicked = {} diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt index 05d4d93146..8ab1bde3f4 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListPresenter.kt @@ -119,7 +119,8 @@ class RoomListPresenter @Inject constructor( is RoomListEvents.ShowContextMenu -> { contextMenu = RoomListState.ContextMenu.Shown( roomId = event.roomListRoomSummary.roomId, - roomName = event.roomListRoomSummary.name + roomName = event.roomListRoomSummary.name, + isDm = event.roomListRoomSummary.isDm, ) } is RoomListEvents.HideContextMenu -> contextMenu = RoomListState.ContextMenu.Hidden diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt index b0c87b88aa..7003da36e5 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListState.kt @@ -46,6 +46,7 @@ data class RoomListState( data class Shown( val roomId: RoomId, val roomName: String, + val isDm: Boolean, ) : ContextMenu } } diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt index 406c28592a..bf18bc60cc 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/RoomListStateProvider.kt @@ -44,7 +44,8 @@ open class RoomListStateProvider : PreviewParameterProvider { aRoomListState().copy( contextMenu = RoomListState.ContextMenu.Shown( roomId = RoomId("!aRoom:aDomain"), - roomName = "A nice room name" + roomName = "A nice room name", + isDm = false, ) ), aRoomListState().copy(displayRecoveryKeyPrompt = true), diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt index e337fe5ad3..8db08dac39 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/datasource/RoomListDataSource.kt @@ -162,6 +162,7 @@ class RoomListDataSource @Inject constructor( avatarData = avatarData, notificationMode = roomSummary.details.notificationMode, hasOngoingCall = roomSummary.details.hasOngoingCall, + isDm = roomSummary.details.isDm, ) } null -> null diff --git a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt index cfaf9b8321..ecb3aa6a96 100644 --- a/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt +++ b/features/roomlist/impl/src/main/kotlin/io/element/android/features/roomlist/impl/model/RoomListRoomSummary.kt @@ -34,4 +34,5 @@ data class RoomListRoomSummary( val isPlaceholder: Boolean = false, val notificationMode: RoomNotificationMode? = null, val hasOngoingCall: Boolean = false, + val isDm: Boolean = false, ) diff --git a/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt index f3b678dd35..f56379f186 100644 --- a/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt +++ b/features/roomlist/impl/src/test/kotlin/io/element/android/features/roomlist/impl/RoomListPresenterTests.kt @@ -321,7 +321,7 @@ class RoomListPresenterTests { val shownState = awaitItem() assertThat(shownState.contextMenu) - .isEqualTo(RoomListState.ContextMenu.Shown(summary.roomId, summary.name)) + .isEqualTo(RoomListState.ContextMenu.Shown(summary.roomId, summary.name, false)) scope.cancel() } } @@ -341,7 +341,7 @@ class RoomListPresenterTests { val shownState = awaitItem() assertThat(shownState.contextMenu) - .isEqualTo(RoomListState.ContextMenu.Shown(summary.roomId, summary.name)) + .isEqualTo(RoomListState.ContextMenu.Shown(summary.roomId, summary.name, false)) shownState.eventSink(RoomListEvents.HideContextMenu) val hiddenState = awaitItem() diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoom.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoom.kt index 00364d4822..03c143f078 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoom.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/MatrixRoom.kt @@ -52,6 +52,9 @@ interface MatrixRoom : Closeable { val activeMemberCount: Long val joinedMemberCount: Long + /** Whether the room is a direct message. */ + val isDm: Boolean get() = isDirect && isOneToOne + val roomInfoFlow: Flow /** diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt index 0a6aa7bbaa..a644fa9f85 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/roomlist/RoomSummary.kt @@ -45,4 +45,5 @@ data class RoomSummaryDetails( val inviter: RoomMember? = null, val notificationMode: RoomNotificationMode? = null, val hasOngoingCall: Boolean = false, + val isDm: Boolean = false, ) diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt index 81507b6955..f31d9d1208 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/roomlist/RoomSummaryDetailsFactory.kt @@ -41,6 +41,7 @@ class RoomSummaryDetailsFactory(private val roomMessageFactory: RoomMessageFacto inviter = roomInfo.inviter?.let(RoomMemberMapper::map), notificationMode = roomInfo.userDefinedNotificationMode?.let(RoomNotificationSettingsMapper::mapMode), hasOngoingCall = roomInfo.hasRoomCall, + isDm = roomInfo.isDirect && roomInfo.activeMembersCount.toLong() == 2L, ) } } diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index ab311752f6..26874d4a19 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -57,6 +57,7 @@ "Join" "Learn more" "Leave" + "Leave conversation" "Leave room" "Manage account" "Manage devices" diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Day-0_1_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Day-0_1_null_6,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..00ac5ac158 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Day-0_1_null_6,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:925d6129884511860505ed7ba3cec9f2ddb50105aa1f74d9ff2dc8bbed22f8d4 +size 37706 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Night-0_2_null_6,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Night-0_2_null_6,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..c6ddfe89fc --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.leaveroom.api_LeaveRoomView_null_LeaveRoomView-Night-0_2_null_6,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a46f95f72addd2775c6dfd4dcbfe2bfb2f68eb0eaa4fe2676c3d17b285390e27 +size 32718 diff --git a/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 b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl.components_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-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_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Day-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-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_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_5_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-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_ConfirmRecoveryKeyBanner_null_ConfirmRecoveryKeyBanner-Night-3_5_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-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_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-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-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_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Day-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-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_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_8_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-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_DefaultRoomListTopBarWithIndicator_null_DefaultRoomListTopBarWithIndicator-Night-6_8_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-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_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-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-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_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Day-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-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_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_7_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-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_DefaultRoomListTopBar_null_DefaultRoomListTopBar-Night-5_7_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-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_RequestVerificationHeader_null_RequestVerificationHeader-Day-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-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_RequestVerificationHeader_null_RequestVerificationHeader-Day-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-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_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_6_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-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_RequestVerificationHeader_null_RequestVerificationHeader-Night-4_6_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-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_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Day-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-Day-8_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-Day-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-Day-8_9_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_9_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-8_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.components_RoomSummaryPlaceholderRow_null_RoomSummaryPlaceholderRow-Night-7_9_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-8_10_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_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-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.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-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-Day-9_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-Day-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-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.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-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-Day-9_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-Day-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-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.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_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-Day-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-Day-9_10_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_10_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-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.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_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-9_11_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_10_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-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.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_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-9_11_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_10_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-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.roomlist.impl.components_RoomSummaryRow_null_RoomSummaryRow-Night-8_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_10_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-9_11_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_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-Day-10_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-Day-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-Day-10_11_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_11_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-10_12_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_11_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-10_12_null,NEXUS_5,1.0,en].png diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Day-2_3_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Day-2_3_null,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..d5a64e473f --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Day-2_3_null,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1bd5f590fd30facfb007050c26aa567d568ab0d797a27986b6f88a23af76f9dc +size 14167 diff --git a/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Night-2_4_null,NEXUS_5,1.0,en].png b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Night-2_4_null,NEXUS_5,1.0,en].png new file mode 100644 index 0000000000..1d1319d036 --- /dev/null +++ b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListModalBottomSheetContentForDm_null_RoomListModalBottomSheetContentForDm-Night-2_4_null,NEXUS_5,1.0,en].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e609d908d159cffdc2a17ac8944413dbb52e5cd1ebdd2bd30057dc9865749bd6 +size 13369 diff --git a/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 b/tests/uitests/src/test/snapshots/images/ui_S_t[f.roomlist.impl_RoomListView_null_RoomListView-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.roomlist.impl_RoomListView_null_RoomListView-Day-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-Day-3_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-Day-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-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.roomlist.impl_RoomListView_null_RoomListView-Day-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-Day-3_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-Day-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-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.roomlist.impl_RoomListView_null_RoomListView-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_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-Day-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-Day-3_4_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_4_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-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.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_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-3_5_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_4_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-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.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_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-3_5_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_4_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-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.roomlist.impl_RoomListView_null_RoomListView-Night-2_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_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_4_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-3_5_null_9,NEXUS_5,1.0,en].png diff --git a/tools/localazy/config.json b/tools/localazy/config.json index 977fe6c889..1bf1e9071b 100644 --- a/tools/localazy/config.json +++ b/tools/localazy/config.json @@ -97,7 +97,8 @@ { "name" : ":features:leaveroom:api", "includeRegex" : [ - "leave_room_alert_.*" + "leave_room_alert_.*", + "leave_conversation_alert_.*" ] }, { From 22a3b64f5f42ce5ce82b9d28ae346b4264cf9f32 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Jan 2024 17:31:26 +0100 Subject: [PATCH 156/161] Fix typo --- .../android/libraries/pushstore/impl/UserPushStoreDataStore.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt index 8fe59b36c9..f7a159f6c3 100644 --- a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt +++ b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/UserPushStoreDataStore.kt @@ -40,7 +40,7 @@ class UserPushStoreDataStore( private val context: Context, userId: SessionId, ) : UserPushStore { - // Hash the sessionId to get ride of exotic chars and take only the first 16 chars. + // Hash the sessionId to get rid of exotic chars and take only the first 16 chars. // The risk of collision is not high. private val preferenceName = "push_store_${userId.value.hash().take(16)}" From 48a7573884fa8ba650744afac70bdfeb28ad9d47 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 16 Jan 2024 17:33:36 +0100 Subject: [PATCH 157/161] PushClientSecretImpl needs to be a singleton now that it observe the sessions. --- .../pushstore/impl/clientsecret/PushClientSecretImpl.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt index 25c0332b43..5f0c83b6d7 100644 --- a/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt +++ b/libraries/pushstore/impl/src/main/kotlin/io/element/android/libraries/pushstore/impl/clientsecret/PushClientSecretImpl.kt @@ -18,6 +18,7 @@ package io.element.android.libraries.pushstore.impl.clientsecret import com.squareup.anvil.annotations.ContributesBinding import io.element.android.libraries.di.AppScope +import io.element.android.libraries.di.SingleIn import io.element.android.libraries.matrix.api.core.SessionId import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecret import io.element.android.libraries.pushstore.api.clientsecret.PushClientSecretFactory @@ -26,6 +27,7 @@ import io.element.android.libraries.sessionstorage.api.observer.SessionListener import io.element.android.libraries.sessionstorage.api.observer.SessionObserver import javax.inject.Inject +@SingleIn(AppScope::class) @ContributesBinding(AppScope::class, boundType = PushClientSecret::class) class PushClientSecretImpl @Inject constructor( private val pushClientSecretFactory: PushClientSecretFactory, From 93eb90d579e66ec0cd32105c6c5e3d0b7892ecc7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:53:06 +0000 Subject: [PATCH 158/161] Update media3 to v1.2.1 --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fd2c62ed3a..88b6269467 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ constraintlayout = "2.1.4" constraintlayout_compose = "1.0.1" lifecycle = "2.7.0" activity = "1.8.2" -media3 = "1.2.0" +media3 = "1.2.1" # Compose compose_bom = "2023.10.01" From f83f31bcf34ef4c666569b8b3997f58adc1c40a9 Mon Sep 17 00:00:00 2001 From: ganfra Date: Wed, 17 Jan 2024 11:10:51 +0100 Subject: [PATCH 159/161] Setting version for the release 0.4.1 --- plugins/src/main/kotlin/Versions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index a67390c54b..8d7b845805 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -56,7 +56,7 @@ private const val versionMinor = 4 // Note: even values are reserved for regular release, odd values for hotfix release. // When creating a hotfix, you should decrease the value, since the current value // is the value for the next regular release. -private const val versionPatch = 2 +private const val versionPatch = 1 object Versions { val versionCode = 4_000_000 + versionMajor * 1_00_00 + versionMinor * 1_00 + versionPatch From 453b2c7c5dedea70ca9a8508de0f3114f82480c7 Mon Sep 17 00:00:00 2001 From: ganfra Date: Wed, 17 Jan 2024 11:20:15 +0100 Subject: [PATCH 160/161] Changelog for version 0.4.1 --- CHANGES.md | 36 +++++++++++++++++++ ...h-sending-image-with-latest-posthog.bugfix | 1 - ...pendency-analysis-plugin-where-needed.misc | 1 - changelog.d/1782.misc | 1 - changelog.d/1949.bugfix | 1 - changelog.d/1949.feature | 1 - changelog.d/1977.feature | 1 - changelog.d/2072.misc | 1 - changelog.d/2084.bugfix | 1 - changelog.d/2093.bugfix | 1 - changelog.d/2099.bugfix | 1 - changelog.d/2102.misc | 1 - changelog.d/2105.bugfix | 1 - changelog.d/2124.bugfix | 1 - changelog.d/2127.misc | 1 - changelog.d/2142.misc | 1 - changelog.d/2155.bugfix | 1 - changelog.d/2156.bugfix | 1 - changelog.d/2159.feature | 1 - changelog.d/2172.bugfix | 1 - changelog.d/2182.bugfix | 1 - changelog.d/2192.bugfix | 1 - changelog.d/2216.bugfix | 1 - changelog.d/2218.misc | 1 - 24 files changed, 36 insertions(+), 23 deletions(-) delete mode 100644 changelog.d/+crash-sending-image-with-latest-posthog.bugfix delete mode 100644 changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc delete mode 100644 changelog.d/1782.misc delete mode 100644 changelog.d/1949.bugfix delete mode 100644 changelog.d/1949.feature delete mode 100644 changelog.d/1977.feature delete mode 100644 changelog.d/2072.misc delete mode 100644 changelog.d/2084.bugfix delete mode 100644 changelog.d/2093.bugfix delete mode 100644 changelog.d/2099.bugfix delete mode 100644 changelog.d/2102.misc delete mode 100644 changelog.d/2105.bugfix delete mode 100644 changelog.d/2124.bugfix delete mode 100644 changelog.d/2127.misc delete mode 100644 changelog.d/2142.misc delete mode 100644 changelog.d/2155.bugfix delete mode 100644 changelog.d/2156.bugfix delete mode 100644 changelog.d/2159.feature delete mode 100644 changelog.d/2172.bugfix delete mode 100644 changelog.d/2182.bugfix delete mode 100644 changelog.d/2192.bugfix delete mode 100644 changelog.d/2216.bugfix delete mode 100644 changelog.d/2218.misc diff --git a/CHANGES.md b/CHANGES.md index 494b241823..3ceac1ef35 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,39 @@ +Changes in Element X v0.4.1 (2024-01-17) +======================================== + +Features ✨ +---------- + - Render m.sticker events ([#1949](https://github.com/element-hq/element-x-android/issues/1949)) + - Add support for sending images from the keyboard ([#1977](https://github.com/element-hq/element-x-android/issues/1977)) + - Added support for MSC4027 (render custom images in reactions) ([#2159](https://github.com/element-hq/element-x-android/issues/2159)) + +Bugfixes 🐛 +---------- + - Fix crash sending image with latest Posthog because of an usage of an internal Android method. ([#+crash-sending-image-with-latest-posthog](https://github.com/element-hq/element-x-android/issues/+crash-sending-image-with-latest-posthog)) + - 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 ([#1949](https://github.com/element-hq/element-x-android/issues/1949)) + - Fix room transition animation happens twice. ([#2084](https://github.com/element-hq/element-x-android/issues/2084)) + - Disable ability to send reaction if the user does not have the permission to. ([#2093](https://github.com/element-hq/element-x-android/issues/2093)) + - Trim whitespace at the end of messages to ensure we render the right content. ([#2099](https://github.com/element-hq/element-x-android/issues/2099)) + - 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. ([#2105](https://github.com/element-hq/element-x-android/issues/2105)) + - Disable rasterisation of Vector XMLs, which was causing crashes on API 23. ([#2124](https://github.com/element-hq/element-x-android/issues/2124)) + - Use `SubomposeLayout` for `ContentAvoidingLayout` to prevent wrong measurements in the layout process, leading to cut-off text messages in the timeline. ([#2155](https://github.com/element-hq/element-x-android/issues/2155)) + - Improve rendering of voice messages in the timeline in large displays ([#2156](https://github.com/element-hq/element-x-android/issues/2156)) + - Fix no indication that user list is loading when inviting to room. ([#2172](https://github.com/element-hq/element-x-android/issues/2172)) + - Hide keyboard when tapping on a message in the timeline. ([#2182](https://github.com/element-hq/element-x-android/issues/2182)) + - Mention selector gets stuck when quickly deleting the prompt. ([#2192](https://github.com/element-hq/element-x-android/issues/2192)) + - Hide verbose state events from the timeline ([#2216](https://github.com/element-hq/element-x-android/issues/2216)) + +Other changes +------------- + - Only apply `com.autonomousapps.dependency-analysis` plugin in those modules that need it. ([#+only-apply-dependency-analysis-plugin-where-needed](https://github.com/element-hq/element-x-android/issues/+only-apply-dependency-analysis-plugin-where-needed)) + - Migrate to Kover 0.7.X ([#1782](https://github.com/element-hq/element-x-android/issues/1782)) + - Remove extra logout screen. ([#2072](https://github.com/element-hq/element-x-android/issues/2072)) + - Handle `MembershipChange.NONE` rendering in the timeline. ([#2102](https://github.com/element-hq/element-x-android/issues/2102)) + - Remove extra previews for timestamp view with 'document' case ([#2127](https://github.com/element-hq/element-x-android/issues/2127)) + - Bump AGP version to 8.2.0 ([#2142](https://github.com/element-hq/element-x-android/issues/2142)) + - Replace 'leave room' text with 'leave conversation' for DMs. ([#2218](https://github.com/element-hq/element-x-android/issues/2218)) + + Changes in Element X v0.4.0 (2023-12-22) ======================================== diff --git a/changelog.d/+crash-sending-image-with-latest-posthog.bugfix b/changelog.d/+crash-sending-image-with-latest-posthog.bugfix deleted file mode 100644 index 1b299991bb..0000000000 --- a/changelog.d/+crash-sending-image-with-latest-posthog.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix crash sending image with latest Posthog because of an usage of an internal Android method. diff --git a/changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc b/changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc deleted file mode 100644 index cfa053dc90..0000000000 --- a/changelog.d/+only-apply-dependency-analysis-plugin-where-needed.misc +++ /dev/null @@ -1 +0,0 @@ -Only apply `com.autonomousapps.dependency-analysis` plugin in those modules that need it. diff --git a/changelog.d/1782.misc b/changelog.d/1782.misc deleted file mode 100644 index 2e716795d9..0000000000 --- a/changelog.d/1782.misc +++ /dev/null @@ -1 +0,0 @@ -Migrate to Kover 0.7.X diff --git a/changelog.d/1949.bugfix b/changelog.d/1949.bugfix deleted file mode 100644 index a49aff7545..0000000000 --- a/changelog.d/1949.bugfix +++ /dev/null @@ -1 +0,0 @@ -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/1949.feature b/changelog.d/1949.feature deleted file mode 100644 index e5ff7b03a7..0000000000 --- a/changelog.d/1949.feature +++ /dev/null @@ -1 +0,0 @@ -Render m.sticker events diff --git a/changelog.d/1977.feature b/changelog.d/1977.feature deleted file mode 100644 index 61ae78b082..0000000000 --- a/changelog.d/1977.feature +++ /dev/null @@ -1 +0,0 @@ -Add support for sending images from the keyboard diff --git a/changelog.d/2072.misc b/changelog.d/2072.misc deleted file mode 100644 index 7ae9d0be44..0000000000 --- a/changelog.d/2072.misc +++ /dev/null @@ -1 +0,0 @@ - Remove extra logout screen. diff --git a/changelog.d/2084.bugfix b/changelog.d/2084.bugfix deleted file mode 100644 index 8fb66aec73..0000000000 --- a/changelog.d/2084.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix room transition animation happens twice. diff --git a/changelog.d/2093.bugfix b/changelog.d/2093.bugfix deleted file mode 100644 index 59a6aa9b2a..0000000000 --- a/changelog.d/2093.bugfix +++ /dev/null @@ -1 +0,0 @@ -Disable ability to send reaction if the user does not have the permission to. diff --git a/changelog.d/2099.bugfix b/changelog.d/2099.bugfix deleted file mode 100644 index f80120ae0d..0000000000 --- a/changelog.d/2099.bugfix +++ /dev/null @@ -1 +0,0 @@ -Trim whitespace at the end of messages to ensure we render the right content. diff --git a/changelog.d/2102.misc b/changelog.d/2102.misc deleted file mode 100644 index 87c258ef70..0000000000 --- a/changelog.d/2102.misc +++ /dev/null @@ -1 +0,0 @@ -Handle `MembershipChange.NONE` rendering in the timeline. diff --git a/changelog.d/2105.bugfix b/changelog.d/2105.bugfix deleted file mode 100644 index 337b192aad..0000000000 --- a/changelog.d/2105.bugfix +++ /dev/null @@ -1 +0,0 @@ -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/2124.bugfix b/changelog.d/2124.bugfix deleted file mode 100644 index 1b81e44093..0000000000 --- a/changelog.d/2124.bugfix +++ /dev/null @@ -1 +0,0 @@ -Disable rasterisation of Vector XMLs, which was causing crashes on API 23. diff --git a/changelog.d/2127.misc b/changelog.d/2127.misc deleted file mode 100644 index dfebf620ac..0000000000 --- a/changelog.d/2127.misc +++ /dev/null @@ -1 +0,0 @@ -Remove extra previews for timestamp view with 'document' case diff --git a/changelog.d/2142.misc b/changelog.d/2142.misc deleted file mode 100644 index 566fa41040..0000000000 --- a/changelog.d/2142.misc +++ /dev/null @@ -1 +0,0 @@ -Bump AGP version to 8.2.0 diff --git a/changelog.d/2155.bugfix b/changelog.d/2155.bugfix deleted file mode 100644 index cc868cdaee..0000000000 --- a/changelog.d/2155.bugfix +++ /dev/null @@ -1 +0,0 @@ -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/2156.bugfix b/changelog.d/2156.bugfix deleted file mode 100644 index 45c7d882c6..0000000000 --- a/changelog.d/2156.bugfix +++ /dev/null @@ -1 +0,0 @@ -Improve rendering of voice messages in the timeline in large displays diff --git a/changelog.d/2159.feature b/changelog.d/2159.feature deleted file mode 100644 index 5adbf5595f..0000000000 --- a/changelog.d/2159.feature +++ /dev/null @@ -1 +0,0 @@ -Added support for MSC4027 (render custom images in reactions) diff --git a/changelog.d/2172.bugfix b/changelog.d/2172.bugfix deleted file mode 100644 index 14f34666b9..0000000000 --- a/changelog.d/2172.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix no indication that user list is loading when inviting to room. diff --git a/changelog.d/2182.bugfix b/changelog.d/2182.bugfix deleted file mode 100644 index 427eb3b402..0000000000 --- a/changelog.d/2182.bugfix +++ /dev/null @@ -1 +0,0 @@ -Hide keyboard when tapping on a message in the timeline. diff --git a/changelog.d/2192.bugfix b/changelog.d/2192.bugfix deleted file mode 100644 index 0138f3508c..0000000000 --- a/changelog.d/2192.bugfix +++ /dev/null @@ -1 +0,0 @@ -Mention selector gets stuck when quickly deleting the prompt. diff --git a/changelog.d/2216.bugfix b/changelog.d/2216.bugfix deleted file mode 100644 index a47f2976b5..0000000000 --- a/changelog.d/2216.bugfix +++ /dev/null @@ -1 +0,0 @@ -Hide verbose state events from the timeline diff --git a/changelog.d/2218.misc b/changelog.d/2218.misc deleted file mode 100644 index 4f0e42d950..0000000000 --- a/changelog.d/2218.misc +++ /dev/null @@ -1 +0,0 @@ -Replace 'leave room' text with 'leave conversation' for DMs. From 5584fd2fb0889b4b1262d06b8b281c05ecfc485f Mon Sep 17 00:00:00 2001 From: ganfra Date: Wed, 17 Jan 2024 11:21:21 +0100 Subject: [PATCH 161/161] Adding fastlane file for version 0.4.1 --- fastlane/metadata/android/en-US/changelogs/40004010.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fastlane/metadata/android/en-US/changelogs/40004010.txt diff --git a/fastlane/metadata/android/en-US/changelogs/40004010.txt b/fastlane/metadata/android/en-US/changelogs/40004010.txt new file mode 100644 index 0000000000..cccc7477c2 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40004010.txt @@ -0,0 +1,2 @@ +Main changes in this version: Mainly bug fixes. +Full changelog: https://github.com/element-hq/element-x-android/releases