force menu invalidation when expanding actionView from user interaction to properly layout menu items (#2503)

This commit is contained in:
MCAxiaz
2020-01-16 18:44:22 -08:00
committed by arkon
parent 73fbc81067
commit bed978a26a
4 changed files with 57 additions and 32 deletions
@@ -80,6 +80,7 @@ open class ExtensionController : NucleusController<ExtensionPresenter>(),
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
R.id.action_search -> expandActionViewFromInteraction = true
R.id.action_settings -> {
router.pushController((RouterTransaction.with(ExtensionFilterController()))
.popChangeHandler(SettingsExtensionsFadeChangeHandler())
@@ -137,7 +138,7 @@ open class ExtensionController : NucleusController<ExtensionPresenter>(),
}
// Fixes problem with the overflow icon showing up in lieu of search
searchItem.fixExpand()
searchItem.fixExpand(onExpand = { invalidateMenuOnExpand() })
}
override fun onItemClick(view: View, position: Int): Boolean {