1
0
Fork 0

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
codrut.topliceanu 2020-03-30 15:50:17 +03:00 committed by Emily Kager
parent 43727a1370
commit 1e63d6ce76
1 changed files with 0 additions and 26 deletions

View File

@ -27,7 +27,6 @@ import kotlinx.android.synthetic.main.search_suggestions_onboarding.view.*
import kotlinx.coroutines.ExperimentalCoroutinesApi
import mozilla.components.concept.storage.HistoryStorage
import mozilla.components.feature.qr.QrFeature
import mozilla.components.feature.qr.QrFragment
import mozilla.components.lib.state.ext.consumeFrom
import mozilla.components.support.base.feature.UserInteractionHandler
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
@ -279,31 +278,6 @@ class SearchFragment : Fragment(), UserInteractionHandler {
permissionDidUpdate = false
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() {