Tests: replace "0" by FAKE_UNIQUE_ID when its ok.

This commit is contained in:
ganfra 2023-12-18 18:19:32 +01:00
parent f548dadfd7
commit d641ef29ce
3 changed files with 23 additions and 19 deletions

View file

@ -101,6 +101,11 @@ class RustMatrixTimeline(
override val paginationState: StateFlow<MatrixTimeline.PaginationState> = _paginationState.asStateFlow()
@OptIn(ExperimentalCoroutinesApi::class)
override val timelineItems: Flow<List<MatrixTimelineItem>> = _timelineItems.mapLatest { items ->
encryptedHistoryPostProcessor.process(items)
}
init {
Timber.d("Initialize timeline for room ${matrixRoom.roomId}")
@ -171,11 +176,6 @@ class RustMatrixTimeline(
}
}
@OptIn(ExperimentalCoroutinesApi::class)
override val timelineItems: Flow<List<MatrixTimelineItem>> = _timelineItems.mapLatest { items ->
encryptedHistoryPostProcessor.process(items)
}
private suspend fun postItems(items: List<TimelineItem>) = coroutineScope {
// Split the initial items in multiple list as there is no pagination in the cached data, so we can post timelineItems asap.
items.chunked(INITIAL_MAX_SIZE).reversed().forEach {