mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/1922 - Open bookmark in new tab menu should open and show new tab
This commit is contained in:
parent
939669dbec
commit
d162e11f58
@ -184,15 +184,23 @@ class BookmarkFragment : Fragment(), CoroutineScope, BackHandler, AccountObserve
|
||||
}
|
||||
is BookmarkAction.OpenInNewTab -> {
|
||||
it.item.url?.let { url ->
|
||||
requireComponents.useCases.tabsUseCases.addTab.invoke(url)
|
||||
(activity as HomeActivity).browsingModeManager.mode = BrowsingModeManager.Mode.Normal
|
||||
(activity as HomeActivity).browsingModeManager.mode =
|
||||
BrowsingModeManager.Mode.Normal
|
||||
(activity as HomeActivity).openToBrowserAndLoad(
|
||||
text = url,
|
||||
from = BrowserDirection.FromBookmarks
|
||||
)
|
||||
requireComponents.analytics.metrics.track(Event.OpenedBookmarkInNewTab)
|
||||
}
|
||||
}
|
||||
is BookmarkAction.OpenInPrivateTab -> {
|
||||
it.item.url?.let { url ->
|
||||
requireComponents.useCases.tabsUseCases.addPrivateTab.invoke(url)
|
||||
(activity as HomeActivity).browsingModeManager.mode = BrowsingModeManager.Mode.Private
|
||||
(activity as HomeActivity).browsingModeManager.mode =
|
||||
BrowsingModeManager.Mode.Private
|
||||
(activity as HomeActivity).openToBrowserAndLoad(
|
||||
text = url,
|
||||
from = BrowserDirection.FromBookmarks
|
||||
)
|
||||
requireComponents.analytics.metrics.track(Event.OpenedBookmarkInPrivateTab)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user