mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-06-05 21:59:15 +02:00
make sure we always hide the proper icon
This commit is contained in:
@ -62,8 +62,8 @@ class LaunchersAdapter(
|
|||||||
fun hideIcon(item: HomeScreenGridItem) {
|
fun hideIcon(item: HomeScreenGridItem) {
|
||||||
val itemToRemove = launchers.firstOrNull { it.getLauncherIdentifier() == item.getItemIdentifier() }
|
val itemToRemove = launchers.firstOrNull { it.getLauncherIdentifier() == item.getItemIdentifier() }
|
||||||
if (itemToRemove != null) {
|
if (itemToRemove != null) {
|
||||||
val position = launchers.indexOf(itemToRemove)
|
val position = launchers.indexOfFirst { it.getLauncherIdentifier() == item.getItemIdentifier() }
|
||||||
launchers.remove(itemToRemove)
|
launchers.removeAt(position)
|
||||||
notifyItemRemoved(position)
|
notifyItemRemoved(position)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user