2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-11 13:11:01 +00:00

Fixes #3365 - Set selectedFolder to null if it's already selected (#3415)

This commit is contained in:
Andrei Teslovan 2019-06-13 18:52:35 +03:00 committed by Colin Lee
parent 5eb2bc6d55
commit e458d8b6a1

View File

@ -58,7 +58,12 @@ class SelectBookmarkFolderAdapter(private val sharedViewModel: BookmarksSharedVi
tree[position].node == sharedViewModel.selectedFolder, tree[position].node == sharedViewModel.selectedFolder,
object : SelectionInterface { object : SelectionInterface {
override fun itemSelected(node: BookmarkNode) { override fun itemSelected(node: BookmarkNode) {
sharedViewModel.selectedFolder = node sharedViewModel.apply {
when (selectedFolder) {
node -> selectedFolder = null
else -> selectedFolder = node
}
}
notifyDataSetChanged() notifyDataSetChanged()
} }
}) })