mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/1951: Bookmarks library pane displays everything from root down (https://github.com/mozilla-mobile/fenix/pull/2135)
This commit is contained in:
parent
886a4fbeba
commit
9b94394787
@ -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) {
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user