Build(gradle): Upgrade dependencies
This commit is contained in:
@@ -95,9 +95,6 @@ android {
|
||||
compose = true
|
||||
buildConfig = true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.12"
|
||||
}
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.widget.Toast
|
||||
import androidx.activity.compose.ReportDrawnWhen
|
||||
import androidx.compose.foundation.gestures.Orientation
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
@@ -33,7 +32,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.material3.pulltorefresh.PullToRefreshContainer
|
||||
import androidx.compose.material3.pulltorefresh.PullToRefreshBox
|
||||
import androidx.compose.material3.pulltorefresh.rememberPullToRefreshState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
@@ -44,8 +43,6 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clipToBounds
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -114,15 +111,11 @@ internal fun ToolStoreScreen(
|
||||
|
||||
ReportDrawnWhen { !isToolLoading }
|
||||
|
||||
val pullToRefreshState = rememberPullToRefreshState()
|
||||
LaunchedEffect(pullToRefreshState.isRefreshing) {
|
||||
if (pullToRefreshState.isRefreshing) {
|
||||
toolStorePagingItems.refresh()
|
||||
}
|
||||
}
|
||||
var isRefreshing by remember { mutableStateOf(false) }
|
||||
|
||||
LaunchedEffect(toolStorePagingItems.loadState.refresh) {
|
||||
if (toolStorePagingItems.loadState.refresh != LoadState.Loading) {
|
||||
pullToRefreshState.endRefresh()
|
||||
if (toolStorePagingItems.loadState.refresh != LoadState.Loading && isRefreshing) {
|
||||
isRefreshing = false
|
||||
}
|
||||
if (toolStorePagingItems.loadState.refresh is LoadState.Error) {
|
||||
Toast.makeText(
|
||||
@@ -136,6 +129,12 @@ internal fun ToolStoreScreen(
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(isRefreshing) {
|
||||
if (isRefreshing) {
|
||||
toolStorePagingItems.refresh()
|
||||
}
|
||||
}
|
||||
|
||||
val itemsAvailable = toolStorePagingItems.itemCount
|
||||
|
||||
val state = rememberLazyStaggeredGridState()
|
||||
@@ -151,11 +150,14 @@ internal fun ToolStoreScreen(
|
||||
)
|
||||
}
|
||||
|
||||
Box(
|
||||
modifier
|
||||
.fillMaxSize()
|
||||
.clipToBounds()
|
||||
.nestedScroll(pullToRefreshState.nestedScrollConnection)
|
||||
PullToRefreshBox(
|
||||
modifier = modifier
|
||||
.fillMaxSize(),
|
||||
state = rememberPullToRefreshState(),
|
||||
isRefreshing = isRefreshing,
|
||||
onRefresh = {
|
||||
isRefreshing = true
|
||||
}
|
||||
) {
|
||||
if (itemsAvailable > 0 || (toolStorePagingItems.loadState.refresh == LoadState.Loading && itemsAvailable == 0)) {
|
||||
LazyVerticalStaggeredGrid(
|
||||
@@ -232,12 +234,6 @@ internal fun ToolStoreScreen(
|
||||
}
|
||||
}
|
||||
|
||||
PullToRefreshContainer(
|
||||
modifier = Modifier
|
||||
.align(Alignment.TopCenter),
|
||||
state = pullToRefreshState,
|
||||
)
|
||||
|
||||
state.DraggableScrollbar(
|
||||
modifier = Modifier
|
||||
.fillMaxHeight()
|
||||
|
||||
@@ -1,31 +1,32 @@
|
||||
[versions]
|
||||
agp = "8.5.2"
|
||||
kotlin = "2.0.10"
|
||||
ksp = "2.0.10-1.0.24"
|
||||
aboutlibraries = "11.2.2"
|
||||
agp = "8.6.1"
|
||||
kotlin = "2.0.20"
|
||||
ksp = "2.0.20-1.0.25"
|
||||
aboutlibraries = "11.2.3"
|
||||
protobufPlugin = "0.9.4"
|
||||
kotlinxSerialization = "2.0.0"
|
||||
kotlinxSerialization = "2.0.20"
|
||||
secrets = "2.0.1"
|
||||
paging = "3.3.2"
|
||||
|
||||
desugarJdkLibs = "2.1.0"
|
||||
composeBom = "2024.08.00"
|
||||
desugarJdkLibs = "2.1.2"
|
||||
composeBom = "2024.09.02"
|
||||
junit = "4.13.2"
|
||||
coreKtx = "1.13.1"
|
||||
junitVersion = "1.2.1"
|
||||
espressoCore = "3.6.1"
|
||||
activityCompose = "1.9.1"
|
||||
uiTestManifest = "1.7.2"
|
||||
activityCompose = "1.9.2"
|
||||
appcompat = "1.7.0"
|
||||
androidxLifecycle = "2.8.4"
|
||||
androidxLifecycle = "2.8.6"
|
||||
androidxCoreSplashscreen = "1.0.1"
|
||||
hilt = "2.52"
|
||||
coil = "2.7.0"
|
||||
kotlinxDatetime = "0.6.0"
|
||||
kotlinxDatetime = "0.6.1"
|
||||
androidxDataStore = "1.1.1"
|
||||
protobuf = "4.27.3"
|
||||
androidxNavigation = "2.7.7"
|
||||
protobuf = "4.28.2"
|
||||
androidxNavigation = "2.8.1"
|
||||
androidxHiltNavigationCompose = "1.2.0"
|
||||
kotlinxSerializationJson = "1.7.1"
|
||||
kotlinxSerializationJson = "1.7.3"
|
||||
retrofit = "2.11.0"
|
||||
retrofitKotlinxSerializationJson = "1.0.0"
|
||||
okhttp = "4.12.0"
|
||||
@@ -59,7 +60,7 @@ androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "j
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
|
||||
androidx-ui-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
|
||||
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest" }
|
||||
androidx-ui-test-manifest = { group = "androidx.compose.ui", name = "ui-test-manifest", version.ref = "uiTestManifest" }
|
||||
|
||||
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
||||
androidx-ui = { group = "androidx.compose.ui", name = "ui" }
|
||||
|
||||
Reference in New Issue
Block a user