tor-browser

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

commit f1818fbabc4a8c1eca469bd2420b8cd8703792f6
parent 59b42bfa716a865e0a9b2b9297ef70801c0a9a0a
Author: Andrey Zinovyev <azinovyev@mozilla.com>
Date:   Thu, 23 Oct 2025 15:56:23 +0000

Bug 1995327 - Remove (activity as HomeActivity) casts in DownloadFragment r=android-reviewers,nalexander

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

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/downloads/listscreen/DownloadFragment.kt | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/downloads/listscreen/DownloadFragment.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/downloads/listscreen/DownloadFragment.kt @@ -12,8 +12,6 @@ import androidx.fragment.app.Fragment import androidx.fragment.compose.content import androidx.navigation.fragment.findNavController import mozilla.components.feature.downloads.AbstractFetchDownloadService -import org.mozilla.fenix.HomeActivity -import org.mozilla.fenix.browser.browsingmode.BrowsingMode import org.mozilla.fenix.components.appstate.AppAction import org.mozilla.fenix.components.appstate.SupportedMenuNotifications import org.mozilla.fenix.components.lazyStore @@ -72,8 +70,7 @@ class DownloadFragment : Fragment() { } } - private fun openItem(item: FileItem, mode: BrowsingMode? = null) { - mode?.let { (activity as HomeActivity).browsingModeManager.mode = it } + private fun openItem(item: FileItem) { context?.let { val canOpenFile = AbstractFetchDownloadService.openFile( applicationContext = it.applicationContext,