2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] For https://github.com/mozilla-mobile/fenix/issues/2806 - navigate up from SearchFragment instead of activity back press (https://github.com/mozilla-mobile/fenix/pull/2812)

This commit is contained in:
Emily Kager 2019-05-23 21:30:06 -07:00 committed by Jeff Boek
parent 632c902084
commit 711afa0213

View File

@ -18,6 +18,7 @@ import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.fragment.app.Fragment
import androidx.navigation.Navigation
import kotlinx.android.synthetic.main.fragment_search.*
import kotlinx.android.synthetic.main.fragment_search.view.*
import mozilla.components.browser.search.SearchEngine
@ -233,7 +234,7 @@ class SearchFragment : Fragment(), BackHandler {
getManagedEmitter<AwesomeBarChange>().onNext(AwesomeBarChange.UpdateQuery(it.query))
}
is SearchAction.EditingCanceled -> {
activity?.onBackPressed()
Navigation.findNavController(toolbar_wrapper).navigateUp()
}
}
}