1
0
Fork 0

For #8652 - Allow sharing multiple bookmarks

master
David Walsh 2020-03-03 11:05:41 -06:00 committed by Emily Kager
parent 862be3e95f
commit 681d6cf8a1
1 changed files with 4 additions and 4 deletions

View File

@ -166,8 +166,6 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
} else {
inflater.inflate(R.menu.bookmarks_select_multi, menu)
}
menu.findItem(R.id.share_bookmark_multi_select)?.isVisible = mode.selectedItems.size == 1
}
}
}
@ -196,10 +194,12 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
true
}
R.id.share_bookmark_multi_select -> {
val bookmark = bookmarkStore.state.mode.selectedItems.first()
val shareTabs = bookmarkStore.state.mode.selectedItems.map {
ShareData(url = it.url, title = it.title)
}
navigate(
BookmarkFragmentDirections.actionBookmarkFragmentToShareFragment(
data = arrayOf(ShareData(url = bookmark.url, title = bookmark.title))
data = shareTabs.toTypedArray()
)
)
true