tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 3564b5a8f2eabb4900d795c51c8492381e0e157a
parent b2c6487a45320297a85b77eb204202c6f0c04933
Author: Andrey Zinovyev <azinovyev@mozilla.com>
Date:   Tue, 25 Nov 2025 17:55:12 +0000

Bug 1996632 - Remove (activity as HomeActivity) casts in TranslationsDialogFragment r=android-reviewers,jonalmeida

Differential Revision: https://phabricator.services.mozilla.com/D270212

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/translations/TranslationsDialogFragment.kt | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/translations/TranslationsDialogFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/translations/TranslationsDialogFragment.kt @@ -34,13 +34,12 @@ import mozilla.components.concept.engine.translate.TranslationError import mozilla.components.feature.downloads.FileSizeFormatter import mozilla.components.lib.state.ext.observeAsComposableState import mozilla.components.support.base.feature.ViewBoundFeatureWrapper -import org.mozilla.fenix.BrowserDirection import org.mozilla.fenix.GleanMetrics.Translations -import org.mozilla.fenix.HomeActivity import org.mozilla.fenix.R import org.mozilla.fenix.components.AppStore import org.mozilla.fenix.components.appstate.AppAction import org.mozilla.fenix.ext.components +import org.mozilla.fenix.ext.openToBrowser import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.runIfFragmentIsAttached import org.mozilla.fenix.ext.settings @@ -464,10 +463,10 @@ class TranslationsDialogFragment : BottomSheetDialogFragment() { } private fun openBrowserAndLoad(learnMoreUrl: String) { - (requireActivity() as HomeActivity).openToBrowserAndLoad( + findNavController().openToBrowser() + requireComponents.useCases.fenixBrowserUseCases.loadUrlOrSearch( searchTermOrURL = learnMoreUrl, newTab = true, - from = BrowserDirection.FromTranslationsDialogFragment, ) }