[Manatoki] Fixed app crash when clicking list in reader

This commit is contained in:
tom5079
2021-12-26 15:32:05 +09:00
parent cd4be5898b
commit 0ff91d76b1
3 changed files with 5 additions and 2 deletions

View File

@@ -209,7 +209,7 @@ fun MangaListingBottomSheet(
state = listState,
contentPadding = rememberInsetsPaddingValues(LocalWindowInsets.current.navigationBars)
) {
itemsIndexed(mangaListing.entries) { index, entry ->
itemsIndexed(mangaListing.entries, key = { _, entry -> entry.itemID }) { index, entry ->
Row(
modifier = Modifier
.clickable {

View File

@@ -18,6 +18,7 @@
package xyz.quaver.pupil.sources.manatoki.composable
import android.util.Log
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.ExperimentalAnimationApi
@@ -29,6 +30,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.interaction.PressInteraction
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyListItemInfo
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.*
@@ -252,6 +254,7 @@ fun Reader(navController: NavController) {
Offset(sheetSize.width/2, targetItem.size/2f)
)
emit(interaction)
emit(PressInteraction.Release(interaction))
}

View File

@@ -170,7 +170,7 @@ class SearchViewModel(app: Application) : AndroidViewModel(app), DIAware {
if (publish.isNotEmpty()) args.add("publish=$publish")
if (jaum.isNotEmpty()) args.add("jaum=$jaum")
if (tag.isNotEmpty()) args.add("tag=${tag.keys.joinToString(",")}")
if (sst.isNotEmpty()) args.add("sst=$sst")
if (sst.isNotEmpty()) args.add("sst=$sst&sod=desc")
if (stx.isNotEmpty()) args.add("stx=$stx")
if (artist.isNotEmpty()) args.add("artist=$artist")