Browse Source

Add a View to show the beginning of the timeline (parity with iOS)

pull/1801/head
Benoit Marty 10 months ago
parent
commit
2cb0060f96
  1. 1
      changelog.d/1801.misc
  2. 1
      features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt
  3. 6
      features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt
  4. 8
      features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt
  5. 72
      features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt
  6. 2
      features/messages/impl/src/main/res/values-cs/translations.xml
  7. 2
      features/messages/impl/src/main/res/values-de/translations.xml
  8. 2
      features/messages/impl/src/main/res/values-es/translations.xml
  9. 2
      features/messages/impl/src/main/res/values-fr/translations.xml
  10. 2
      features/messages/impl/src/main/res/values-it/translations.xml
  11. 2
      features/messages/impl/src/main/res/values-ro/translations.xml
  12. 2
      features/messages/impl/src/main/res/values-ru/translations.xml
  13. 2
      features/messages/impl/src/main/res/values-sk/translations.xml
  14. 3
      features/messages/impl/src/main/res/values/localazy.xml
  15. 1
      features/preferences/impl/src/main/res/values/localazy.xml
  16. 1
      features/roomdetails/impl/src/main/res/values/localazy.xml
  17. 2
      features/securebackup/impl/src/main/res/values-cs/translations.xml
  18. 3
      libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimeline.kt
  19. 10
      libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt
  20. 3
      libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessor.kt
  21. 24
      libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt
  22. 6
      libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/FakeMatrixTimeline.kt
  23. 4
      libraries/push/impl/src/main/res/values-cs/translations.xml
  24. 6
      libraries/ui-strings/src/main/res/values-cs/translations.xml
  25. 2
      libraries/ui-strings/src/main/res/values-de/translations.xml
  26. 2
      libraries/ui-strings/src/main/res/values-es/translations.xml
  27. 2
      libraries/ui-strings/src/main/res/values-fr/translations.xml
  28. 2
      libraries/ui-strings/src/main/res/values-it/translations.xml
  29. 2
      libraries/ui-strings/src/main/res/values-ro/translations.xml
  30. 2
      libraries/ui-strings/src/main/res/values-ru/translations.xml
  31. 2
      libraries/ui-strings/src/main/res/values-sk/translations.xml
  32. 2
      libraries/ui-strings/src/main/res/values/localazy.xml
  33. 1
      tools/localazy/config.json

1
changelog.d/1801.misc

@ -0,0 +1 @@ @@ -0,0 +1 @@
Add item "This is the beginning of..." at the beginning of the timeline.

1
features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesView.kt

@ -373,6 +373,7 @@ private fun MessagesViewContent( @@ -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,

6
features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineStateProvider.kt

@ -43,7 +43,11 @@ import kotlin.random.Random @@ -43,7 +43,11 @@ import kotlin.random.Random
fun aTimelineState(timelineItems: ImmutableList<TimelineItem> = 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,

8
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 @@ -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 @@ -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( @@ -148,6 +150,11 @@ fun TimelineView(
}
}
}
if (state.paginationState.beginningOfRoomReached) {
item(contentType = "BeginningOfRoomReached") {
TimelineItemRoomBeginningView(roomName = roomName)
}
}
}
TimelineScrollHelper(
@ -346,6 +353,7 @@ internal fun TimelineViewPreview( @@ -346,6 +353,7 @@ internal fun TimelineViewPreview(
) {
TimelineView(
state = aTimelineState(timelineItems),
roomName = null,
onMessageClicked = {},
onTimestampClicked = {},
onUserDataClicked = {},

72
features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/components/virtual/TimelineItemRoomBeginningView.kt

@ -0,0 +1,72 @@ @@ -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",
)
}
}

2
features/messages/impl/src/main/res/values-cs/translations.xml

@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
</plurals>
<string name="report_content_explanation">"Tato zpráva bude nahlášena správci vašeho domovského serveru. Nebude si moci přečíst žádné šifrované zprávy."</string>
<string name="report_content_hint">"Důvod nahlášení tohoto obsahu"</string>
<string name="room_timeline_beginning_of_room">"Toto je začátek %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Toto je začátek této konverzace."</string>
<string name="screen_room_mentions_at_room_subtitle">"Informujte celou místnost"</string>
<string name="screen_report_content_block_user_hint">"Zaškrtněte, pokud chcete skrýt všechny aktuální a budoucí zprávy od tohoto uživatele"</string>
<string name="screen_room_attachment_source_camera">"Fotoaparát"</string>

2
features/messages/impl/src/main/res/values-de/translations.xml

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
</plurals>
<string name="report_content_explanation">"Diese Meldung wird an den Administrator deines Homeservers weitergeleitet. Dieser kann keine verschlüsselten Nachrichten lesen."</string>
<string name="report_content_hint">"Grund für die Meldung dieses Inhalts"</string>
<string name="room_timeline_beginning_of_room">"Dies ist der Anfang von %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Dies ist der Anfang dieses Gesprächs."</string>
<string name="screen_report_content_block_user_hint">"Prüfe, ob du alle aktuellen und zukünftigen Nachrichten dieses Benutzers ausblenden möchtest"</string>
<string name="screen_room_attachment_source_camera">"Kamera"</string>
<string name="screen_room_attachment_source_camera_photo">"Foto machen"</string>

2
features/messages/impl/src/main/res/values-es/translations.xml

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
</plurals>
<string name="report_content_explanation">"Este mensaje se notificará al administrador de su homeserver. No podrán leer ningún mensaje cifrado."</string>
<string name="report_content_hint">"Motivo para denunciar este contenido"</string>
<string name="room_timeline_beginning_of_room">"Este es el principio de %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Este es el principio de esta conversación."</string>
<string name="screen_report_content_block_user_hint">"Marque si quieres ocultar todos los mensajes actuales y futuros de este usuario"</string>
<string name="screen_report_content_block_user">"Bloquear usuario"</string>
</resources>

2
features/messages/impl/src/main/res/values-fr/translations.xml

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
</plurals>
<string name="report_content_explanation">"Ce message sera signalé à l’administrateur de votre serveur d’accueil. Il ne pourra lire aucun message chiffré."</string>
<string name="report_content_hint">"Raison du signalement de ce contenu"</string>
<string name="room_timeline_beginning_of_room">"Ceci est le début de %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Ceci est le début de cette conversation."</string>
<string name="screen_room_mentions_at_room_subtitle">"Notifier tout le salon"</string>
<string name="screen_report_content_block_user_hint">"Cochez si vous souhaitez masquer tous les messages actuels et futurs de cet utilisateur."</string>
<string name="screen_room_attachment_source_camera">"Appareil photo"</string>

2
features/messages/impl/src/main/res/values-it/translations.xml

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
</plurals>
<string name="report_content_explanation">"Questo messaggio verrà segnalato all\'amministratore dell\'homeserver. Questi non sarà in grado di leggere i messaggi criptati."</string>
<string name="report_content_hint">"Motivo della segnalazione di questo contenuto"</string>
<string name="room_timeline_beginning_of_room">"Questo è l\'inizio di %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Questo è l\'inizio della conversazione."</string>
<string name="screen_report_content_block_user_hint">"Seleziona se vuoi nascondere tutti i messaggi attuali e futuri di questo utente"</string>
<string name="screen_report_content_block_user">"Blocca utente"</string>
</resources>

2
features/messages/impl/src/main/res/values-ro/translations.xml

@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
</plurals>
<string name="report_content_explanation">"Acest mesaj va fi raportat administratorilor homeserver-ului tau. Ei nu vor putea citi niciun mesaj criptat."</string>
<string name="report_content_hint">"Motivul raportării acestui conținut"</string>
<string name="room_timeline_beginning_of_room">"Acesta este începutul conversației %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Acesta este începutul acestei conversații."</string>
<string name="screen_report_content_block_user_hint">"Confirmați că doriți să ascundeți toate mesajele curente și viitoare de la acest utilizator"</string>
<string name="screen_room_attachment_source_camera">"Cameră foto"</string>
<string name="screen_room_attachment_source_camera_photo">"Faceți o fotografie"</string>

2
features/messages/impl/src/main/res/values-ru/translations.xml

@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
</plurals>
<string name="report_content_explanation">"Это сообщение будет передано администратору вашего домашнего сервера. Они не смогут прочитать зашифрованные сообщения."</string>
<string name="report_content_hint">"Причина, по которой вы пожаловались на этот контент"</string>
<string name="room_timeline_beginning_of_room">"Это начало %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Это начало разговора."</string>
<string name="screen_room_mentions_at_room_subtitle">"Уведомить всю комнату"</string>
<string name="screen_report_content_block_user_hint">"Отметьте, хотите ли вы скрыть все текущие и будущие сообщения от этого пользователя"</string>
<string name="screen_room_attachment_source_camera">"Камера"</string>

2
features/messages/impl/src/main/res/values-sk/translations.xml

@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
</plurals>
<string name="report_content_explanation">"Táto správa bude nahlásená správcovi vášho domovského servera. Nebude môcť prečítať žiadne šifrované správy."</string>
<string name="report_content_hint">"Dôvod nahlásenia tohto obsahu"</string>
<string name="room_timeline_beginning_of_room">"Toto je začiatok %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Toto je začiatok tejto konverzácie."</string>
<string name="screen_room_mentions_at_room_subtitle">"Informovať celú miestnosť"</string>
<string name="screen_report_content_block_user_hint">"Označte, či chcete skryť všetky aktuálne a budúce správy od tohto používateľa"</string>
<string name="screen_room_attachment_source_camera">"Kamera"</string>

3
features/messages/impl/src/main/res/values/localazy.xml

@ -14,6 +14,8 @@ @@ -14,6 +14,8 @@
</plurals>
<string name="report_content_explanation">"This message will be reported to your homeserver’s administrator. They will not be able to read any encrypted messages."</string>
<string name="report_content_hint">"Reason for reporting this content"</string>
<string name="room_timeline_beginning_of_room">"This is the beginning of %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"This is the beginning of this conversation."</string>
<string name="screen_room_mentions_at_room_subtitle">"Notify the whole room"</string>
<string name="screen_report_content_block_user_hint">"Check if you want to hide all current and future messages from this user"</string>
<string name="screen_room_attachment_source_camera">"Camera"</string>
@ -41,6 +43,7 @@ @@ -41,6 +43,7 @@
<string name="screen_room_notification_settings_error_loading_settings">"An error occurred while loading notification settings."</string>
<string name="screen_room_notification_settings_error_restoring_default">"Failed restoring the default mode, please try again."</string>
<string name="screen_room_notification_settings_error_setting_mode">"Failed setting the mode, please try again."</string>
<string name="screen_room_notification_settings_mentions_only_disclaimer">"Your homeserver does not support this option in encrypted rooms, you won\'t get notified in this room."</string>
<string name="screen_room_notification_settings_mode_all_messages">"All messages"</string>
<string name="screen_room_notification_settings_room_custom_settings_title">"In this room, notify me for"</string>
<string name="screen_room_reactions_show_less">"Show less"</string>

1
features/preferences/impl/src/main/res/values/localazy.xml

@ -28,6 +28,7 @@ If you proceed, some of your settings may change."</string> @@ -28,6 +28,7 @@ If you proceed, some of your settings may change."</string>
<string name="screen_notification_settings_enable_notifications">"Enable notifications on this device"</string>
<string name="screen_notification_settings_failed_fixing_configuration">"The configuration has not been corrected, please try again."</string>
<string name="screen_notification_settings_group_chats">"Group chats"</string>
<string name="screen_notification_settings_mentions_only_disclaimer">"Your homeserver does not support this option in encrypted rooms, you may not get notified in some rooms."</string>
<string name="screen_notification_settings_mentions_section_title">"Mentions"</string>
<string name="screen_notification_settings_mode_all">"All"</string>
<string name="screen_notification_settings_mode_mentions">"Mentions"</string>

1
features/roomdetails/impl/src/main/res/values/localazy.xml

@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
<string name="screen_room_notification_settings_error_loading_settings">"An error occurred while loading notification settings."</string>
<string name="screen_room_notification_settings_error_restoring_default">"Failed restoring the default mode, please try again."</string>
<string name="screen_room_notification_settings_error_setting_mode">"Failed setting the mode, please try again."</string>
<string name="screen_room_notification_settings_mentions_only_disclaimer">"Your homeserver does not support this option in encrypted rooms, you won\'t get notified in this room."</string>
<string name="screen_room_notification_settings_mode_all_messages">"All messages"</string>
<string name="screen_room_notification_settings_room_custom_settings_title">"In this room, notify me for"</string>
<string name="screen_dm_details_block_alert_action">"Block"</string>

2
features/securebackup/impl/src/main/res/values-cs/translations.xml

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
<string name="screen_recovery_key_change_success">"Klíč pro obnovení byl změněn"</string>
<string name="screen_recovery_key_change_title">"Změnit klíč pro obnovení?"</string>
<string name="screen_recovery_key_confirm_description">"Zadejte klíč pro obnovení a potvrďte přístup k záloze chatu."</string>
<string name="screen_recovery_key_confirm_error_content">"Zkuste prosím znovu potvrdit přístup k záloze chatu."</string>
<string name="screen_recovery_key_confirm_error_title">"Nesprávný klíč pro obnovení"</string>
<string name="screen_recovery_key_confirm_key_description">"Zadejte kód o délce 48 znaků."</string>
<string name="screen_recovery_key_confirm_key_placeholder">"Zadejte…"</string>
<string name="screen_recovery_key_confirm_success">"Klíč pro obnovení potvrzen"</string>

3
libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/timeline/MatrixTimeline.kt

@ -24,7 +24,8 @@ interface MatrixTimeline { @@ -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
}

10
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt

@ -72,7 +72,11 @@ class RustMatrixTimeline( @@ -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( @@ -155,6 +159,7 @@ class RustMatrixTimeline(
return@getAndUpdate currentPaginationState.copy(
isBackPaginating = false,
hasMoreToLoadBackwards = false,
beginningOfRoomReached = false,
)
}
when (status) {
@ -173,7 +178,8 @@ class RustMatrixTimeline( @@ -173,7 +178,8 @@ class RustMatrixTimeline(
BackPaginationStatus.TIMELINE_START_REACHED -> {
currentPaginationState.copy(
isBackPaginating = false,
hasMoreToLoadBackwards = false
hasMoreToLoadBackwards = false,
beginningOfRoomReached = true,
)
}
}

3
libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessor.kt

@ -45,7 +45,8 @@ class TimelineEncryptedHistoryPostProcessor( @@ -45,7 +45,8 @@ class TimelineEncryptedHistoryPostProcessor(
paginationStateFlow.getAndUpdate {
it.copy(
isBackPaginating = false,
hasMoreToLoadBackwards = false
hasMoreToLoadBackwards = false,
beginningOfRoomReached = false,
)
}
}

24
libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt

@ -98,7 +98,13 @@ class TimelineEncryptedHistoryPostProcessorTest { @@ -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 { @@ -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 { @@ -119,7 +131,13 @@ class TimelineEncryptedHistoryPostProcessorTest {
isRoomEncrypted: Boolean = true,
isKeyBackupEnabled: Boolean = false,
paginationStateFlow: MutableStateFlow<MatrixTimeline.PaginationState> =
MutableStateFlow(MatrixTimeline.PaginationState(hasMoreToLoadBackwards = true, isBackPaginating = false))
MutableStateFlow(
MatrixTimeline.PaginationState(
hasMoreToLoadBackwards = true,
isBackPaginating = false,
beginningOfRoomReached = false,
)
)
) = TimelineEncryptedHistoryPostProcessor(
lastLoginTimestamp = lastLoginTimestamp,
isRoomEncrypted = isRoomEncrypted,

6
libraries/matrix/test/src/main/kotlin/io/element/android/libraries/matrix/test/timeline/FakeMatrixTimeline.kt

@ -29,7 +29,11 @@ import kotlinx.coroutines.flow.getAndUpdate @@ -29,7 +29,11 @@ import kotlinx.coroutines.flow.getAndUpdate
class FakeMatrixTimeline(
initialTimelineItems: List<MatrixTimelineItem> = 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<MatrixTimeline.PaginationState> = MutableStateFlow(initialPaginationState)

4
libraries/push/impl/src/main/res/values-cs/translations.xml

@ -8,6 +8,10 @@ @@ -8,6 +8,10 @@
<string name="notification_invitation_action_join">"Vstoupit"</string>
<string name="notification_invitation_action_reject">"Odmítnout"</string>
<string name="notification_invite_body">"Vás pozval(a) do chatu"</string>
<string name="notification_mentioned_you_body">"%1$s vás zmínil(a).
%2$s"</string>
<string name="notification_mentioned_you_fallback_body">"Byli jste zmíněni.
%1$s"</string>
<string name="notification_new_messages">"Nové zprávy"</string>
<string name="notification_reaction_body">"Reagoval(a) s %1$s"</string>
<string name="notification_room_action_mark_as_read">"Označit jako přečtené"</string>

6
libraries/ui-strings/src/main/res/values-cs/translations.xml

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
<string name="a11y_show_password">"Zobrazit heslo"</string>
<string name="a11y_start_call">"Zahájit hovor"</string>
<string name="a11y_user_menu">"Uživatelské menu"</string>
<string name="a11y_voice_message_record">"Nahrajte hlasovou zprávu. Dvojitě klepněte a podržte pro záznam. Uvolněním ukončíte nahrávání."</string>
<string name="a11y_voice_message_record">"Nahrajte hlasovou zprávu."</string>
<string name="a11y_voice_message_stop_recording">"Zastavit nahrávání"</string>
<string name="action_accept">"Přijmout"</string>
<string name="action_add_to_timeline">"Přidat na časovou osu"</string>
@ -116,6 +116,7 @@ @@ -116,6 +116,7 @@
<string name="common_link_copied_to_clipboard">"Odkaz zkopírován do schránky"</string>
<string name="common_loading">"Načítání…"</string>
<string name="common_message">"Zpráva"</string>
<string name="common_message_actions">"Akce zprávy"</string>
<string name="common_message_layout">"Rozložení zprávy"</string>
<string name="common_message_removed">"Zpráva byla odstraněna"</string>
<string name="common_modern">"Moderní"</string>
@ -176,6 +177,7 @@ @@ -176,6 +177,7 @@
<string name="common_waiting_for_decryption_key">"Čekání na dešifrovací klíč"</string>
<string name="common_poll_end_confirmation">"Opravdu chcete ukončit toto hlasování?"</string>
<string name="common_poll_summary">"Hlasování: %1$s"</string>
<string name="common_verify_device">"Ověřit zařízení"</string>
<string name="dialog_title_confirmation">"Potvrzení"</string>
<string name="dialog_title_warning">"Upozornění"</string>
<string name="error_failed_creating_the_permalink">"Vytvoření trvalého odkazu se nezdařilo"</string>
@ -207,8 +209,6 @@ @@ -207,8 +209,6 @@
<item quantity="other">"%d hlasů"</item>
</plurals>
<string name="preference_rageshake">"Zatřeste zařízením pro nahlášení chyby"</string>
<string name="room_timeline_beginning_of_room">"Toto je začátek %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Toto je začátek této konverzace."</string>
<string name="room_timeline_read_marker_title">"Nové"</string>
<string name="screen_media_picker_error_failed_selection">"Výběr média se nezdařil, zkuste to prosím znovu."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Nahrání média se nezdařilo, zkuste to prosím znovu."</string>

2
libraries/ui-strings/src/main/res/values-de/translations.xml

@ -175,8 +175,6 @@ @@ -175,8 +175,6 @@
<item quantity="other">"%d Stimmen"</item>
</plurals>
<string name="preference_rageshake">"Schüttel heftig zum Melden von Fehlern"</string>
<string name="room_timeline_beginning_of_room">"Dies ist der Anfang von %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Dies ist der Anfang dieses Gesprächs."</string>
<string name="room_timeline_read_marker_title">"Neu"</string>
<string name="screen_media_picker_error_failed_selection">"Medienauswahl fehlgeschlagen, bitte versuche es erneut."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Fehler beim Verarbeiten des hochgeladenen Mediums. Bitte versuche es erneut."</string>

2
libraries/ui-strings/src/main/res/values-es/translations.xml

@ -105,8 +105,6 @@ @@ -105,8 +105,6 @@
<item quantity="other">"%1$d miembros"</item>
</plurals>
<string name="preference_rageshake">"Agitar con fuerza para informar de un error"</string>
<string name="room_timeline_beginning_of_room">"Este es el principio de %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Este es el principio de esta conversación."</string>
<string name="room_timeline_read_marker_title">"Nuevos"</string>
<string name="settings_version_number">"Versión: %1$s (%2$s)"</string>
<string name="test_language_identifier">"es"</string>

2
libraries/ui-strings/src/main/res/values-fr/translations.xml

@ -202,8 +202,6 @@ @@ -202,8 +202,6 @@
<item quantity="other">"%d votes"</item>
</plurals>
<string name="preference_rageshake">"Rageshake pour signaler un problème"</string>
<string name="room_timeline_beginning_of_room">"Ceci est le début de %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Ceci est le début de cette conversation."</string>
<string name="room_timeline_read_marker_title">"Nouveau"</string>
<string name="screen_media_picker_error_failed_selection">"Échec de la sélection du média, veuillez réessayer."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Échec du traitement des médias à télécharger, veuillez réessayer."</string>

2
libraries/ui-strings/src/main/res/values-it/translations.xml

@ -105,8 +105,6 @@ @@ -105,8 +105,6 @@
<item quantity="other">"%1$d membri"</item>
</plurals>
<string name="preference_rageshake">"Scuoti per segnalare un problema"</string>
<string name="room_timeline_beginning_of_room">"Questo è l\'inizio di %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Questo è l\'inizio della conversazione."</string>
<string name="room_timeline_read_marker_title">"Nuovo"</string>
<string name="settings_version_number">"Versione: %1$s (%2$s)"</string>
<string name="test_language_identifier">"it"</string>

2
libraries/ui-strings/src/main/res/values-ro/translations.xml

@ -159,8 +159,6 @@ @@ -159,8 +159,6 @@
<item quantity="other">"%d voturi"</item>
</plurals>
<string name="preference_rageshake">"Rageshake pentru a raporta erori"</string>
<string name="room_timeline_beginning_of_room">"Acesta este începutul conversației %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Acesta este începutul acestei conversații."</string>
<string name="room_timeline_read_marker_title">"Nou"</string>
<string name="screen_media_picker_error_failed_selection">"Selectarea fișierelor media a eșuat, încercați din nou."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Procesarea datelor media a eșuat, vă rugăm să încercați din nou."</string>

2
libraries/ui-strings/src/main/res/values-ru/translations.xml

@ -209,8 +209,6 @@ @@ -209,8 +209,6 @@
<item quantity="many">"%d голосов"</item>
</plurals>
<string name="preference_rageshake">"Rageshake сообщит об ошибке"</string>
<string name="room_timeline_beginning_of_room">"Это начало %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Это начало разговора."</string>
<string name="room_timeline_read_marker_title">"Новый"</string>
<string name="screen_media_picker_error_failed_selection">"Не удалось выбрать носитель, попробуйте еще раз."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Не удалось обработать медиафайл для загрузки, попробуйте еще раз."</string>

2
libraries/ui-strings/src/main/res/values-sk/translations.xml

@ -209,8 +209,6 @@ @@ -209,8 +209,6 @@
<item quantity="other">"%d hlasov"</item>
</plurals>
<string name="preference_rageshake">"Zúrivo potriasť pre nahlásenie chyby"</string>
<string name="room_timeline_beginning_of_room">"Toto je začiatok %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"Toto je začiatok tejto konverzácie."</string>
<string name="room_timeline_read_marker_title">"Nové"</string>
<string name="screen_media_picker_error_failed_selection">"Nepodarilo sa vybrať médium, skúste to prosím znova."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Nepodarilo sa spracovať médiá na odoslanie, skúste to prosím znova."</string>

2
libraries/ui-strings/src/main/res/values/localazy.xml

@ -206,8 +206,6 @@ @@ -206,8 +206,6 @@
<item quantity="other">"%d votes"</item>
</plurals>
<string name="preference_rageshake">"Rageshake to report bug"</string>
<string name="room_timeline_beginning_of_room">"This is the beginning of %1$s."</string>
<string name="room_timeline_beginning_of_room_no_name">"This is the beginning of this conversation."</string>
<string name="room_timeline_read_marker_title">"New"</string>
<string name="screen_media_picker_error_failed_selection">"Failed selecting media, please try again."</string>
<string name="screen_media_upload_preview_error_failed_processing">"Failed processing media to upload, please try again."</string>

1
tools/localazy/config.json

@ -121,6 +121,7 @@ @@ -121,6 +121,7 @@
{
"name": ":features:messages:impl",
"includeRegex": [
"room_timeline_beginning_.*",
"screen_room_.*",
"screen\\.room\\..*",
"screen_dm_details_.*",

Loading…
Cancel
Save