parent
3734d08f17
commit
f1050eaff5
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue