2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-05 21:20:45 +00:00

[fenix] Close https://github.com/mozilla-mobile/fenix/issues/23626: Do not exit edit mode in history search toolbar

This commit is contained in:
Roger Yang 2022-02-07 19:28:39 -05:00 committed by mergify[bot]
parent aced0fbdee
commit d39b28ead6

View File

@ -11,6 +11,7 @@ import androidx.core.content.ContextCompat
import mozilla.components.browser.toolbar.BrowserToolbar
import mozilla.components.support.ktx.android.content.getColorFromAttr
import mozilla.components.support.ktx.android.content.res.resolveAttribute
import mozilla.components.support.ktx.android.view.hideKeyboard
import org.mozilla.fenix.R
import org.mozilla.fenix.library.history.HistorySearchFragmentState
@ -72,10 +73,17 @@ class ToolbarView(
private = isPrivate
setOnUrlCommitListener {
hideKeyboard()
// We need to return false to not show display mode
false
}
setOnEditListener(object : mozilla.components.concept.toolbar.Toolbar.OnEditListener {
override fun onCancelEditing(): Boolean {
interactor.onEditingCanceled()
// We need to return false to notHistorySearchFragmentStore.kt show display mode
// We need to return false to not show display mode
return false
}