From 33ddcdd0feeaba5d7b9232db003d06a0287f7428 Mon Sep 17 00:00:00 2001 From: hoossayn Date: Fri, 22 Mar 2024 14:34:05 +0100 Subject: [PATCH] Bug 1812712 - implement open in background in bookmark manager --- .../mozilla/fenix/library/bookmarks/BookmarkController.kt | 6 +++++- .../fenix/library/bookmarks/BookmarkFragmentInteractor.kt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt b/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt index d45b50b0a645..28e469db65a3 100644 --- a/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt +++ b/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkController.kt @@ -159,7 +159,11 @@ class DefaultBookmarkController( ) } - override fun handleOpeningBookmark(item: BookmarkNode, mode: BrowsingMode, openInBackground: Boolean) { + override fun handleOpeningBookmark( + item: BookmarkNode, + mode: BrowsingMode, + openInBackground: Boolean, + ) { openInNewTab(item.url!!, mode) showSnackbar(resources.getString(R.string.bookmark_opened_in_background)) if (!openInBackground) diff --git a/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractor.kt b/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractor.kt index ee9b0ddf4bae..bd965dc6b5a2 100644 --- a/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractor.kt +++ b/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragmentInteractor.kt @@ -89,6 +89,7 @@ class BookmarkFragmentInteractor( METRIC_SOURCE, ) } + override fun onOpenInPrivateTab(item: BookmarkNode) { require(item.type == BookmarkNodeType.ITEM) item.url?.let {