mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-01-30 15:35:07 +01:00
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…
x
Reference in New Issue
Block a user