Skip to content

Commit e4b10b4

Browse files
committed
make sure we always hide the proper icon
1 parent 54b4b46 commit e4b10b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/launcher/adapters/LaunchersAdapter.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class LaunchersAdapter(
6262
fun hideIcon(item: HomeScreenGridItem) {
6363
val itemToRemove = launchers.firstOrNull { it.getLauncherIdentifier() == item.getItemIdentifier() }
6464
if (itemToRemove != null) {
65-
val position = launchers.indexOf(itemToRemove)
66-
launchers.remove(itemToRemove)
65+
val position = launchers.indexOfFirst { it.getLauncherIdentifier() == item.getItemIdentifier() }
66+
launchers.removeAt(position)
6767
notifyItemRemoved(position)
6868
}
6969
}

0 commit comments

Comments
 (0)