From 51a7b8edd349f5453e7ea9efe9233d28172bdb1d Mon Sep 17 00:00:00 2001 From: ganfra Date: Tue, 11 Jul 2023 12:51:01 +0200 Subject: [PATCH] Timeline: remove duplicated code --- .../features/messages/impl/timeline/TimelineView.kt | 7 ------- 1 file changed, 7 deletions(-) diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt index a8da9d5543..4e0ca6124b 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/timeline/TimelineView.kt @@ -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(