Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Bug 1812712 - implement open in background in bookmark manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoossayn committed Mar 22, 2024
1 parent 98ad1b0 commit aa17830
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ interface BookmarkController {
fun handleAllBookmarksDeselected()
fun handleCopyUrl(item: BookmarkNode)
fun handleBookmarkSharing(item: BookmarkNode)
/**
* Handles opening bookmark
* @param item Bookmark node.
* @param mode Browsing mode.
* @param openInBackground If bookmark should open in background or not
*/
fun handleOpeningBookmark(item: BookmarkNode, mode: BrowsingMode, openInBackground: Boolean)
fun handleOpeningFolderBookmarks(folder: BookmarkNode, mode: BrowsingMode)

Expand Down Expand Up @@ -166,8 +172,9 @@ class DefaultBookmarkController(
) {
openInNewTab(item.url!!, mode)
showSnackbar(resources.getString(R.string.bookmark_opened_in_background))
if (!openInBackground)
if (!openInBackground) {
showTabTray(mode.isPrivate)
}
}

private fun extractURLsFromTree(node: BookmarkNode): MutableList<String> {
Expand Down

0 comments on commit aa17830

Please sign in to comment.