mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 12:47:26 +01:00
Fix crash in library when selected category is deleted (#9044)
(cherry picked from commit 13bb45b4be
)
This commit is contained in:
parent
477e3d9b94
commit
06d12e6562
@ -60,6 +60,9 @@ fun LibraryContent(
|
|||||||
var isRefreshing by remember(pagerState.currentPage) { mutableStateOf(false) }
|
var isRefreshing by remember(pagerState.currentPage) { mutableStateOf(false) }
|
||||||
|
|
||||||
if (showPageTabs && categories.size > 1) {
|
if (showPageTabs && categories.size > 1) {
|
||||||
|
if (categories.size <= pagerState.currentPage) {
|
||||||
|
pagerState.currentPage = categories.size - 1
|
||||||
|
}
|
||||||
LibraryTabs(
|
LibraryTabs(
|
||||||
categories = categories,
|
categories = categories,
|
||||||
currentPageIndex = pagerState.currentPage,
|
currentPageIndex = pagerState.currentPage,
|
||||||
|
Loading…
Reference in New Issue
Block a user