mirror of
https://github.com/SimpleMobileTools/Simple-Launcher.git
synced 2025-04-23 06:17:20 +02:00
make sure we always hide the proper icon
This commit is contained in:
parent
54b4b46da3
commit
e4b10b4013
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user