diff --git a/app/src/main/java/org/mozilla/fenix/library/LibraryFragment.kt b/app/src/main/java/org/mozilla/fenix/library/LibraryFragment.kt index a95a608610..5e5da8fe7b 100644 --- a/app/src/main/java/org/mozilla/fenix/library/LibraryFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/LibraryFragment.kt @@ -54,10 +54,12 @@ class LibraryFragment : Fragment() { ) ) - libraryBookmarks.setOnClickListener(Navigation.createNavigateOnClickListener( - LibraryFragmentDirections.actionLibraryFragmentToBookmarksFragment(BookmarkRoot.Root.id).actionId, - BookmarkFragmentArgs(BookmarkRoot.Root.id).toBundle() - )) + libraryBookmarks.setOnClickListener( + Navigation.createNavigateOnClickListener( + LibraryFragmentDirections.actionLibraryFragmentToBookmarksFragment(BookmarkRoot.Mobile.id).actionId, + BookmarkFragmentArgs(BookmarkRoot.Mobile.id).toBundle() + ) + ) } override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt index eaaae461de..a40ad7ab6e 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt @@ -89,7 +89,7 @@ class BookmarkFragment : Fragment(), CoroutineScope, BackHandler, AccountObserve checkIfSignedIn() 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) { currentRoot = requireComponents.core.bookmarksStorage.getTree(currentGuid) as BookmarkNode diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkUIView.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkUIView.kt index 593cb9c70d..a095fee387 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkUIView.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkUIView.kt @@ -111,8 +111,9 @@ class BookmarkUIView( private fun setTitle(root: BookmarkNode?) { (activity as? AppCompatActivity)?.title = - if (root?.title in setOf( - "root", + if (root?.guid in setOf( + BookmarkRoot.Mobile.id, + BookmarkRoot.Root.id, null ) ) context.getString(R.string.library_bookmarks) else root!!.title