diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderAdapter.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderAdapter.kt index 3651d086f4..e05916f52e 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderAdapter.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/selectfolder/SelectBookmarkFolderAdapter.kt @@ -58,7 +58,12 @@ class SelectBookmarkFolderAdapter(private val sharedViewModel: BookmarksSharedVi tree[position].node == sharedViewModel.selectedFolder, object : SelectionInterface { override fun itemSelected(node: BookmarkNode) { - sharedViewModel.selectedFolder = node + sharedViewModel.apply { + when (selectedFolder) { + node -> selectedFolder = null + else -> selectedFolder = node + } + } notifyDataSetChanged() } })