Navigate to previous page if current one is empty
This commit is contained in:
parent
9906ef05af
commit
35fe1da420
|
@ -169,6 +169,11 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||
}
|
||||
|
||||
gridItems.removeIf { it.id == item.id }
|
||||
if (currentPage > getMaxPage()) {
|
||||
post {
|
||||
prevPage()
|
||||
}
|
||||
}
|
||||
redrawGrid()
|
||||
}
|
||||
}
|
||||
|
@ -529,6 +534,10 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
|||
} else {
|
||||
removeItemFromHomeScreen(item)
|
||||
}
|
||||
|
||||
if (currentPage > getMaxPage()) {
|
||||
prevPage(redraw = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue