Commit 2cd57acd authored by Matthew Finkel's avatar Matthew Finkel Committed by Pier Angelo Vendrame
Browse files

[android] 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 40063: Do not sort search engines alphabetically

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 1ca88761
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ class SessionAutocompleteProvider(

        val tabUrl = store.state.tabs
            .firstOrNull {
                !it.content.private && doesUrlStartsWithText(it.content.url, query)
                /* !it.content.private && */ doesUrlStartsWithText(it.content.url, query)
            }
            ?.content?.url
            ?: return null
+2 −2
Original line number Diff line number Diff line
@@ -52,12 +52,12 @@ class SessionSuggestionProvider(
        val searchWords = searchText.split(" ")

        distinctTabs.filter { item ->
            !item.content.private &&
                // tor-browser#43788: Show "Switch to tab" suggestions also on private tabs.
                searchWords.all { item.contains(it) } &&
                resultsUriFilter?.invoke(item.content.url.toUri()) != false &&
                shouldIncludeSelectedTab(state, item)
        }.forEach { item ->
            val iconRequest = icons?.loadIcon(IconRequest(url = item.content.url, waitOnNetworkLoad = false))
            val iconRequest = icons?.loadIcon(IconRequest(url = item.content.url, isPrivate = item.content.private, waitOnNetworkLoad = false))
            suggestions.add(
                AwesomeBar.Suggestion(
                    provider = this,
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler, SystemIns
            view = view,
        )

        if (settings.shouldShowOpenInAppCfr) {
        if (false) { // settings.shouldShowOpenInAppCfr
            openInAppOnboardingObserver.set(
                feature = OpenInAppOnboardingObserver(
                    context = context,
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class OpenInAppOnboardingObserver(
                        currentUrl = tab.content.url
                    } else {
                        // Loading state has changed
                        maybeShowOpenInAppBanner(tab.content.url, tab.content.loading)
//                      maybeShowOpenInAppBanner(tab.content.url, tab.content.loading)
                    }
                }
        }
+24 −23
Original line number Diff line number Diff line
@@ -106,30 +106,31 @@ class BrowserToolbarCFRPresenter(
            }
        }

        when (getCFRToShow()) {
            ToolbarCFR.COOKIE_BANNERS -> {
                scope = browserStore.flowScoped(dispatcher = mainDispatcher) { flow ->
                    flow.mapNotNull { it.findCustomTabOrSelectedTab(customTabId) }
                        .ifAnyChanged { tab ->
                            arrayOf(
                                tab.cookieBanner,
                            )
                        }
                        .filter {
                            it.content.private && it.cookieBanner == CookieBannerHandlingStatus.HANDLED
                        }
                        .collect {
                            scope?.cancel()
                            settings.shouldShowCookieBannersCFR = false
                            showCookieBannersCFR()
                        }
                }
            }
        // Removed for tor-browser#42089: Remove ability to submit site support requests
        // when (getCFRToShow()) {
        //     ToolbarCFR.COOKIE_BANNERS -> {
        //         scope = browserStore.flowScoped(dispatcher = mainDispatcher) { flow ->
        //             flow.mapNotNull { it.findCustomTabOrSelectedTab(customTabId) }
        //                 .ifAnyChanged { tab ->
        //                     arrayOf(
        //                         tab.cookieBanner,
        //                     )
        //                 }
        //                 .filter {
        //                     it.content.private && it.cookieBanner == CookieBannerHandlingStatus.HANDLED
        //                 }
        //                 .collect {
        //                     scope?.cancel()
        //                     settings.shouldShowCookieBannersCFR = false
        //                     showCookieBannersCFR()
        //                 }
        //         }
        //     }

            ToolbarCFR.NONE -> {
                // no-op
            }
        }
        //     ToolbarCFR.NONE -> {
        //         // no-op
        //     }
        // }
    }

    private fun getCFRToShow(): ToolbarCFR = when {
Loading