2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00
This commit is contained in:
Colin Lee 2019-04-29 16:54:48 -05:00 committed by GitHub
parent 886a4fbeba
commit 9b94394787
3 changed files with 10 additions and 7 deletions

View File

@ -54,10 +54,12 @@ class LibraryFragment : Fragment() {
) )
) )
libraryBookmarks.setOnClickListener(Navigation.createNavigateOnClickListener( libraryBookmarks.setOnClickListener(
LibraryFragmentDirections.actionLibraryFragmentToBookmarksFragment(BookmarkRoot.Root.id).actionId, Navigation.createNavigateOnClickListener(
BookmarkFragmentArgs(BookmarkRoot.Root.id).toBundle() LibraryFragmentDirections.actionLibraryFragmentToBookmarksFragment(BookmarkRoot.Mobile.id).actionId,
)) BookmarkFragmentArgs(BookmarkRoot.Mobile.id).toBundle()
)
)
} }
override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {

View File

@ -89,7 +89,7 @@ class BookmarkFragment : Fragment(), CoroutineScope, BackHandler, AccountObserve
checkIfSignedIn() checkIfSignedIn()
navigation.addOnDestinationChangedListener(onDestinationChangedListener) navigation.addOnDestinationChangedListener(onDestinationChangedListener)
val currentGuid = BookmarkFragmentArgs.fromBundle(arguments!!).currentRoot.ifEmpty { BookmarkRoot.Root.id } val currentGuid = BookmarkFragmentArgs.fromBundle(arguments!!).currentRoot.ifEmpty { BookmarkRoot.Mobile.id }
launch(IO) { launch(IO) {
currentRoot = requireComponents.core.bookmarksStorage.getTree(currentGuid) as BookmarkNode currentRoot = requireComponents.core.bookmarksStorage.getTree(currentGuid) as BookmarkNode

View File

@ -111,8 +111,9 @@ class BookmarkUIView(
private fun setTitle(root: BookmarkNode?) { private fun setTitle(root: BookmarkNode?) {
(activity as? AppCompatActivity)?.title = (activity as? AppCompatActivity)?.title =
if (root?.title in setOf( if (root?.guid in setOf(
"root", BookmarkRoot.Mobile.id,
BookmarkRoot.Root.id,
null null
) )
) context.getString(R.string.library_bookmarks) else root!!.title ) context.getString(R.string.library_bookmarks) else root!!.title