@ -46,6 +46,7 @@ import org.mozilla.fenix.ext.minus
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.urlToTrimmedHost
import org.mozilla.fenix.library.LibraryPageFragment
import org.mozilla.fenix.share.ShareTab
import org.mozilla.fenix.utils.allowUndo
@Suppress ( " TooManyFunctions " , " LargeClass " )
@ -164,7 +165,7 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), BackHandler {
inflater . inflate ( R . menu . bookmarks _select _multi , menu )
}
menu . findItem ( R . id . edit _bookmark _multi _select ) ?. isVisible = mode . selectedItems . size == 1
menu . findItem ( R . id . shar e_bookmark _multi _select ) ?. isVisible = mode . selectedItems . size == 1
}
}
}
@ -197,11 +198,13 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), BackHandler {
metrics ?. track ( Event . OpenedBookmarksInPrivateTabs )
true
}
R . id . edit _bookmark _multi _select -> {
R . id . shar e_bookmark _multi _select -> {
val bookmark = bookmarkStore . state . mode . selectedItems . first ( )
navigate (
BookmarkFragmentDirections . actionBookmarkFragmentToBookmarkEditFragment (
bookmark . guid
BookmarkFragmentDirections . actionBookmarkFragmentToShareFragment (
url = bookmark . url ,
title = bookmark . title ,
tabs = arrayOf ( ShareTab ( bookmark . url . orEmpty ( ) , bookmark . title . orEmpty ( ) ) )
)
)
true