Migrate Accompanist SwipeRefresh to Compose PullRefresh (#8106)

This commit is contained in:
stevenyomi
2022-12-08 11:40:57 +08:00
committed by GitHub
parent 6ca32710be
commit 2c4ddca38e
9 changed files with 66 additions and 59 deletions

View File

@@ -51,8 +51,8 @@ import eu.kanade.presentation.components.ChapterDownloadAction
import eu.kanade.presentation.components.ExtendedFloatingActionButton
import eu.kanade.presentation.components.LazyColumn
import eu.kanade.presentation.components.MangaBottomActionMenu
import eu.kanade.presentation.components.PullRefresh
import eu.kanade.presentation.components.Scaffold
import eu.kanade.presentation.components.SwipeRefresh
import eu.kanade.presentation.components.TwoPanelBox
import eu.kanade.presentation.components.VerticalFastScroller
import eu.kanade.presentation.manga.components.ChapterHeader
@@ -287,7 +287,7 @@ private fun MangaScreenSmallImpl(
) { contentPadding ->
val topPadding = contentPadding.calculateTopPadding()
SwipeRefresh(
PullRefresh(
refreshing = state.isRefreshingData,
onRefresh = onRefresh,
enabled = chapters.fastAll { !it.selected },
@@ -421,7 +421,7 @@ fun MangaScreenLargeImpl(
val insetPadding = WindowInsets.systemBars.only(WindowInsetsSides.Horizontal).asPaddingValues()
var topBarHeight by remember { mutableStateOf(0) }
SwipeRefresh(
PullRefresh(
refreshing = state.isRefreshingData,
onRefresh = onRefresh,
enabled = chapters.fastAll { !it.selected },