mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/23076 - Clean up unneeded FeatureFlags
This commit is contained in:
parent
ae6ba66b10
commit
7ef7a37e24
@ -23,16 +23,6 @@ object FeatureFlags {
|
||||
*/
|
||||
val addressesFeature = Config.channel.isNightlyOrDebug
|
||||
|
||||
/**
|
||||
* Enables WebAuthn support.
|
||||
*/
|
||||
const val webAuthFeature = true
|
||||
|
||||
/**
|
||||
* Enables the Home button in the browser toolbar to navigate back to the home screen.
|
||||
*/
|
||||
const val showHomeButtonFeature = true
|
||||
|
||||
/**
|
||||
* Enables the Start On Home feature in the settings page.
|
||||
*/
|
||||
@ -63,11 +53,6 @@ object FeatureFlags {
|
||||
*/
|
||||
const val showHomeBehindSearch = true
|
||||
|
||||
/**
|
||||
* Enables customizing the home screen
|
||||
*/
|
||||
const val customizeHome = true
|
||||
|
||||
/**
|
||||
* Identifies and separates the tabs list with a group containing search term tabs.
|
||||
*/
|
||||
|
@ -694,7 +694,7 @@ abstract class BaseBrowserFragment :
|
||||
)
|
||||
|
||||
// This component feature only works on Fenix when built on Mozilla infrastructure.
|
||||
if (FeatureFlags.webAuthFeature && BuildConfig.MOZILLA_OFFICIAL) {
|
||||
if (BuildConfig.MOZILLA_OFFICIAL) {
|
||||
webAuthnFeature.set(
|
||||
feature = WebAuthnFeature(
|
||||
engine = requireComponents.core.engine,
|
||||
|
@ -26,12 +26,11 @@ import mozilla.components.feature.tab.collections.TabCollection
|
||||
import mozilla.components.feature.tabs.WindowFeature
|
||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||
import org.mozilla.fenix.FeatureFlags
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.FenixSnackbar
|
||||
import org.mozilla.fenix.components.TabCollectionStorage
|
||||
import org.mozilla.fenix.components.toolbar.ToolbarMenu
|
||||
import org.mozilla.fenix.components.metrics.Event
|
||||
import org.mozilla.fenix.components.toolbar.ToolbarMenu
|
||||
import org.mozilla.fenix.ext.components
|
||||
import org.mozilla.fenix.ext.nav
|
||||
import org.mozilla.fenix.ext.requireComponents
|
||||
@ -72,19 +71,17 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
||||
)
|
||||
}
|
||||
|
||||
if (FeatureFlags.showHomeButtonFeature) {
|
||||
val homeAction = BrowserToolbar.Button(
|
||||
imageDrawable = AppCompatResources.getDrawable(
|
||||
context,
|
||||
R.drawable.mozac_ic_home
|
||||
)!!,
|
||||
contentDescription = context.getString(R.string.browser_toolbar_home),
|
||||
iconTintColorResource = ThemeManager.resolveAttribute(R.attr.primaryText, context),
|
||||
listener = browserToolbarInteractor::onHomeButtonClicked
|
||||
)
|
||||
val homeAction = BrowserToolbar.Button(
|
||||
imageDrawable = AppCompatResources.getDrawable(
|
||||
context,
|
||||
R.drawable.mozac_ic_home
|
||||
)!!,
|
||||
contentDescription = context.getString(R.string.browser_toolbar_home),
|
||||
iconTintColorResource = ThemeManager.resolveAttribute(R.attr.primaryText, context),
|
||||
listener = browserToolbarInteractor::onHomeButtonClicked
|
||||
)
|
||||
|
||||
browserToolbarView.view.addNavigationAction(homeAction)
|
||||
}
|
||||
browserToolbarView.view.addNavigationAction(homeAction)
|
||||
|
||||
if (resources.getBoolean(R.bool.tablet)) {
|
||||
val enableTint = ThemeManager.resolveAttribute(R.attr.primaryText, context)
|
||||
|
@ -23,7 +23,6 @@ import mozilla.components.concept.sync.AccountObserver
|
||||
import mozilla.components.concept.sync.AuthType
|
||||
import mozilla.components.concept.sync.OAuthAccount
|
||||
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
||||
import org.mozilla.fenix.FeatureFlags
|
||||
import org.mozilla.fenix.R
|
||||
import org.mozilla.fenix.components.accounts.AccountState
|
||||
import org.mozilla.fenix.components.accounts.FenixAccountManager
|
||||
@ -209,7 +208,7 @@ class HomeMenu(
|
||||
BrowserMenuDivider(),
|
||||
whatsNewItem,
|
||||
helpItem,
|
||||
if (FeatureFlags.customizeHome) customizeHomeItem else null,
|
||||
customizeHomeItem,
|
||||
settingsItem,
|
||||
if (settings.shouldDeleteBrowsingDataOnQuit) quitItem else null
|
||||
).also { items ->
|
||||
|
Loading…
Reference in New Issue
Block a user