Verified Commit be94d66d authored by Alex Catarineu's avatar Alex Catarineu Committed by aguestuser
Browse files

Modify UI/UX

Bug 40015: Modify Home menu

Bug 40016: Hide unwanted Settings

Bug 40016: Modify Default toolbar menu

Bug 40016: Add Donate settings button

Bug 40016: Move Allow Screenshots under Advanced

Bug 40016: Don't install WebCompat webext

Bug 40016: Don't onboard Search Suggestions

Bug 40094: Do not use MasterPasswordTipProvider in HomeFragment

Bug 40095: Hide "Sign in to sync" in bookmarks

Bug 40031: Hide Mozilla-specific items on About page

Bug 40032: Set usesCleartextTraffic as false

Bug 40063: Do not sort search engines alphabetically

Bug 34378: Port external helper app prompting

With the corresponding android-components patch, this allows all `startActivity`
that may open external apps to be replaced by `TorUtils.startActivityPrompt`.

Bug 34403: Disable Normal mode by default

Bug 40087: Implement a switch for english locale spoofing

Bug 40144: Hide Download Manager

Bug 40141: Hide EME site permission

Bug 40166: Hide "Normal" tab (again) and Sync tab in TabTray

Bug 40167: Hide "Save to Collection" in menu

Bug 40172: Find the Quit button

Bug 40186: Hide Credit Cards in Settings

Bug 40198: Spoof English toggle now overlaps with locale list
parent b462d44f
......@@ -32,7 +32,7 @@
android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true"
android:theme="@style/NormalTheme"
android:usesCleartextTraffic="true"
android:usesCleartextTraffic="false"
tools:ignore="UnusedAttribute">
<!--
......
......@@ -4,6 +4,7 @@
package org.mozilla.fenix
import android.app.PendingIntent
import android.content.Context
import android.content.Intent
import android.content.Intent.ACTION_MAIN
......@@ -51,6 +52,8 @@ import mozilla.components.concept.engine.EngineView
import mozilla.components.concept.storage.BookmarkNode
import mozilla.components.concept.storage.BookmarkNodeType
import mozilla.components.concept.storage.HistoryMetadataKey
import mozilla.components.feature.app.links.RedirectDialogFragment
import mozilla.components.feature.app.links.SimpleRedirectDialogFragment
import mozilla.components.feature.contextmenu.DefaultSelectionActionDelegate
import mozilla.components.feature.privatemode.notification.PrivateNotificationFeature
import mozilla.components.feature.search.BrowserStoreSearchAdapter
......@@ -66,6 +69,7 @@ import mozilla.components.support.ktx.kotlin.isUrl
import mozilla.components.support.ktx.kotlin.toNormalizedUrl
import mozilla.components.support.locale.LocaleAwareAppCompatActivity
import mozilla.components.support.utils.SafeIntent
import mozilla.components.support.utils.TorUtils
import mozilla.components.support.utils.toSafeIntent
import mozilla.components.support.webextensions.WebExtensionPopupFeature
import org.mozilla.fenix.GleanMetrics.Metrics
......@@ -187,9 +191,11 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
private val startupPathProvider = StartupPathProvider()
private lateinit var startupTypeTelemetry: StartupTypeTelemetry
private var dialog: RedirectDialogFragment? = null
final override fun onCreate(savedInstanceState: Bundle?) {
// DO NOT MOVE ANYTHING ABOVE THIS getProfilerTime CALL.
val startTimeProfiler = components.core.engine.profiler?.getProfilerTime()
components.core.engine.profiler?.addMarker("Activity.onCreate", "HomeActivity")
components.strictMode.attachListenerToDisablePenaltyDeath(supportFragmentManager)
MarkersFragmentLifecycleCallbacks.register(supportFragmentManager, components.core.engine)
......@@ -490,6 +496,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
super.recreate()
}
// Copied from mozac AppLinksFeature.kt
internal fun getOrCreateDialog(): RedirectDialogFragment {
val existingDialog = dialog
if (existingDialog != null) {
return existingDialog
}
SimpleRedirectDialogFragment.newInstance().also {
dialog = it
return it
}
}
private fun isAlreadyADialogCreated(): Boolean {
return findPreviousDialogFragment() != null
}
private fun findPreviousDialogFragment(): RedirectDialogFragment? {
return supportFragmentManager.findFragmentByTag(RedirectDialogFragment.FRAGMENT_TAG) as? RedirectDialogFragment
}
/**
* Handles intents received when the activity is open.
*/
......@@ -502,6 +528,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
}
open fun handleNewIntent(intent: Intent) {
val startIntent = intent.getParcelableExtra<PendingIntent>(TorUtils.TORBROWSER_START_ACTIVITY_PROMPT)
if (startIntent != null) {
if (startIntent.creatorPackage == applicationContext.packageName) {
val dialog = getOrCreateDialog()
dialog.onConfirmRedirect = {
@Suppress("EmptyCatchBlock")
try {
startIntent.send()
} catch (error: PendingIntent.CanceledException) {
}
}
dialog.onCancelRedirect = {}
if (!isAlreadyADialogCreated()) {
dialog.showNow(supportFragmentManager, RedirectDialogFragment.FRAGMENT_TAG)
}
}
return
}
// Diagnostic breadcrumb for "Display already aquired" crash:
// https://github.com/mozilla-mobile/android-components/issues/7960
breadcrumb(
......@@ -696,11 +742,17 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
internal fun getModeFromIntentOrLastKnown(intent: Intent?): BrowsingMode {
intent?.toSafeIntent()?.let {
if (it.hasExtra(PRIVATE_BROWSING_MODE)) {
val startPrivateMode = it.getBooleanExtra(PRIVATE_BROWSING_MODE, false)
val startPrivateMode = settings().shouldDisableNormalMode ||
it.getBooleanExtra(PRIVATE_BROWSING_MODE, settings().openLinksInAPrivateTab)
return BrowsingMode.fromBoolean(isPrivate = startPrivateMode)
}
}
return settings().lastKnownMode
return when {
settings().shouldDisableNormalMode -> BrowsingMode.Private
settings().openLinksInAPrivateTab -> BrowsingMode.Private
else -> settings().lastKnownMode
}
}
/**
......
......@@ -474,7 +474,7 @@ abstract class BaseBrowserFragment :
shouldForwardToThirdParties = {
PreferenceManager.getDefaultSharedPreferences(context).getBoolean(
context.getPreferenceKey(R.string.pref_key_external_download_manager), false
)
) && false
},
promptsStyling = DownloadsFeature.PromptsStyling(
gravity = Gravity.BOTTOM,
......
......@@ -122,7 +122,8 @@ class Core(
clearColor = ContextCompat.getColor(
context,
R.color.fx_mobile_layer_color_1
)
),
spoofEnglish = context.settings().spoofEnglish
)
GeckoEngine(
......@@ -130,7 +131,6 @@ class Core(
defaultSettings,
geckoRuntime
).also {
WebCompatFeature.install(it)
/**
* There are some issues around localization to be resolved, as well as questions around
......@@ -138,7 +138,8 @@ class Core(
* disabled in Fenix Release builds for now.
* This is consistent with both Fennec and Firefox Desktop.
*/
if (Config.channel.isNightlyOrDebug || Config.channel.isBeta) {
if (false && (Config.channel.isNightlyOrDebug || Config.channel.isBeta)) {
WebCompatFeature.install(it)
WebCompatReporterFeature.install(it, "fenix")
}
}
......
......@@ -68,7 +68,6 @@ open class DefaultToolbarMenu(
private var isCurrentUrlBookmarked = false
private var isBookmarkedJob: Job? = null
private val shouldDeleteDataOnQuit = context.settings().shouldDeleteBrowsingDataOnQuit
private val shouldUseBottomToolbar = context.settings().shouldUseBottomToolbar
private val accountManager = FenixAccountManager(context)
......@@ -177,20 +176,20 @@ open class DefaultToolbarMenu(
} ?: false
// End of predicates //
val installToHomescreen = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_install_on_homescreen),
startImageResource = R.drawable.mozac_ic_add_to_home_screen,
iconTintColorResource = primaryTextColor(),
highlight = BrowserMenuHighlight.LowPriority(
label = context.getString(R.string.browser_menu_install_on_homescreen),
notificationTint = getColor(context, R.color.fx_mobile_icon_color_information)
),
isHighlighted = {
!context.settings().installPwaOpened
}
) {
onItemTapped.invoke(ToolbarMenu.Item.InstallPwaToHomeScreen)
}
// val installToHomescreen = BrowserMenuHighlightableItem(
// label = context.getString(R.string.browser_menu_install_on_homescreen),
// startImageResource = R.drawable.mozac_ic_add_to_home_screen,
// iconTintColorResource = primaryTextColor(),
// highlight = BrowserMenuHighlight.LowPriority(
// label = context.getString(R.string.browser_menu_install_on_homescreen),
// notificationTint = getColor(context, R.color.fx_mobile_icon_color_information)
// ),
// isHighlighted = {
// !context.settings().installPwaOpened
// }
// ) {
// onItemTapped.invoke(ToolbarMenu.Item.InstallPwaToHomeScreen)
// }
val newTabItem = BrowserMenuImageText(
context.getString(R.string.library_new_tab),
......@@ -200,13 +199,13 @@ open class DefaultToolbarMenu(
onItemTapped.invoke(ToolbarMenu.Item.NewTab)
}
val historyItem = BrowserMenuImageText(
context.getString(R.string.library_history),
R.drawable.ic_history,
primaryTextColor()
) {
onItemTapped.invoke(ToolbarMenu.Item.History)
}
//val historyItem = BrowserMenuImageText(
// context.getString(R.string.library_history),
// R.drawable.ic_history,
// primaryTextColor()
//) {
// onItemTapped.invoke(ToolbarMenu.Item.History)
//}
val downloadsItem = BrowserMenuImageText(
context.getString(R.string.library_downloads),
......@@ -259,19 +258,19 @@ open class DefaultToolbarMenu(
onItemTapped.invoke(ToolbarMenu.Item.OpenInApp)
}
val reportSiteIssuePlaceholder = WebExtensionPlaceholderMenuItem(
id = WebCompatReporterFeature.WEBCOMPAT_REPORTER_EXTENSION_ID,
iconTintColorResource = primaryTextColor()
)
//val reportSiteIssuePlaceholder = WebExtensionPlaceholderMenuItem(
// id = WebCompatReporterFeature.WEBCOMPAT_REPORTER_EXTENSION_ID,
// iconTintColorResource = primaryTextColor()
//)
val addToHomeScreenItem = BrowserMenuImageText(
label = context.getString(R.string.browser_menu_add_to_homescreen),
imageResource = R.drawable.mozac_ic_add_to_home_screen,
iconTintColorResource = primaryTextColor(),
isCollapsingMenuLimit = true
) {
onItemTapped.invoke(ToolbarMenu.Item.AddToHomeScreen)
}
//val addToHomeScreenItem = BrowserMenuImageText(
// label = context.getString(R.string.browser_menu_add_to_homescreen),
// imageResource = R.drawable.mozac_ic_add_to_home_screen,
// iconTintColorResource = primaryTextColor(),
// isCollapsingMenuLimit = true
//) {
// onItemTapped.invoke(ToolbarMenu.Item.AddToHomeScreen)
//}
val addRemoveTopSitesItem = TwoStateBrowserMenuImageText(
primaryLabel = context.getString(R.string.browser_menu_add_to_top_sites),
......@@ -291,13 +290,13 @@ open class DefaultToolbarMenu(
}
)
val saveToCollectionItem = BrowserMenuImageText(
label = context.getString(R.string.browser_menu_save_to_collection_2),
imageResource = R.drawable.ic_tab_collection,
iconTintColorResource = primaryTextColor()
) {
onItemTapped.invoke(ToolbarMenu.Item.SaveToCollection)
}
//val saveToCollectionItem = BrowserMenuImageText(
// label = context.getString(R.string.browser_menu_save_to_collection_2),
// imageResource = R.drawable.ic_tab_collection,
// iconTintColorResource = primaryTextColor()
//) {
// onItemTapped.invoke(ToolbarMenu.Item.SaveToCollection)
//}
val settingsItem = BrowserMenuHighlightableItem(
label = context.getString(R.string.browser_menu_settings),
......@@ -343,18 +342,18 @@ open class DefaultToolbarMenu(
onItemTapped.invoke(ToolbarMenu.Item.Quit)
}
private fun getSyncItemTitle() =
accountManager.accountProfileEmail ?: context.getString(R.string.sync_menu_sign_in)
// private fun getSyncItemTitle() =
// accountManager.accountProfileEmail ?: context.getString(R.string.sync_menu_sign_in)
val syncMenuItem = BrowserMenuImageText(
getSyncItemTitle(),
R.drawable.ic_signed_out,
primaryTextColor()
) {
onItemTapped.invoke(
ToolbarMenu.Item.SyncAccount(accountManager.accountState)
)
}
// val syncMenuItem = BrowserMenuImageText(
// getSyncItemTitle(),
// R.drawable.ic_signed_out,
// primaryTextColor()
// ) {
// onItemTapped.invoke(
// ToolbarMenu.Item.SyncAccount(accountManager.accountState)
// )
// }
@VisibleForTesting(otherwise = PRIVATE)
val coreMenuItems by lazy {
......@@ -365,10 +364,10 @@ open class DefaultToolbarMenu(
newTabItem,
BrowserMenuDivider(),
bookmarksItem,
historyItem,
//historyItem,
downloadsItem,
extensionsItem,
syncMenuItem,
//syncMenuItem,
BrowserMenuDivider(),
defaultBrowserItem,
defaultBrowserItem?.let { BrowserMenuDivider() },
......@@ -376,15 +375,15 @@ open class DefaultToolbarMenu(
desktopSiteItem,
customizeReaderView.apply { visible = ::shouldShowReaderViewCustomization },
openInApp.apply { visible = ::shouldShowOpenInApp },
reportSiteIssuePlaceholder,
//reportSiteIssuePlaceholder,
BrowserMenuDivider(),
addToHomeScreenItem.apply { visible = ::canAddToHomescreen },
installToHomescreen.apply { visible = ::canInstall },
// addToHomeScreenItem.apply { visible = ::canAddToHomescreen },
// installToHomescreen.apply { visible = ::canInstall },
addRemoveTopSitesItem,
saveToCollectionItem,
// saveToCollectionItem,
BrowserMenuDivider(),
settingsItem,
if (shouldDeleteDataOnQuit) deleteDataOnQuit else null,
deleteDataOnQuit,
if (shouldUseBottomToolbar) BrowserMenuDivider() else null,
if (shouldUseBottomToolbar) menuToolbar else null
)
......
......@@ -33,6 +33,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat
import androidx.core.view.children
import androidx.core.view.doOnLayout
import androidx.core.view.isGone
import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams
import androidx.fragment.app.Fragment
......@@ -91,9 +92,7 @@ import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.components.TabCollectionStorage
import org.mozilla.fenix.components.accounts.AccountState
import org.mozilla.fenix.components.metrics.Event
import org.mozilla.fenix.components.tips.FenixTipManager
import org.mozilla.fenix.components.tips.Tip
import org.mozilla.fenix.components.tips.providers.MasterPasswordTipProvider
import org.mozilla.fenix.components.toolbar.FenixTabCounterMenu
import org.mozilla.fenix.components.toolbar.ToolbarPosition
import org.mozilla.fenix.databinding.FragmentHomeBinding
......@@ -129,7 +128,6 @@ import org.mozilla.fenix.nimbus.FxNimbus
import org.mozilla.fenix.onboarding.FenixOnboarding
import org.mozilla.fenix.perf.MarkersFragmentLifecycleCallbacks
import org.mozilla.fenix.settings.SupportUtils
import org.mozilla.fenix.settings.SupportUtils.SumoTopic.HELP
import org.mozilla.fenix.settings.deletebrowsingdata.deleteAndQuit
import org.mozilla.fenix.tor.bootstrap.TorQuickStart
import org.mozilla.fenix.theme.ThemeManager
......@@ -263,17 +261,6 @@ class HomeFragment : Fragment() {
expandedCollections = emptySet(),
mode = currentMode.getCurrentMode(),
topSites = components.core.topSitesStorage.cachedTopSites.sort(),
tip = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
FenixTipManager(
listOf(
MasterPasswordTipProvider(
requireContext(),
::navToSavedLogins,
::dismissTip
)
)
).getTip()
},
recentBookmarks = emptyList(),
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome,
showSetAsDefaultBrowserCard = components.settings.shouldShowSetAsDefaultBrowserCard(),
......@@ -675,6 +662,8 @@ class HomeFragment : Fragment() {
)
}
binding.privateBrowsingButton.isGone = view.context.settings().shouldDisableNormalMode
consumeFrom(requireComponents.core.store) {
updateTabCounter(it)
}
......@@ -832,17 +821,6 @@ class HomeFragment : Fragment() {
collections = components.core.tabCollectionStorage.cachedTabCollections,
mode = currentMode.getCurrentMode(),
topSites = components.core.topSitesStorage.cachedTopSites.sort(),
tip = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
FenixTipManager(
listOf(
MasterPasswordTipProvider(
requireContext(),
::navToSavedLogins,
::dismissTip
)
)
).getTip()
},
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome,
// Provide an initial state for recent tabs to prevent re-rendering on the home screen.
// This will otherwise cause a visual jump as the section gets rendered from no state
......@@ -1142,7 +1120,7 @@ class HomeFragment : Fragment() {
}
HomeMenu.Item.Help -> {
(activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = SupportUtils.getSumoURLForTopic(context, HELP),
searchTermOrURL = SupportUtils.getTorHelpPageUrl(),
newTab = true,
from = BrowserDirection.FromHome
)
......
......@@ -111,7 +111,7 @@ class HomeMenu(
@Suppress("ComplexMethod")
private fun coreMenuItems(): List<BrowserMenuItem> {
val settings = context.components.settings
// val experiments = context.components.analytics.experiments
val bookmarksItem = BrowserMenuImageText(
context.getString(R.string.library_bookmarks),
......@@ -121,13 +121,13 @@ class HomeMenu(
onItemTapped.invoke(Item.Bookmarks)
}
val historyItem = BrowserMenuImageText(
context.getString(R.string.library_history),
R.drawable.ic_history,
primaryTextColor
) {
onItemTapped.invoke(Item.History)
}
// val historyItem = BrowserMenuImageText(
// context.getString(R.string.library_history),
// R.drawable.ic_history,
// primaryTextColor
// ) {
// onItemTapped.invoke(Item.History)
// }
val downloadsItem = BrowserMenuImageText(
context.getString(R.string.library_downloads),
......@@ -137,13 +137,13 @@ class HomeMenu(
onItemTapped.invoke(Item.Downloads)
}
val extensionsItem = BrowserMenuImageText(
context.getString(R.string.browser_menu_add_ons),
R.drawable.ic_addons_extensions,
primaryTextColor
) {
onItemTapped.invoke(Item.Extensions)
}
// val extensionsItem = BrowserMenuImageText(
// context.getString(R.string.browser_menu_add_ons),
// R.drawable.ic_addons_extensions,
// primaryTextColor
// ) {
// onItemTapped.invoke(Item.Extensions)
// }
val whatsNewItem = BrowserMenuHighlightableItem(
context.getString(R.string.browser_menu_whats_new),
......@@ -174,9 +174,9 @@ class HomeMenu(
}
// Use nimbus to set the icon and title.
val nimbusValidation = FxNimbus.features.nimbusValidation.value()
// val nimbusValidation = FxNimbus.features.nimbusValidation.value()
val settingsItem = BrowserMenuImageText(
nimbusValidation.settingsTitle,
context.getString(R.string.browser_menu_settings),
R.drawable.mozac_ic_settings,
primaryTextColor
) {
......@@ -196,10 +196,10 @@ class HomeMenu(
val menuItems = listOfNotNull(
bookmarksItem,
historyItem,
//historyItem,
downloadsItem,
extensionsItem,
syncSignInMenuItem,
// extensionsItem,
// syncSignInMenuItem,
accountAuthItem,
BrowserMenuDivider(),
desktopItem,
......@@ -208,7 +208,7 @@ class HomeMenu(
helpItem,
customizeHomeItem,
settingsItem,
if (settings.shouldDeleteBrowsingDataOnQuit) quitItem else null
quitItem
).also { items ->
items.getHighlight()?.let { onHighlightPresent(it) }
}
......
......@@ -46,7 +46,6 @@ import org.mozilla.fenix.ext.bookmarkStorage
import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.minus
import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.ext.setTextColor
import org.mozilla.fenix.ext.toShortUrl
import org.mozilla.fenix.library.LibraryPageFragment
......@@ -130,16 +129,9 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
val accountManager = requireComponents.backgroundServices.accountManager
consumeFrom(bookmarkStore) {
bookmarkView.update(it)
// Only display the sign-in prompt if we're inside of the virtual "Desktop Bookmarks" node.
// Don't want to pester user too much with it, and if there are lots of bookmarks present,
// it'll just get visually lost. Inside of the "Desktop Bookmarks" node, it'll nicely stand-out,
// since there are always only three other items in there. It's also the right place contextually.
bookmarkView.binding.bookmarkFoldersSignIn.isVisible =
it.tree?.guid == BookmarkRoot.Root.id && accountManager.authenticatedAccount() == null
bookmarkView.binding.bookmarkFoldersSignIn.isVisible = false
}
}
......
......@@ -341,6 +341,13 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
searchSuggestionHintBinding.title.text =
getString(R.string.search_suggestions_onboarding_title)
// Hide Search Suggestions prompt and disable
inflated.visibility = View.GONE
requireContext().settings().also {
it.shouldShowSearchSuggestionsInPrivate = false
it.showSearchSuggestionsInPrivateOnboardingFinished = true
}
}
binding.searchSuggestionsHint.setOnInflateListener((stubListener))
......
......@@ -215,6 +215,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
requirePreference<Preference>(R.string.pref_key_tabs)
tabSettingsPreference.summary = context?.settings()?.getTabTimeoutString()
// Hide "Delete browsing data on quit" when in Private Browsing-only mode
deleteBrowsingDataPreference.isVisible =
!deleteBrowsingDataPreference.context.settings().shouldDisableNormalMode
setupPreferences()
if (shouldUpdateAccountUIState) {
......@@ -275,10 +279,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
}
resources.getString(R.string.pref_key_help) -> {
(activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = SupportUtils.getSumoURLForTopic(
requireContext(),
SupportUtils.SumoTopic.HELP
),
searchTermOrURL = SupportUtils.getTorHelpPageUrl(),
newTab = true,
from = BrowserDirection.FromSettings
)
......@@ -307,6 +308,15 @@ class SettingsFragment : PreferenceFragmentCompat() {
resources.getString(R.string.pref_key_about) -> {
SettingsFragmentDirections.actionSettingsFragmentToAboutFragment()
}
resources.getString(R.string.pref_key_donate) -> {
(activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = SupportUtils.DONATE_URL,
newTab = true,
from = BrowserDirection.FromSettings
)
null
}
resources.getString(R.string.pref_key_account) -> {
SettingsFragmentDirections.actionSettingsFragmentToAccountSettingsFragment()
}
......@@ -407,6 +417,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
val preferenceOpenLinksInExternalApp =
findPreference<Preference>(getPreferenceKey(R.string.pref_key_open_links_in_external_app))
requirePreference<Preference>(R.string.pref_key_allow_screenshots_in_private_mode).apply {
onPreferenceChangeListener = SharedPreferenceUpdater()
}
if (!Config.channel.isReleased) {
preferenceLeakCanary?.setOnPreferenceChangeListener { _, newValue ->
val isEnabled = newValue == true
......