Fix jump crash
This commit is contained in:
1 parent
73eb91f4b4
commit
d2b141e218
1 file changed
+2
-1
@@ -65,6 +65,7 @@ import com.hippo.ehviewer.ui.setMD3Content
|
||||
import com.hippo.ehviewer.ui.tools.rememberDialogState
|
||||
import com.hippo.ehviewer.ui.tools.rememberMemorized
|
||||
import com.hippo.ehviewer.util.getParcelableCompat
|
||||
import eu.kanade.tachiyomi.util.lang.withUIContext
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import moe.tarsin.coroutines.runSuspendCatching
|
||||
@@ -118,7 +119,7 @@ class GalleryPreviewScreen : Fragment() {
|
||||
}
|
||||
}.roundToInt()
|
||||
val index = (toPage - 1) * pgSize
|
||||
state.scrollToItem(index)
|
||||
withUIContext { state.scrollToItem(index) }
|
||||
}
|
||||
|
||||
val previewPagesMap = rememberMemorized { galleryDetail.previewList.associateBy { it.position } as MutableMap }
|
||||
|
||||
Reference in new issue
Block a user