Timeline: remove duplicated code
This commit is contained in:
parent
35c8eb8b15
commit
51a7b8edd3
1 changed files with 0 additions and 7 deletions
|
|
@ -101,13 +101,6 @@ fun TimelineView(
|
|||
// TODO implement this logic once we have support to 'jump to event X' in sliding sync
|
||||
}
|
||||
|
||||
// Send an event to the presenter when the scrolling is finished, with the first visible index at the bottom.
|
||||
val firstVisibleIndex by remember { derivedStateOf { lazyListState.firstVisibleItemIndex } }
|
||||
val isScrollFinished by remember { derivedStateOf { !lazyListState.isScrollInProgress } }
|
||||
LaunchedEffect(firstVisibleIndex, isScrollFinished) {
|
||||
if (!isScrollFinished) return@LaunchedEffect
|
||||
state.eventSink(TimelineEvents.OnScrollFinished(firstVisibleIndex))
|
||||
}
|
||||
|
||||
Box(modifier = modifier) {
|
||||
LazyColumn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue