Timeline permalink : continue to iterate (try a strategy to avoid forward insertion to "auto-scroll")
This commit is contained in:
parent
ff92551472
commit
0d7cffe400
25 changed files with 599 additions and 218 deletions
|
|
@ -50,7 +50,7 @@ class PollHistoryPresenter @Inject constructor(
|
|||
override fun present(): PollHistoryState {
|
||||
// TODO use room.rememberPollHistory() when working properly?
|
||||
val timeline = room.liveTimeline
|
||||
val paginationState by timeline.backPaginationStatus.collectAsState()
|
||||
val paginationState by timeline.paginationStatus(Timeline.PaginationDirection.BACKWARDS).collectAsState()
|
||||
val pollHistoryItemsFlow = remember {
|
||||
timeline.timelineItems.map { items ->
|
||||
pollHistoryItemFactory.create(items)
|
||||
|
|
@ -96,6 +96,6 @@ class PollHistoryPresenter @Inject constructor(
|
|||
}
|
||||
|
||||
private fun CoroutineScope.loadMore(pollHistory: Timeline) = launch {
|
||||
pollHistory.paginateBackwards()
|
||||
pollHistory.paginate(Timeline.PaginationDirection.BACKWARDS)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue