From bb48b2d28fe8942ba0d6b8c9fb6b3df1f8bf98b7 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Thu, 26 Sep 2019 11:04:42 -0700 Subject: [PATCH] [fenix] No issue: Update navigation library --- .../java/org/mozilla/fenix/browser/BaseBrowserFragment.kt | 8 ++++---- .../mozilla/fenix/library/bookmarks/BookmarkFragment.kt | 2 +- .../main/java/org/mozilla/fenix/search/SearchFragment.kt | 2 +- .../main/java/org/mozilla/fenix/settings/PairFragment.kt | 2 +- buildSrc/src/main/java/Dependencies.kt | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt index 222024bfdf..3629189b92 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BaseBrowserFragment.kt @@ -222,7 +222,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs contextMenuFeature.set( feature = ContextMenuFeature( - fragmentManager = requireFragmentManager(), + fragmentManager = parentFragmentManager, store = store, candidates = FenixContextMenuCandidate.defaultCandidates( context, @@ -271,7 +271,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs sessionManager = sessionManager, sessionId = customTabSessionId, interceptLinkClicks = true, - fragmentManager = requireFragmentManager() + fragmentManager = parentFragmentManager ), owner = this, view = view @@ -282,7 +282,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs fragment = this, sessionManager = sessionManager, sessionId = customTabSessionId, - fragmentManager = requireFragmentManager(), + fragmentManager = parentFragmentManager, onNeedToRequestPermissions = { permissions -> requestPermissions(permissions, REQUEST_CODE_PROMPT_PERMISSIONS) }), @@ -308,7 +308,7 @@ abstract class BaseBrowserFragment : Fragment(), BackHandler, SessionManager.Obs feature = SitePermissionsFeature( context = context, sessionManager = sessionManager, - fragmentManager = requireFragmentManager(), + fragmentManager = parentFragmentManager, promptsStyling = SitePermissionsFeature.PromptsStyling( gravity = getAppropriateLayoutGravity(), shouldWidthMatchParent = true, diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt index b0e3c3a5c0..57262be16e 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt @@ -94,7 +94,7 @@ class BookmarkFragment : LibraryPageFragment(), BackHandler, Accou bookmarkView = BookmarkView(view.bookmarkLayout, bookmarkInteractor) signInView = SignInView(view.bookmarkLayout, bookmarkInteractor) - viewLifecycleOwner.lifecycle.addObserver( + lifecycle.addObserver( BookmarkDeselectNavigationListener( findNavController(), sharedViewModel, diff --git a/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt b/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt index 749dcb7f18..63f3253301 100644 --- a/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/search/SearchFragment.kt @@ -141,7 +141,7 @@ class SearchFragment : Fragment(), BackHandler { qrFeature.set( QrFeature( requireContext(), - fragmentManager = requireFragmentManager(), + fragmentManager = parentFragmentManager, onNeedToRequestPermissions = { permissions -> requestPermissions(permissions, REQUEST_CODE_CAMERA_PERMISSIONS) }, diff --git a/app/src/main/java/org/mozilla/fenix/settings/PairFragment.kt b/app/src/main/java/org/mozilla/fenix/settings/PairFragment.kt index 31146c468f..2cd6dd3546 100644 --- a/app/src/main/java/org/mozilla/fenix/settings/PairFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/settings/PairFragment.kt @@ -40,7 +40,7 @@ class PairFragment : Fragment(), BackHandler { qrFeature.set( QrFeature( requireContext(), - fragmentManager = requireFragmentManager(), + fragmentManager = parentFragmentManager, onNeedToRequestPermissions = { permissions -> requestPermissions(permissions, REQUEST_CODE_CAMERA_PERMISSIONS) }, diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index 9d8c875c09..17264c0f0b 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -25,7 +25,7 @@ object Versions { const val androidx_annotation = "1.1.0" const val androidx_lifecycle = "2.2.0-alpha04" const val androidx_fragment = "1.2.0-alpha03" - const val androidx_navigation = "2.2.0-alpha02" + const val androidx_navigation = "2.2.0-alpha03" const val androidx_recyclerview = "1.1.0-beta04" const val androidx_testing = "1.2.1-alpha02" const val androidx_test_ext = "1.0.0"