mirror of https://github.com/readrops/Readrops.git
Scroll timeline to the top when synchronization is over
This commit is contained in:
parent
19409f20a5
commit
ffe2d5cffb
|
@ -322,7 +322,9 @@ class TimelineScreenModel(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
fun resetEndSynchronizing() {
|
||||
_timelineState.update { it.copy(endSynchronizing = false) }
|
||||
}
|
||||
}
|
||||
|
||||
@Stable
|
||||
|
|
|
@ -102,6 +102,13 @@ object TimelineTab : Tab {
|
|||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(state.endSynchronizing) {
|
||||
if (state.endSynchronizing) {
|
||||
lazyListState.animateScrollToItem(0)
|
||||
viewModel.resetEndSynchronizing()
|
||||
}
|
||||
}
|
||||
|
||||
val drawerState = rememberDrawerState(
|
||||
initialValue = DrawerValue.Closed,
|
||||
confirmStateChange = {
|
||||
|
|
Loading…
Reference in New Issue