For #9500 - Revert patch for 8568
The patch for 8568 introduced this regression. Let's just revert it until we can come up with a better solution.master
parent
43727a1370
commit
1e63d6ce76
|
@ -27,7 +27,6 @@ import kotlinx.android.synthetic.main.search_suggestions_onboarding.view.*
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import mozilla.components.concept.storage.HistoryStorage
|
import mozilla.components.concept.storage.HistoryStorage
|
||||||
import mozilla.components.feature.qr.QrFeature
|
import mozilla.components.feature.qr.QrFeature
|
||||||
import mozilla.components.feature.qr.QrFragment
|
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
|
@ -279,31 +278,6 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
||||||
|
|
||||||
permissionDidUpdate = false
|
permissionDidUpdate = false
|
||||||
hideToolbar()
|
hideToolbar()
|
||||||
|
|
||||||
if (!isQrFragmentVisible()) {
|
|
||||||
refocusUrlView()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Refocus URL editText. Needed after the user brings back the app
|
|
||||||
* into the foreground.
|
|
||||||
* See https://github.com/mozilla-mobile/fenix/issues/6290
|
|
||||||
**/
|
|
||||||
private fun refocusUrlView() {
|
|
||||||
val urlView = toolbarView.view
|
|
||||||
.findViewById<InlineAutocompleteEditText>(R.id.mozac_browser_toolbar_edit_url_view)
|
|
||||||
if (!urlView.hasFocus()) {
|
|
||||||
urlView.requestFocus()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check to see if QrFragment exists & is visible.
|
|
||||||
* */
|
|
||||||
private fun isQrFragmentVisible(): Boolean {
|
|
||||||
val foundQrFragment = parentFragmentManager.fragments.firstOrNull { it is QrFragment }
|
|
||||||
return foundQrFragment != null && foundQrFragment.isVisible
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
|
Loading…
Reference in New Issue