From 2cb0060f96a61178eab5faf66469a62956935faa Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Tue, 14 Nov 2023 17:06:19 +0100 Subject: [PATCH] Add a View to show the beginning of the timeline (parity with iOS) --- changelog.d/1801.misc | 1 + .../features/messages/impl/MessagesView.kt | 1 + .../impl/timeline/TimelineStateProvider.kt | 6 +- .../messages/impl/timeline/TimelineView.kt | 8 +++ .../virtual/TimelineItemRoomBeginningView.kt | 72 +++++++++++++++++++ .../src/main/res/values-cs/translations.xml | 2 + .../src/main/res/values-de/translations.xml | 2 + .../src/main/res/values-es/translations.xml | 2 + .../src/main/res/values-fr/translations.xml | 2 + .../src/main/res/values-it/translations.xml | 2 + .../src/main/res/values-ro/translations.xml | 2 + .../src/main/res/values-ru/translations.xml | 2 + .../src/main/res/values-sk/translations.xml | 2 + .../impl/src/main/res/values/localazy.xml | 3 + .../impl/src/main/res/values/localazy.xml | 1 + .../impl/src/main/res/values/localazy.xml | 1 + .../src/main/res/values-cs/translations.xml | 2 + .../matrix/api/timeline/MatrixTimeline.kt | 3 +- .../impl/timeline/RustMatrixTimeline.kt | 10 ++- .../TimelineEncryptedHistoryPostProcessor.kt | 3 +- ...melineEncryptedHistoryPostProcessorTest.kt | 24 ++++++- .../test/timeline/FakeMatrixTimeline.kt | 6 +- .../src/main/res/values-cs/translations.xml | 4 ++ .../src/main/res/values-cs/translations.xml | 6 +- .../src/main/res/values-de/translations.xml | 2 - .../src/main/res/values-es/translations.xml | 2 - .../src/main/res/values-fr/translations.xml | 2 - .../src/main/res/values-it/translations.xml | 2 - .../src/main/res/values-ro/translations.xml | 2 - .../src/main/res/values-ru/translations.xml | 2 - .../src/main/res/values-sk/translations.xml | 2 - .../src/main/res/values/localazy.xml | 2 - tools/localazy/config.json | 1 + 33 files changed, 156 insertions(+), 28 deletions(-) create mode 100644 changelog.d/1801.misc create mode 100644 features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt diff --git a/changelog.d/1801.misc b/changelog.d/1801.misc new file mode 100644 index 0000000000..798f2ae60f --- /dev/null +++ b/changelog.d/1801.misc @@ -0,0 +1 @@ +Add item "This is the beginning of..." at the beginning of the timeline. 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 9c8a9dab8a..c9063f2a79 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 @@ -373,6 +373,7 @@ private fun MessagesViewContent( TimelineView( modifier = Modifier.padding(paddingValues), state = state.timelineState, + roomName = state.roomName.dataOrNull(), onMessageClicked = onMessageClicked, onMessageLongClicked = onMessageLongClicked, onUserDataClicked = onUserDataClicked, 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 0e1795117f..affb77e88a 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 @@ -43,7 +43,11 @@ import kotlin.random.Random fun aTimelineState(timelineItems: ImmutableList = persistentListOf()) = TimelineState( timelineItems = timelineItems, - paginationState = MatrixTimeline.PaginationState(isBackPaginating = false, hasMoreToLoadBackwards = true), + paginationState = MatrixTimeline.PaginationState( + isBackPaginating = false, + hasMoreToLoadBackwards = true, + beginningOfRoomReached = false, + ), highlightedEventId = null, userHasPermissionToSendMessage = true, hasNewItems = false, 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 6d1929f825..5b6b8c6d1d 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 @@ -59,6 +59,7 @@ import io.element.android.features.messages.impl.timeline.components.TimelineIte import io.element.android.features.messages.impl.timeline.components.TimelineItemStateEventRow import io.element.android.features.messages.impl.timeline.components.TimelineItemVirtualRow import io.element.android.features.messages.impl.timeline.components.group.GroupHeaderView +import io.element.android.features.messages.impl.timeline.components.virtual.TimelineItemRoomBeginningView import io.element.android.features.messages.impl.timeline.components.virtual.TimelineLoadingMoreIndicator import io.element.android.features.messages.impl.timeline.di.LocalTimelineItemPresenterFactories import io.element.android.features.messages.impl.timeline.di.aFakeTimelineItemPresenterFactories @@ -82,6 +83,7 @@ import kotlinx.coroutines.launch @Composable fun TimelineView( state: TimelineState, + roomName: String?, onUserDataClicked: (UserId) -> Unit, onMessageClicked: (TimelineItem.Event) -> Unit, onMessageLongClicked: (TimelineItem.Event) -> Unit, @@ -148,6 +150,11 @@ fun TimelineView( } } } + if (state.paginationState.beginningOfRoomReached) { + item(contentType = "BeginningOfRoomReached") { + TimelineItemRoomBeginningView(roomName = roomName) + } + } } TimelineScrollHelper( @@ -346,6 +353,7 @@ internal fun TimelineViewPreview( ) { TimelineView( state = aTimelineState(timelineItems), + roomName = null, onMessageClicked = {}, onTimestampClicked = {}, onUserDataClicked = {}, 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 new file mode 100644 index 0000000000..f400c214a3 --- /dev/null +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt @@ -0,0 +1,72 @@ +/* + * 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.virtual + +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.Alignment +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.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.libraries.theme.ElementTheme + +@Composable +fun TimelineItemRoomBeginningView( + roomName: String?, + modifier: Modifier = Modifier +) { + Box( + modifier = modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 8.dp), + contentAlignment = Alignment.Center, + ) { + val text = if (roomName == null) { + stringResource(id = R.string.room_timeline_beginning_of_room_no_name) + } else { + stringResource(id = R.string.room_timeline_beginning_of_room, roomName) + } + Text( + color = MaterialTheme.colorScheme.secondary, + style = ElementTheme.typography.fontBodyMdRegular, + text = text, + textAlign = TextAlign.Center, + ) + } +} + +@PreviewsDayNight +@Composable +internal fun TimelineItemRoomBeginningViewPreview() = ElementPreview { + Column { + TimelineItemRoomBeginningView( + roomName = null, + ) + TimelineItemRoomBeginningView( + roomName = "Room Name", + ) + } +} diff --git a/features/messages/impl/src/main/res/values-cs/translations.xml b/features/messages/impl/src/main/res/values-cs/translations.xml index a59dcdca59..4d5ce6f4b6 100644 --- a/features/messages/impl/src/main/res/values-cs/translations.xml +++ b/features/messages/impl/src/main/res/values-cs/translations.xml @@ -15,6 +15,8 @@ "Tato zpráva bude nahlášena správci vašeho domovského serveru. Nebude si moci přečíst žádné šifrované zprávy." "Důvod nahlášení tohoto obsahu" + "Toto je začátek %1$s." + "Toto je začátek této konverzace." "Informujte celou místnost" "Zaškrtněte, pokud chcete skrýt všechny aktuální a budoucí zprávy od tohoto uživatele" "Fotoaparát" 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 cb446ff6b4..0766f80ee0 100644 --- a/features/messages/impl/src/main/res/values-de/translations.xml +++ b/features/messages/impl/src/main/res/values-de/translations.xml @@ -14,6 +14,8 @@ "Diese Meldung wird an den Administrator deines Homeservers weitergeleitet. Dieser kann keine verschlüsselten Nachrichten lesen." "Grund für die Meldung dieses Inhalts" + "Dies ist der Anfang von %1$s." + "Dies ist der Anfang dieses Gesprächs." "Prüfe, ob du alle aktuellen und zukünftigen Nachrichten dieses Benutzers ausblenden möchtest" "Kamera" "Foto machen" 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 6a0b285638..fec3f48ccf 100644 --- a/features/messages/impl/src/main/res/values-es/translations.xml +++ b/features/messages/impl/src/main/res/values-es/translations.xml @@ -14,6 +14,8 @@ "Este mensaje se notificará al administrador de su homeserver. No podrán leer ningún mensaje cifrado." "Motivo para denunciar este contenido" + "Este es el principio de %1$s." + "Este es el principio de esta conversación." "Marque si quieres ocultar todos los mensajes actuales y futuros de este usuario" "Bloquear usuario" diff --git a/features/messages/impl/src/main/res/values-fr/translations.xml b/features/messages/impl/src/main/res/values-fr/translations.xml index 8c3babbcf8..0cbd8b7b66 100644 --- a/features/messages/impl/src/main/res/values-fr/translations.xml +++ b/features/messages/impl/src/main/res/values-fr/translations.xml @@ -14,6 +14,8 @@ "Ce message sera signalé à l’administrateur de votre serveur d’accueil. Il ne pourra lire aucun message chiffré." "Raison du signalement de ce contenu" + "Ceci est le début de %1$s." + "Ceci est le début de cette conversation." "Notifier tout le salon" "Cochez si vous souhaitez masquer tous les messages actuels et futurs de cet utilisateur." "Appareil photo" diff --git a/features/messages/impl/src/main/res/values-it/translations.xml b/features/messages/impl/src/main/res/values-it/translations.xml index 735ecbe913..acafb0e8d6 100644 --- a/features/messages/impl/src/main/res/values-it/translations.xml +++ b/features/messages/impl/src/main/res/values-it/translations.xml @@ -14,6 +14,8 @@ "Questo messaggio verrà segnalato all\'amministratore dell\'homeserver. Questi non sarà in grado di leggere i messaggi criptati." "Motivo della segnalazione di questo contenuto" + "Questo è l\'inizio di %1$s." + "Questo è l\'inizio della conversazione." "Seleziona se vuoi nascondere tutti i messaggi attuali e futuri di questo utente" "Blocca utente" diff --git a/features/messages/impl/src/main/res/values-ro/translations.xml b/features/messages/impl/src/main/res/values-ro/translations.xml index b23e524d77..98eec0cc69 100644 --- a/features/messages/impl/src/main/res/values-ro/translations.xml +++ b/features/messages/impl/src/main/res/values-ro/translations.xml @@ -15,6 +15,8 @@ "Acest mesaj va fi raportat administratorilor homeserver-ului tau. Ei nu vor putea citi niciun mesaj criptat." "Motivul raportării acestui conținut" + "Acesta este începutul conversației %1$s." + "Acesta este începutul acestei conversații." "Confirmați că doriți să ascundeți toate mesajele curente și viitoare de la acest utilizator" "Cameră foto" "Faceți o fotografie" diff --git a/features/messages/impl/src/main/res/values-ru/translations.xml b/features/messages/impl/src/main/res/values-ru/translations.xml index 7fc6a14494..76b0c9cfe1 100644 --- a/features/messages/impl/src/main/res/values-ru/translations.xml +++ b/features/messages/impl/src/main/res/values-ru/translations.xml @@ -15,6 +15,8 @@ "Это сообщение будет передано администратору вашего домашнего сервера. Они не смогут прочитать зашифрованные сообщения." "Причина, по которой вы пожаловались на этот контент" + "Это начало %1$s." + "Это начало разговора." "Уведомить всю комнату" "Отметьте, хотите ли вы скрыть все текущие и будущие сообщения от этого пользователя" "Камера" diff --git a/features/messages/impl/src/main/res/values-sk/translations.xml b/features/messages/impl/src/main/res/values-sk/translations.xml index 8c20bcf252..3d81d4eabc 100644 --- a/features/messages/impl/src/main/res/values-sk/translations.xml +++ b/features/messages/impl/src/main/res/values-sk/translations.xml @@ -15,6 +15,8 @@ "Táto správa bude nahlásená správcovi vášho domovského servera. Nebude môcť prečítať žiadne šifrované správy." "Dôvod nahlásenia tohto obsahu" + "Toto je začiatok %1$s." + "Toto je začiatok tejto konverzácie." "Informovať celú miestnosť" "Označte, či chcete skryť všetky aktuálne a budúce správy od tohto používateľa" "Kamera" diff --git a/features/messages/impl/src/main/res/values/localazy.xml b/features/messages/impl/src/main/res/values/localazy.xml index cbc5f127e9..b95a341b36 100644 --- a/features/messages/impl/src/main/res/values/localazy.xml +++ b/features/messages/impl/src/main/res/values/localazy.xml @@ -14,6 +14,8 @@ "This message will be reported to your homeserver’s administrator. They will not be able to read any encrypted messages." "Reason for reporting this content" + "This is the beginning of %1$s." + "This is the beginning of this conversation." "Notify the whole room" "Check if you want to hide all current and future messages from this user" "Camera" @@ -41,6 +43,7 @@ "An error occurred while loading notification settings." "Failed restoring the default mode, please try again." "Failed setting the mode, please try again." + "Your homeserver does not support this option in encrypted rooms, you won\'t get notified in this room." "All messages" "In this room, notify me for" "Show less" diff --git a/features/preferences/impl/src/main/res/values/localazy.xml b/features/preferences/impl/src/main/res/values/localazy.xml index 153c64f661..9cb6aaf698 100644 --- a/features/preferences/impl/src/main/res/values/localazy.xml +++ b/features/preferences/impl/src/main/res/values/localazy.xml @@ -28,6 +28,7 @@ If you proceed, some of your settings may change." "Enable notifications on this device" "The configuration has not been corrected, please try again." "Group chats" + "Your homeserver does not support this option in encrypted rooms, you may not get notified in some rooms." "Mentions" "All" "Mentions" diff --git a/features/roomdetails/impl/src/main/res/values/localazy.xml b/features/roomdetails/impl/src/main/res/values/localazy.xml index 70c31ac65e..5363c6a78e 100644 --- a/features/roomdetails/impl/src/main/res/values/localazy.xml +++ b/features/roomdetails/impl/src/main/res/values/localazy.xml @@ -35,6 +35,7 @@ "An error occurred while loading notification settings." "Failed restoring the default mode, please try again." "Failed setting the mode, please try again." + "Your homeserver does not support this option in encrypted rooms, you won\'t get notified in this room." "All messages" "In this room, notify me for" "Block" diff --git a/features/securebackup/impl/src/main/res/values-cs/translations.xml b/features/securebackup/impl/src/main/res/values-cs/translations.xml index 5ae1d4b0ec..a34d77aeee 100644 --- a/features/securebackup/impl/src/main/res/values-cs/translations.xml +++ b/features/securebackup/impl/src/main/res/values-cs/translations.xml @@ -22,6 +22,8 @@ "Klíč pro obnovení byl změněn" "Změnit klíč pro obnovení?" "Zadejte klíč pro obnovení a potvrďte přístup k záloze chatu." + "Zkuste prosím znovu potvrdit přístup k záloze chatu." + "Nesprávný klíč pro obnovení" "Zadejte kód o délce 48 znaků." "Zadejte…" "Klíč pro obnovení potvrzen" diff --git a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimeline.kt b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimeline.kt index af411216e5..5fa55c357f 100644 --- a/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimeline.kt +++ b/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimeline.kt @@ -24,7 +24,8 @@ interface MatrixTimeline { data class PaginationState( val isBackPaginating: Boolean, - val hasMoreToLoadBackwards: Boolean + val hasMoreToLoadBackwards: Boolean, + val beginningOfRoomReached: Boolean, ) { val canBackPaginate = !isBackPaginating && hasMoreToLoadBackwards } 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 53ae41d887..85e6905f0a 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 @@ -72,7 +72,11 @@ class RustMatrixTimeline( MutableStateFlow(emptyList()) private val _paginationState = MutableStateFlow( - MatrixTimeline.PaginationState(hasMoreToLoadBackwards = true, isBackPaginating = false) + MatrixTimeline.PaginationState( + hasMoreToLoadBackwards = true, + isBackPaginating = false, + beginningOfRoomReached = false, + ) ) private val encryptedHistoryPostProcessor = TimelineEncryptedHistoryPostProcessor( @@ -155,6 +159,7 @@ class RustMatrixTimeline( return@getAndUpdate currentPaginationState.copy( isBackPaginating = false, hasMoreToLoadBackwards = false, + beginningOfRoomReached = false, ) } when (status) { @@ -173,7 +178,8 @@ class RustMatrixTimeline( BackPaginationStatus.TIMELINE_START_REACHED -> { currentPaginationState.copy( isBackPaginating = false, - hasMoreToLoadBackwards = false + hasMoreToLoadBackwards = false, + beginningOfRoomReached = true, ) } } diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessor.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessor.kt index 60de981780..25241ff3e1 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessor.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessor.kt @@ -45,7 +45,8 @@ class TimelineEncryptedHistoryPostProcessor( paginationStateFlow.getAndUpdate { it.copy( isBackPaginating = false, - hasMoreToLoadBackwards = false + hasMoreToLoadBackwards = false, + beginningOfRoomReached = false, ) } } diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt index d3af9a5670..cf5c3682c2 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt @@ -98,7 +98,13 @@ class TimelineEncryptedHistoryPostProcessorTest { @Test fun `given a list with several with lower or equal timestamps than lastLoginTimestamp, they're replaced and the user can't back paginate`() = runTest { - val paginationStateFlow = MutableStateFlow(MatrixTimeline.PaginationState(hasMoreToLoadBackwards = true, isBackPaginating = false)) + val paginationStateFlow = MutableStateFlow( + MatrixTimeline.PaginationState( + hasMoreToLoadBackwards = true, + isBackPaginating = false, + beginningOfRoomReached = false, + ) + ) val processor = createPostProcessor(paginationStateFlow = paginationStateFlow) val items = listOf( MatrixTimelineItem.Event(0L, anEventTimelineItem(timestamp = defaultLastLoginTimestamp.time - 1)), @@ -111,7 +117,13 @@ class TimelineEncryptedHistoryPostProcessorTest { MatrixTimelineItem.Event(0L, anEventTimelineItem(timestamp = defaultLastLoginTimestamp.time + 1)) ) ) - assertThat(paginationStateFlow.value).isEqualTo(MatrixTimeline.PaginationState(hasMoreToLoadBackwards = false, isBackPaginating = false)) + assertThat(paginationStateFlow.value).isEqualTo( + MatrixTimeline.PaginationState( + hasMoreToLoadBackwards = false, + isBackPaginating = false, + beginningOfRoomReached = false, + ) + ) } private fun TestScope.createPostProcessor( @@ -119,7 +131,13 @@ class TimelineEncryptedHistoryPostProcessorTest { isRoomEncrypted: Boolean = true, isKeyBackupEnabled: Boolean = false, paginationStateFlow: MutableStateFlow = - MutableStateFlow(MatrixTimeline.PaginationState(hasMoreToLoadBackwards = true, isBackPaginating = false)) + MutableStateFlow( + MatrixTimeline.PaginationState( + hasMoreToLoadBackwards = true, + isBackPaginating = false, + beginningOfRoomReached = false, + ) + ) ) = TimelineEncryptedHistoryPostProcessor( lastLoginTimestamp = lastLoginTimestamp, isRoomEncrypted = isRoomEncrypted, diff --git a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/FakeMatrixTimeline.kt b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/FakeMatrixTimeline.kt index 73bc5fb597..6cf6f05cbe 100644 --- a/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/FakeMatrixTimeline.kt +++ b/libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/FakeMatrixTimeline.kt @@ -29,7 +29,11 @@ import kotlinx.coroutines.flow.getAndUpdate class FakeMatrixTimeline( initialTimelineItems: List = emptyList(), - initialPaginationState: MatrixTimeline.PaginationState = MatrixTimeline.PaginationState(hasMoreToLoadBackwards = true, isBackPaginating = false) + initialPaginationState: MatrixTimeline.PaginationState = MatrixTimeline.PaginationState( + hasMoreToLoadBackwards = true, + isBackPaginating = false, + beginningOfRoomReached = false, + ) ) : MatrixTimeline { private val _paginationState: MutableStateFlow = MutableStateFlow(initialPaginationState) diff --git a/libraries/push/impl/src/main/res/values-cs/translations.xml b/libraries/push/impl/src/main/res/values-cs/translations.xml index 84525a427e..b9488e008b 100644 --- a/libraries/push/impl/src/main/res/values-cs/translations.xml +++ b/libraries/push/impl/src/main/res/values-cs/translations.xml @@ -8,6 +8,10 @@ "Vstoupit" "Odmítnout" "Vás pozval(a) do chatu" + "%1$s vás zmínil(a). +%2$s" + "Byli jste zmíněni. +%1$s" "Nové zprávy" "Reagoval(a) s %1$s" "Označit jako přečtené" diff --git a/libraries/ui-strings/src/main/res/values-cs/translations.xml b/libraries/ui-strings/src/main/res/values-cs/translations.xml index ddb7b09671..4bcdb258a6 100644 --- a/libraries/ui-strings/src/main/res/values-cs/translations.xml +++ b/libraries/ui-strings/src/main/res/values-cs/translations.xml @@ -13,7 +13,7 @@ "Zobrazit heslo" "Zahájit hovor" "Uživatelské menu" - "Nahrajte hlasovou zprávu. Dvojitě klepněte a podržte pro záznam. Uvolněním ukončíte nahrávání." + "Nahrajte hlasovou zprávu." "Zastavit nahrávání" "Přijmout" "Přidat na časovou osu" @@ -116,6 +116,7 @@ "Odkaz zkopírován do schránky" "Načítání…" "Zpráva" + "Akce zprávy" "Rozložení zprávy" "Zpráva byla odstraněna" "Moderní" @@ -176,6 +177,7 @@ "Čekání na dešifrovací klíč" "Opravdu chcete ukončit toto hlasování?" "Hlasování: %1$s" + "Ověřit zařízení" "Potvrzení" "Upozornění" "Vytvoření trvalého odkazu se nezdařilo" @@ -207,8 +209,6 @@ "%d hlasů" "Zatřeste zařízením pro nahlášení chyby" - "Toto je začátek %1$s." - "Toto je začátek této konverzace." "Nové" "Výběr média se nezdařil, zkuste to prosím znovu." "Nahrání média se nezdařilo, zkuste to prosím znovu." 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 2fa0c20ff5..09fdba6432 100644 --- a/libraries/ui-strings/src/main/res/values-de/translations.xml +++ b/libraries/ui-strings/src/main/res/values-de/translations.xml @@ -175,8 +175,6 @@ "%d Stimmen" "Schüttel heftig zum Melden von Fehlern" - "Dies ist der Anfang von %1$s." - "Dies ist der Anfang dieses Gesprächs." "Neu" "Medienauswahl fehlgeschlagen, bitte versuche es erneut." "Fehler beim Verarbeiten des hochgeladenen Mediums. Bitte versuche es erneut." 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 f901b48cb3..9b2c35a63b 100644 --- a/libraries/ui-strings/src/main/res/values-es/translations.xml +++ b/libraries/ui-strings/src/main/res/values-es/translations.xml @@ -105,8 +105,6 @@ "%1$d miembros" "Agitar con fuerza para informar de un error" - "Este es el principio de %1$s." - "Este es el principio de esta conversación." "Nuevos" "Versión: %1$s (%2$s)" "es" diff --git a/libraries/ui-strings/src/main/res/values-fr/translations.xml b/libraries/ui-strings/src/main/res/values-fr/translations.xml index cc0adae38d..39f2c116d2 100644 --- a/libraries/ui-strings/src/main/res/values-fr/translations.xml +++ b/libraries/ui-strings/src/main/res/values-fr/translations.xml @@ -202,8 +202,6 @@ "%d votes" "Rageshake pour signaler un problème" - "Ceci est le début de %1$s." - "Ceci est le début de cette conversation." "Nouveau" "Échec de la sélection du média, veuillez réessayer." "Échec du traitement des médias à télécharger, veuillez réessayer." 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 e8e35c284e..a49e6c7d37 100644 --- a/libraries/ui-strings/src/main/res/values-it/translations.xml +++ b/libraries/ui-strings/src/main/res/values-it/translations.xml @@ -105,8 +105,6 @@ "%1$d membri" "Scuoti per segnalare un problema" - "Questo è l\'inizio di %1$s." - "Questo è l\'inizio della conversazione." "Nuovo" "Versione: %1$s (%2$s)" "it" diff --git a/libraries/ui-strings/src/main/res/values-ro/translations.xml b/libraries/ui-strings/src/main/res/values-ro/translations.xml index 863d4cd097..7fbb5a322a 100644 --- a/libraries/ui-strings/src/main/res/values-ro/translations.xml +++ b/libraries/ui-strings/src/main/res/values-ro/translations.xml @@ -159,8 +159,6 @@ "%d voturi" "Rageshake pentru a raporta erori" - "Acesta este începutul conversației %1$s." - "Acesta este începutul acestei conversații." "Nou" "Selectarea fișierelor media a eșuat, încercați din nou." "Procesarea datelor media a eșuat, vă rugăm să încercați din nou." 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 87f4d74201..5b105c8372 100644 --- a/libraries/ui-strings/src/main/res/values-ru/translations.xml +++ b/libraries/ui-strings/src/main/res/values-ru/translations.xml @@ -209,8 +209,6 @@ "%d голосов" "Rageshake сообщит об ошибке" - "Это начало %1$s." - "Это начало разговора." "Новый" "Не удалось выбрать носитель, попробуйте еще раз." "Не удалось обработать медиафайл для загрузки, попробуйте еще раз." 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 4f38c2fb8b..f7a28ddc50 100644 --- a/libraries/ui-strings/src/main/res/values-sk/translations.xml +++ b/libraries/ui-strings/src/main/res/values-sk/translations.xml @@ -209,8 +209,6 @@ "%d hlasov" "Zúrivo potriasť pre nahlásenie chyby" - "Toto je začiatok %1$s." - "Toto je začiatok tejto konverzácie." "Nové" "Nepodarilo sa vybrať médium, skúste to prosím znova." "Nepodarilo sa spracovať médiá na odoslanie, skúste to prosím znova." diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 156b5e5b17..63909fe9ca 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -206,8 +206,6 @@ "%d votes" "Rageshake to report bug" - "This is the beginning of %1$s." - "This is the beginning of this conversation." "New" "Failed selecting media, please try again." "Failed processing media to upload, please try again." diff --git a/tools/localazy/config.json b/tools/localazy/config.json index e95892ac52..95cf40d76f 100644 --- a/tools/localazy/config.json +++ b/tools/localazy/config.json @@ -121,6 +121,7 @@ { "name": ":features:messages:impl", "includeRegex": [ + "room_timeline_beginning_.*", "screen_room_.*", "screen\\.room\\..*", "screen_dm_details_.*",