2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-02 03:40:16 +00:00

Fixes #1496: Crash adding bookmark folder

This commit is contained in:
Colin Lee 2019-04-09 13:04:26 -05:00 committed by Jeff Boek
parent 51eb231936
commit 61e99ea476

View File

@ -59,13 +59,18 @@ class AddBookmarkFolderFragment : Fragment(), CoroutineScope {
launch(IO) {
sharedViewModel.selectedFolder = sharedViewModel.selectedFolder
?: requireComponents.core.bookmarksStorage.getTree(BookmarkRoot.Mobile.id)
bookmark_add_folder_parent_selector.text = sharedViewModel.selectedFolder!!.title
bookmark_add_folder_parent_selector.setOnClickListener {
Navigation.findNavController(requireActivity(), R.id.container)
.navigate(
AddBookmarkFolderFragmentDirections
.actionBookmarkAddFolderFragmentToBookmarkSelectFolderFragment(BookmarkRoot.Root.id, true)
)
launch(Main) {
bookmark_add_folder_parent_selector.text = sharedViewModel.selectedFolder!!.title
bookmark_add_folder_parent_selector.setOnClickListener {
Navigation.findNavController(requireActivity(), R.id.container)
.navigate(
AddBookmarkFolderFragmentDirections
.actionBookmarkAddFolderFragmentToBookmarkSelectFolderFragment(
BookmarkRoot.Root.id,
true
)
)
}
}
}
}