mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/13423: Pass isPrivate flag to ToolbarView
This commit is contained in:
parent
48f75eef5d
commit
f89a293cd6
@ -117,6 +117,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
|||||||
val args by navArgs<SearchDialogFragmentArgs>()
|
val args by navArgs<SearchDialogFragmentArgs>()
|
||||||
val view = inflater.inflate(R.layout.fragment_search_dialog, container, false)
|
val view = inflater.inflate(R.layout.fragment_search_dialog, container, false)
|
||||||
val activity = requireActivity() as HomeActivity
|
val activity = requireActivity() as HomeActivity
|
||||||
|
val isPrivate = activity.browsingModeManager.mode.isPrivate
|
||||||
|
|
||||||
requireComponents.analytics.metrics.track(Event.InteractWithSearchURLArea)
|
requireComponents.analytics.metrics.track(Event.InteractWithSearchURLArea)
|
||||||
|
|
||||||
@ -149,7 +150,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
|||||||
requireContext(),
|
requireContext(),
|
||||||
interactor,
|
interactor,
|
||||||
null,
|
null,
|
||||||
false,
|
isPrivate,
|
||||||
view.toolbar,
|
view.toolbar,
|
||||||
requireComponents.core.engine
|
requireComponents.core.engine
|
||||||
).also(::addSearchButton)
|
).also(::addSearchButton)
|
||||||
@ -174,7 +175,6 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
|||||||
.findViewById<InlineAutocompleteEditText>(R.id.mozac_browser_toolbar_edit_url_view)
|
.findViewById<InlineAutocompleteEditText>(R.id.mozac_browser_toolbar_edit_url_view)
|
||||||
urlView?.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
|
urlView?.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
|
||||||
|
|
||||||
val isPrivate = (requireActivity() as HomeActivity).browsingModeManager.mode.isPrivate
|
|
||||||
requireComponents.core.engine.speculativeCreateSession(isPrivate)
|
requireComponents.core.engine.speculativeCreateSession(isPrivate)
|
||||||
|
|
||||||
return view
|
return view
|
||||||
|
Loading…
Reference in New Issue
Block a user