[tor-commits] [Git][tpo/applications/firefox-android][firefox-android-115.2.1-13.5-1] fixup! Implement Android-native Connection Assist UI

Dan Ballard (@dan) git at gitlab.torproject.org
Wed Apr 17 22:07:47 UTC 2024



Dan Ballard pushed to branch firefox-android-115.2.1-13.5-1 at The Tor Project / Applications / firefox-android


Commits:
f710da91 by clairehurst at 2024-04-17T22:07:23+00:00
fixup! Implement Android-native Connection Assist UI

- - - - -


2 changed files:

- fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
- fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt


Changes:

=====================================
fenix/app/src/main/java/org/mozilla/fenix/HomeActivity.kt
=====================================
@@ -816,10 +816,6 @@ open class HomeActivity : LocaleAwareAppCompatActivity(), NavHostActivity, TorIn
 
     final override fun onBackPressed() {
         supportFragmentManager.primaryNavigationFragment?.childFragmentManager?.fragments?.forEach {
-            if (it is HomeFragment){
-                finish()
-                return
-            }
             if (it is UserInteractionHandler && it.onBackPressed()) {
                 return
             }


=====================================
fenix/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
=====================================
@@ -61,6 +61,7 @@ import mozilla.components.feature.top.sites.TopSitesProviderConfig
 import mozilla.components.lib.state.ext.consumeFlow
 import mozilla.components.lib.state.ext.consumeFrom
 import mozilla.components.service.glean.private.NoExtras
+import mozilla.components.support.base.feature.UserInteractionHandler
 import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
 import mozilla.components.support.ktx.kotlinx.coroutines.flow.ifChanged
 import org.mozilla.fenix.BuildConfig
@@ -122,7 +123,7 @@ import java.lang.ref.WeakReference
 import kotlin.math.min
 
 @Suppress("TooManyFunctions", "LargeClass")
-class HomeFragment : Fragment() {
+class HomeFragment : Fragment(), UserInteractionHandler {
     private val args by navArgs<HomeFragmentArgs>()
 
     @VisibleForTesting
@@ -1016,4 +1017,9 @@ class HomeFragment : Fragment() {
         // Elevation for undo toasts
         internal const val TOAST_ELEVATION = 80f
     }
+
+    override fun onBackPressed(): Boolean {
+        requireActivity().finish()
+        return true
+    }
 }



View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/f710da9194c26ce4e5cadded8ad6d983f87a0827

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/firefox-android/-/commit/f710da9194c26ce4e5cadded8ad6d983f87a0827
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20240417/41f69ae1/attachment-0001.htm>


More information about the tor-commits mailing list