From 234bd1a9bee05361dcb585707fd4e5aa3449ba2c Mon Sep 17 00:00:00 2001 From: Will McCall <532b81611e7e@mail.fordibben.zone> Date: Tue, 8 Oct 2024 20:57:52 +0100 Subject: [PATCH] SwipeRefresh: Removed due to deprecation. --- .../reader/ui/component/base/SwipeRefresh.kt | 31 ------------------- 1 file changed, 31 deletions(-) delete mode 100644 app/src/main/java/me/ash/reader/ui/component/base/SwipeRefresh.kt diff --git a/app/src/main/java/me/ash/reader/ui/component/base/SwipeRefresh.kt b/app/src/main/java/me/ash/reader/ui/component/base/SwipeRefresh.kt deleted file mode 100644 index 5e2d311aa..000000000 --- a/app/src/main/java/me/ash/reader/ui/component/base/SwipeRefresh.kt +++ /dev/null @@ -1,31 +0,0 @@ -package me.ash.reader.ui.component.base - -import androidx.compose.material3.MaterialTheme -import androidx.compose.runtime.Composable -import com.google.accompanist.swiperefresh.SwipeRefreshIndicator -import com.google.accompanist.swiperefresh.rememberSwipeRefreshState -import me.ash.reader.ui.theme.palette.onDark - -@Composable -fun SwipeRefresh( - isRefresh: Boolean = false, - onRefresh: () -> Unit = {}, - content: @Composable () -> Unit = {}, -) { - com.google.accompanist.swiperefresh.SwipeRefresh( - state = rememberSwipeRefreshState(isRefresh), - onRefresh = onRefresh, - indicator = { state, trigger -> - SwipeRefreshIndicator( - state = state, - refreshTriggerDistance = trigger, - fade = true, - scale = true, - contentColor = MaterialTheme.colorScheme.primary, - backgroundColor = MaterialTheme.colorScheme.surface onDark MaterialTheme.colorScheme.surfaceVariant, - ) - } - ) { - content() - } -} \ No newline at end of file