mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-04-13 17:42:06 +02:00
Fix max page calculation in HomeScreenGrid to consider only visible items
This commit is contained in:
parent
1448c8a989
commit
efb46dc0d6
@ -941,7 +941,7 @@ class HomeScreenGrid(context: Context, attrs: AttributeSet, defStyle: Int) : Rel
|
||||
}
|
||||
}
|
||||
|
||||
private fun getMaxPage() = gridItems.map { it.page }.max()
|
||||
private fun getMaxPage() = gridItems.filter { !it.docked && !it.outOfBounds() }.maxOfOrNull { it.page } ?: 0
|
||||
|
||||
private fun nextOrAdditionalPage(redraw: Boolean = false): Boolean {
|
||||
if (currentPage < getMaxPage() + 1 && pageChangeEnabled) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user