For #3487 - Add back open image in new tab
parent
a250241523
commit
f7c9ab11eb
|
@ -34,6 +34,7 @@ import mozilla.components.browser.session.SessionManager
|
|||
import mozilla.components.feature.accounts.FxaCapability
|
||||
import mozilla.components.feature.accounts.FxaWebChannelFeature
|
||||
import mozilla.components.feature.app.links.AppLinksFeature
|
||||
import mozilla.components.feature.contextmenu.ContextMenuCandidate
|
||||
import mozilla.components.feature.contextmenu.ContextMenuFeature
|
||||
import mozilla.components.feature.downloads.DownloadsFeature
|
||||
import mozilla.components.feature.downloads.manager.FetchDownloadManager
|
||||
|
@ -225,7 +226,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs
|
|||
feature = ContextMenuFeature(
|
||||
fragmentManager = parentFragmentManager,
|
||||
store = store,
|
||||
candidates = FenixContextMenuCandidate.defaultCandidates(
|
||||
candidates = ContextMenuCandidate.defaultCandidates(
|
||||
context,
|
||||
context.components.useCases.tabsUseCases,
|
||||
context.components.useCases.contextMenuUseCases,
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.browser
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import mozilla.components.feature.contextmenu.ContextMenuCandidate
|
||||
import mozilla.components.feature.contextmenu.ContextMenuUseCases
|
||||
import mozilla.components.feature.contextmenu.DefaultSnackbarDelegate
|
||||
import mozilla.components.feature.tabs.TabsUseCases
|
||||
|
||||
class FenixContextMenuCandidate {
|
||||
companion object {
|
||||
/**
|
||||
* Returns the default list of context menu candidates.
|
||||
*
|
||||
* We are removing open image in new tab temporarily see https://github.com/mozilla-mobile/fenix/issues/2312
|
||||
*/
|
||||
fun defaultCandidates(
|
||||
context: Context,
|
||||
tabsUseCases: TabsUseCases,
|
||||
contextMenuUseCases: ContextMenuUseCases,
|
||||
snackBarParentView: View,
|
||||
snackbarDelegate: ContextMenuCandidate.SnackbarDelegate = DefaultSnackbarDelegate()
|
||||
): List<ContextMenuCandidate> = listOf(
|
||||
ContextMenuCandidate.createOpenInNewTabCandidate(
|
||||
context,
|
||||
tabsUseCases,
|
||||
snackBarParentView,
|
||||
snackbarDelegate
|
||||
),
|
||||
ContextMenuCandidate.createOpenInPrivateTabCandidate(
|
||||
context,
|
||||
tabsUseCases,
|
||||
snackBarParentView,
|
||||
snackbarDelegate
|
||||
),
|
||||
ContextMenuCandidate.createCopyLinkCandidate(context, snackBarParentView, snackbarDelegate),
|
||||
ContextMenuCandidate.createShareLinkCandidate(context),
|
||||
ContextMenuCandidate.createSaveImageCandidate(context, contextMenuUseCases),
|
||||
ContextMenuCandidate.createCopyImageLocationCandidate(context, snackBarParentView, snackbarDelegate)
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue