diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt index 422ea9df..2f18caca 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/adapters/ItemsAdapter.kt @@ -113,7 +113,9 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList(favorites) + currFavorites.remove(oldPath) + currFavorites.add(newPath) + favorites = currFavorites + } + fun removeFavorite(path: String) { + if (!favorites.contains(path)) { + return + } + val currFavorites = HashSet(favorites) currFavorites.remove(path) favorites = currFavorites