From b4f2da12ea58b2f386f4d49356074c0a38351083 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 9 Oct 2022 15:37:48 -0400 Subject: [PATCH] Bring back overscroll in SwipeRefresh for A12+ It's more consistent with the rest of the overscroll behaviour in the app. We'll wait for the upstream fix. --- .../kanade/presentation/components/SwipeRefresh.kt | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/components/SwipeRefresh.kt b/app/src/main/java/eu/kanade/presentation/components/SwipeRefresh.kt index daf765e2a..623dc2411 100644 --- a/app/src/main/java/eu/kanade/presentation/components/SwipeRefresh.kt +++ b/app/src/main/java/eu/kanade/presentation/components/SwipeRefresh.kt @@ -1,11 +1,8 @@ package eu.kanade.presentation.components -import android.os.Build -import androidx.compose.foundation.LocalOverscrollConfiguration import androidx.compose.foundation.layout.PaddingValues import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import com.google.accompanist.swiperefresh.SwipeRefreshState @@ -42,14 +39,6 @@ fun SwipeRefresh( indicatorPadding = indicatorPadding, indicator = { s, trigger -> SwipeRefreshIndicator(s, trigger) }, ) { - // TODO: remove this workaround when A12 stretch overscroll works well with refreshing - // see https://github.com/tachiyomiorg/tachiyomi/issues/8168 - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { - CompositionLocalProvider(LocalOverscrollConfiguration provides null) { - content() - } - } else { - content() - } + content() } }