mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 20:38:40 +00:00
Timeline: remove duplicated code
This commit is contained in:
-7
@@ -101,13 +101,6 @@ fun TimelineView(
|
|||||||
// TODO implement this logic once we have support to 'jump to event X' in sliding sync
|
// 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) {
|
Box(modifier = modifier) {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
|
|||||||
Reference in New Issue
Block a user