Unverified Commit f52dc9a2 authored by Alex Catarineu's avatar Alex Catarineu Committed by Matthew Finkel
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
parent b242453d
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
android:roundIcon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/NormalTheme" android:theme="@style/NormalTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="false"
tools:ignore="UnusedAttribute"> tools:ignore="UnusedAttribute">
<!-- <!--
......
...@@ -19,12 +19,12 @@ object FeatureFlags { ...@@ -19,12 +19,12 @@ object FeatureFlags {
* *
* Tracking issue: https://github.com/mozilla-mobile/fenix/issues/13892 * Tracking issue: https://github.com/mozilla-mobile/fenix/issues/13892
*/ */
val syncedTabsInTabsTray = Config.channel.isNightlyOrDebug const val syncedTabsInTabsTray = false
/** /**
* Enables downloads with external download managers. * Enables downloads with external download managers.
*/ */
const val externalDownloadManager = true const val externalDownloadManager = false
/** /**
* Enables swipe to delete in bookmarks * Enables swipe to delete in bookmarks
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
package org.mozilla.fenix package org.mozilla.fenix
import android.app.PendingIntent
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.res.Configuration import android.content.res.Configuration
...@@ -43,6 +44,8 @@ import mozilla.components.browser.state.state.SessionState ...@@ -43,6 +44,8 @@ import mozilla.components.browser.state.state.SessionState
import mozilla.components.browser.state.state.WebExtensionState import mozilla.components.browser.state.state.WebExtensionState
import mozilla.components.concept.engine.EngineSession import mozilla.components.concept.engine.EngineSession
import mozilla.components.concept.engine.EngineView import mozilla.components.concept.engine.EngineView
import mozilla.components.feature.app.links.RedirectDialogFragment
import mozilla.components.feature.app.links.SimpleRedirectDialogFragment
import mozilla.components.feature.contextmenu.DefaultSelectionActionDelegate import mozilla.components.feature.contextmenu.DefaultSelectionActionDelegate
import mozilla.components.feature.privatemode.notification.PrivateNotificationFeature import mozilla.components.feature.privatemode.notification.PrivateNotificationFeature
import mozilla.components.feature.search.BrowserStoreSearchAdapter import mozilla.components.feature.search.BrowserStoreSearchAdapter
...@@ -56,6 +59,7 @@ import mozilla.components.support.ktx.kotlin.isUrl ...@@ -56,6 +59,7 @@ import mozilla.components.support.ktx.kotlin.isUrl
import mozilla.components.support.ktx.kotlin.toNormalizedUrl import mozilla.components.support.ktx.kotlin.toNormalizedUrl
import mozilla.components.support.locale.LocaleAwareAppCompatActivity import mozilla.components.support.locale.LocaleAwareAppCompatActivity
import mozilla.components.support.utils.SafeIntent import mozilla.components.support.utils.SafeIntent
import mozilla.components.support.utils.TorUtils
import mozilla.components.support.utils.toSafeIntent import mozilla.components.support.utils.toSafeIntent
import mozilla.components.support.webextensions.WebExtensionPopupFeature import mozilla.components.support.webextensions.WebExtensionPopupFeature
import org.mozilla.fenix.GleanMetrics.Metrics import org.mozilla.fenix.GleanMetrics.Metrics
...@@ -154,6 +158,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { ...@@ -154,6 +158,8 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
private lateinit var navigationToolbar: Toolbar private lateinit var navigationToolbar: Toolbar
private var dialog: RedirectDialogFragment? = null
final override fun onCreate(savedInstanceState: Bundle?) { final override fun onCreate(savedInstanceState: Bundle?) {
components.strictMode.attachListenerToDisablePenaltyDeath(supportFragmentManager) components.strictMode.attachListenerToDisablePenaltyDeath(supportFragmentManager)
...@@ -404,6 +410,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { ...@@ -404,6 +410,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
super.recreate() 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. * Handles intents received when the activity is open.
*/ */
...@@ -415,6 +441,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { ...@@ -415,6 +441,26 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
} }
open fun handleNewIntent(intent: Intent) { 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: // Diagnostic breadcrumb for "Display already aquired" crash:
// https://github.com/mozilla-mobile/android-components/issues/7960 // https://github.com/mozilla-mobile/android-components/issues/7960
breadcrumb( breadcrumb(
...@@ -595,11 +641,17 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity { ...@@ -595,11 +641,17 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity {
internal fun getModeFromIntentOrLastKnown(intent: Intent?): BrowsingMode { internal fun getModeFromIntentOrLastKnown(intent: Intent?): BrowsingMode {
intent?.toSafeIntent()?.let { intent?.toSafeIntent()?.let {
if (it.hasExtra(PRIVATE_BROWSING_MODE)) { 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 BrowsingMode.fromBoolean(isPrivate = startPrivateMode)
} }
} }
return settings().lastKnownMode return when {
settings().shouldDisableNormalMode -> BrowsingMode.Private
settings().openLinksInAPrivateTab -> BrowsingMode.Private
else -> settings().lastKnownMode
}
} }
/** /**
......
...@@ -875,6 +875,14 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, ...@@ -875,6 +875,14 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler,
hideToolbar() hideToolbar()
components.core.store.state.findTabOrCustomTabOrSelectedTab(customTabSessionId)?.let { components.core.store.state.findTabOrCustomTabOrSelectedTab(customTabSessionId)?.let {
// If the most-recent session was a tab in Normal mode, and now Normal mode is disabled,
// then load the Private Mode home screen, instead.
if (!it.content.private && requireContext().settings().shouldDisableNormalMode) {
findNavController().nav(
R.id.browserFragment,
BrowserFragmentDirections.actionGlobalHomeFragment()
)
}
updateThemeForSession(it) updateThemeForSession(it)
} }
} }
......
...@@ -109,7 +109,8 @@ class Core( ...@@ -109,7 +109,8 @@ class Core(
clearColor = ContextCompat.getColor( clearColor = ContextCompat.getColor(
context, context,
R.color.foundation_normal_theme R.color.foundation_normal_theme
) ),
spoofEnglish = context.settings().spoofEnglish
) )
GeckoEngine( GeckoEngine(
...@@ -121,7 +122,6 @@ class Core( ...@@ -121,7 +122,6 @@ class Core(
trackingProtectionPolicyFactory.createTrackingProtectionPolicy() trackingProtectionPolicyFactory.createTrackingProtectionPolicy()
) )
).also { ).also {
WebCompatFeature.install(it)
/** /**
* There are some issues around localization to be resolved, as well as questions around * There are some issues around localization to be resolved, as well as questions around
...@@ -129,7 +129,8 @@ class Core( ...@@ -129,7 +129,8 @@ class Core(
* disabled in Fenix Release builds for now. * disabled in Fenix Release builds for now.
* This is consistent with both Fennec and Firefox Desktop. * 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") WebCompatReporterFeature.install(it, "fenix")
} }
} }
......
...@@ -27,7 +27,6 @@ import org.mozilla.fenix.Config ...@@ -27,7 +27,6 @@ import org.mozilla.fenix.Config
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.settings import org.mozilla.fenix.ext.settings
import org.mozilla.fenix.perf.runBlockingIncrement import org.mozilla.fenix.perf.runBlockingIncrement
import java.util.Locale
@SuppressWarnings("TooManyFunctions") @SuppressWarnings("TooManyFunctions")
open class FenixSearchEngineProvider( open class FenixSearchEngineProvider(
...@@ -148,8 +147,6 @@ open class FenixSearchEngineProvider( ...@@ -148,8 +147,6 @@ open class FenixSearchEngineProvider(
defaultList.copy( defaultList.copy(
list = defaultList.list.filter { list = defaultList.list.filter {
installedIdentifiers.contains(it.identifier) installedIdentifiers.contains(it.identifier)
}.sortedBy {
it.name.toLowerCase(Locale.getDefault())
}, },
default = defaultList.default?.let { default = defaultList.default?.let {
if (installedIdentifiers.contains(it.identifier)) { if (installedIdentifiers.contains(it.identifier)) {
......
...@@ -178,24 +178,19 @@ class DefaultToolbarMenu( ...@@ -178,24 +178,19 @@ class DefaultToolbarMenu(
// Predicates that are called once, during screen init // Predicates that are called once, during screen init
val shouldShowSaveToCollection = (context.asActivity() as? HomeActivity) val shouldShowSaveToCollection = (context.asActivity() as? HomeActivity)
?.browsingModeManager?.mode == BrowsingMode.Normal ?.browsingModeManager?.mode == BrowsingMode.Normal
val shouldDeleteDataOnQuit = context.components.settings
.shouldDeleteBrowsingDataOnQuit
val syncedTabsInTabsTray = context.components.settings
.syncedTabsInTabsTray
val menuItems = listOfNotNull( val menuItems = listOfNotNull(
downloadsItem, downloadsItem,
historyItem, // historyItem,
bookmarksItem, bookmarksItem,
if (syncedTabsInTabsTray) null else syncedTabs,
settings, settings,
if (shouldDeleteDataOnQuit) deleteDataOnQuit else null, deleteDataOnQuit,
BrowserMenuDivider(), BrowserMenuDivider(),
reportSiteIssuePlaceholder, reportSiteIssuePlaceholder,
findInPage, findInPage,
addToTopSites, addToTopSites,
addToHomescreen.apply { visible = ::canAddToHomescreen }, // addToHomescreen.apply { visible = ::canAddToHomescreen },
installToHomescreen.apply { visible = ::canInstall }, // installToHomescreen.apply { visible = ::canInstall },
if (shouldShowSaveToCollection) saveToCollection else null, if (shouldShowSaveToCollection) saveToCollection else null,
desktopMode, desktopMode,
openInApp.apply { visible = ::shouldShowOpenInApp }, openInApp.apply { visible = ::shouldShowOpenInApp },
......
...@@ -30,6 +30,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout ...@@ -30,6 +30,7 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.core.view.children import androidx.core.view.children
import androidx.core.view.doOnLayout import androidx.core.view.doOnLayout
import androidx.core.view.isGone
import androidx.core.view.isVisible import androidx.core.view.isVisible
import androidx.core.view.updateLayoutParams import androidx.core.view.updateLayoutParams
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
...@@ -82,9 +83,7 @@ import org.mozilla.fenix.components.PrivateShortcutCreateManager ...@@ -82,9 +83,7 @@ import org.mozilla.fenix.components.PrivateShortcutCreateManager
import org.mozilla.fenix.components.StoreProvider import org.mozilla.fenix.components.StoreProvider
import org.mozilla.fenix.components.TabCollectionStorage import org.mozilla.fenix.components.TabCollectionStorage
import org.mozilla.fenix.components.metrics.Event 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.Tip
import org.mozilla.fenix.components.tips.providers.MasterPasswordTipProvider
import org.mozilla.fenix.components.toolbar.TabCounterMenu import org.mozilla.fenix.components.toolbar.TabCounterMenu
import org.mozilla.fenix.components.toolbar.ToolbarPosition import org.mozilla.fenix.components.toolbar.ToolbarPosition
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
...@@ -100,7 +99,6 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder ...@@ -100,7 +99,6 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder
import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.DefaultTopSitesView import org.mozilla.fenix.home.sessioncontrol.viewholders.topsites.DefaultTopSitesView
import org.mozilla.fenix.onboarding.FenixOnboarding import org.mozilla.fenix.onboarding.FenixOnboarding
import org.mozilla.fenix.settings.SupportUtils 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.settings.deletebrowsingdata.deleteAndQuit
import org.mozilla.fenix.tor.bootstrap.TorQuickStart import org.mozilla.fenix.tor.bootstrap.TorQuickStart
import org.mozilla.fenix.theme.ThemeManager import org.mozilla.fenix.theme.ThemeManager
...@@ -213,17 +211,6 @@ class HomeFragment : Fragment() { ...@@ -213,17 +211,6 @@ class HomeFragment : Fragment() {
expandedCollections = emptySet(), expandedCollections = emptySet(),
mode = currentMode.getCurrentMode(), mode = currentMode.getCurrentMode(),
topSites = components.core.topSitesStorage.cachedTopSites, topSites = components.core.topSitesStorage.cachedTopSites,
tip = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
FenixTipManager(
listOf(
MasterPasswordTipProvider(
requireContext(),
::navToSavedLogins,
::dismissTip
)
)
).getTip()
},
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome
) )
) )
...@@ -547,6 +534,8 @@ class HomeFragment : Fragment() { ...@@ -547,6 +534,8 @@ class HomeFragment : Fragment() {
} }
} }
privateBrowsingButton.isGone = view.context.settings().shouldDisableNormalMode
if (browsingModeManager.mode.isPrivate) { if (browsingModeManager.mode.isPrivate) {
requireActivity().window.addFlags(FLAG_SECURE) requireActivity().window.addFlags(FLAG_SECURE)
} else { } else {
...@@ -645,17 +634,6 @@ class HomeFragment : Fragment() { ...@@ -645,17 +634,6 @@ class HomeFragment : Fragment() {
collections = components.core.tabCollectionStorage.cachedTabCollections, collections = components.core.tabCollectionStorage.cachedTabCollections,
mode = currentMode.getCurrentMode(), mode = currentMode.getCurrentMode(),
topSites = components.core.topSitesStorage.cachedTopSites, topSites = components.core.topSitesStorage.cachedTopSites,
tip = components.strictMode.resetAfter(StrictMode.allowThreadDiskReads()) {
FenixTipManager(
listOf(
MasterPasswordTipProvider(
requireContext(),
::navToSavedLogins,
::dismissTip
)
)
).getTip()
},
showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome showCollectionPlaceholder = components.settings.showCollectionsPlaceholderOnHome
) )
) )
...@@ -893,7 +871,7 @@ class HomeFragment : Fragment() { ...@@ -893,7 +871,7 @@ class HomeFragment : Fragment() {
HomeMenu.Item.Help -> { HomeMenu.Item.Help -> {
hideOnboardingIfNeeded() hideOnboardingIfNeeded()
(activity as HomeActivity).openToBrowserAndLoad( (activity as HomeActivity).openToBrowserAndLoad(
searchTermOrURL = SupportUtils.getSumoURLForTopic(context, HELP), searchTermOrURL = SupportUtils.getTorHelpPageUrl(),
newTab = true, newTab = true,
from = BrowserDirection.FromHome from = BrowserDirection.FromHome
) )
......
...@@ -104,21 +104,21 @@ class HomeMenu( ...@@ -104,21 +104,21 @@ class HomeMenu(
onItemTapped.invoke(Item.Bookmarks) onItemTapped.invoke(Item.Bookmarks)
} }
val historyItem = BrowserMenuImageText( // val historyItem = BrowserMenuImageText(
context.getString(R.string.library_history), // context.getString(R.string.library_history),
R.drawable.ic_history, // R.drawable.ic_history,
primaryTextColor // primaryTextColor
) { // ) {
onItemTapped.invoke(Item.History) // onItemTapped.invoke(Item.History)
} // }
val addons = BrowserMenuImageText( // val addons = BrowserMenuImageText(
context.getString(R.string.browser_menu_add_ons), // context.getString(R.string.browser_menu_add_ons),
R.drawable.ic_addons_extensions, // R.drawable.ic_addons_extensions,
primaryTextColor // primaryTextColor
) { // ) {
onItemTapped.invoke(Item.AddonsManager) // onItemTapped.invoke(Item.AddonsManager)
} // }
val settingsItem = BrowserMenuImageText( val settingsItem = BrowserMenuImageText(
context.getString(R.string.browser_menu_settings), context.getString(R.string.browser_menu_settings),
...@@ -128,13 +128,13 @@ class HomeMenu( ...@@ -128,13 +128,13 @@ class HomeMenu(
onItemTapped.invoke(Item.Settings) onItemTapped.invoke(Item.Settings)
} }
val syncedTabsItem = BrowserMenuImageText( // val syncedTabsItem = BrowserMenuImageText(
context.getString(R.string.library_synced_tabs), // context.getString(R.string.library_synced_tabs),
R.drawable.ic_synced_tabs, // R.drawable.ic_synced_tabs,
primaryTextColor // primaryTextColor
) { // ) {
onItemTapped.invoke(Item.SyncedTabs) // onItemTapped.invoke(Item.SyncedTabs)
} // }
val helpItem = BrowserMenuImageText( val helpItem = BrowserMenuImageText(
context.getString(R.string.browser_menu_help), context.getString(R.string.browser_menu_help),
...@@ -160,18 +160,18 @@ class HomeMenu( ...@@ -160,18 +160,18 @@ class HomeMenu(
null null
} }
val settings = context.components.settings // val settings = context.components.settings
val menuItems = listOfNotNull( val menuItems = listOfNotNull(
if (settings.shouldDeleteBrowsingDataOnQuit) quitItem else null, quitItem,
settingsItem, settingsItem,
BrowserMenuDivider(), BrowserMenuDivider(),
if (settings.syncedTabsInTabsTray) null else syncedTabsItem, // if (settings.syncedTabsInTabsTray) null else syncedTabsItem,
bookmarksItem, bookmarksItem,
historyItem, // historyItem,
downloadsItem, downloadsItem,
BrowserMenuDivider(), BrowserMenuDivider(),
addons, // addons,
BrowserMenuDivider(), BrowserMenuDivider(),
whatsNewItem, whatsNewItem,
helpItem, helpItem,
......
...@@ -48,7 +48,6 @@ import org.mozilla.fenix.ext.bookmarkStorage ...@@ -48,7 +48,6 @@ import org.mozilla.fenix.ext.bookmarkStorage
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.ext.minus import org.mozilla.fenix.ext.minus
import org.mozilla.fenix.ext.nav import org.mozilla.fenix.ext.nav
import org.mozilla.fenix.ext.requireComponents
import org.mozilla.fenix.ext.setTextColor import org.mozilla.fenix.ext.setTextColor
import org.mozilla.fenix.ext.toShortUrl import org.mozilla.fenix.ext.toShortUrl
import org.mozilla.fenix.library.LibraryPageFragment import org.mozilla.fenix.library.LibraryPageFragment
...@@ -128,16 +127,9 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan ...@@ -128,16 +127,9 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan
@ExperimentalCoroutinesApi @ExperimentalCoroutinesApi
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
val accountManager = requireComponents.backgroundServices.accountManager
consumeFrom(bookmarkStore) { consumeFrom(bookmarkStore) {
bookmarkView.update(it) bookmarkView.update(it)
bookmarkView.view.bookmark_folders_sign_in.isVisible = false
// 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.view.bookmark_folders_sign_in.isVisible =
it.tree?.guid == BookmarkRoot.Root.id && accountManager.authenticatedAccount() == null
} }
} }
......
...@@ -277,6 +277,13 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler { ...@@ -277,6 +277,13 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
inflated.title.text = inflated.title.text =
getString(R.string.search_suggestions_onboarding_title) 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
}
} }
view.search_suggestions_hint.setOnInflateListener((stubListener)) view.search_suggestions_hint.setOnInflateListener((stubListener))
......
...@@ -189,6 +189,10 @@ class SettingsFragment : PreferenceFragmentCompat() { ...@@ -189,6 +189,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
requirePreference<Preference>(R.string.pref_key_tabs) requirePreference<Preference>(R.string.pref_key_tabs)
tabSettingsPreference.summary = context?.settings()?.getTabTimeoutString() tabSettingsPreference.summary = context?.settings()?.getTabTimeoutString()
// Hide "Delete browsing data on quit" when in Private Browsing-only mode
deleteBrowsingDataPreference.isVisible =