Replace deprecated method
This commit is contained in:
1 parent
f0ac27b159
commit
dd95878ba7
2 files changed
+10
-5
No files matched your search
@@ -183,7 +183,7 @@ dependencies {
|
||||
implementation("androidx.navigation:navigation-compose:$nav_version")
|
||||
|
||||
// https://developer.android.com/jetpack/androidx/releases/paging
|
||||
implementation("androidx.paging:paging-runtime-ktx:3.2.0-alpha05")
|
||||
implementation("androidx.paging:paging-common-ktx:3.2.0-alpha05")
|
||||
implementation("androidx.paging:paging-compose:1.0.0-alpha19")
|
||||
implementation("androidx.preference:preference-ktx:1.2.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.3.0")
|
||||
|
||||
@@ -59,7 +59,8 @@ import androidx.paging.Pager
|
||||
import androidx.paging.PagingConfig
|
||||
import androidx.paging.cachedIn
|
||||
import androidx.paging.compose.collectAsLazyPagingItems
|
||||
import androidx.paging.compose.items
|
||||
import androidx.paging.compose.itemContentType
|
||||
import androidx.paging.compose.itemKey
|
||||
import arrow.core.partially1
|
||||
import com.hippo.app.BaseDialogBuilder
|
||||
import com.hippo.ehviewer.EhDB
|
||||
@@ -116,9 +117,13 @@ class HistoryScene : BaseScene() {
|
||||
contentPadding = paddingValues,
|
||||
) {
|
||||
items(
|
||||
items = historyData,
|
||||
key = { item -> item.gid },
|
||||
) { info ->
|
||||
count = historyData.itemCount,
|
||||
key = historyData.itemKey(key = { item -> item.gid }),
|
||||
contentType = historyData.itemContentType(),
|
||||
) { index ->
|
||||
val info = historyData[index]
|
||||
// TODO: item delete & add animation
|
||||
// Bug tracker: https://issuetracker.google.com/issues/150812265
|
||||
info?.let {
|
||||
val dismissState = rememberDismissState(
|
||||
confirmValueChange = {
|
||||
|
||||
Reference in new issue
Block a user