hide the Go To Today menu button if the search is open
This commit is contained in:
parent
2cb5e02179
commit
f264f0720a
|
@ -176,7 +176,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||||
menu.apply {
|
menu.apply {
|
||||||
goToTodayButton = findItem(R.id.go_to_today)
|
goToTodayButton = findItem(R.id.go_to_today)
|
||||||
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
findItem(R.id.filter).isVisible = mShouldFilterBeVisible
|
||||||
findItem(R.id.go_to_today).isVisible = shouldGoToTodayBeVisible || config.storedView == EVENTS_LIST_VIEW
|
findItem(R.id.go_to_today).isVisible = (shouldGoToTodayBeVisible || config.storedView == EVENTS_LIST_VIEW) && !mIsSearchOpen
|
||||||
findItem(R.id.go_to_date).isVisible = config.storedView != EVENTS_LIST_VIEW
|
findItem(R.id.go_to_date).isVisible = config.storedView != EVENTS_LIST_VIEW
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,6 +276,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||||
search_holder.beVisible()
|
search_holder.beVisible()
|
||||||
calendar_fab.beGone()
|
calendar_fab.beGone()
|
||||||
searchQueryChanged("")
|
searchQueryChanged("")
|
||||||
|
invalidateOptionsMenu()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,6 +284,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||||
mIsSearchOpen = false
|
mIsSearchOpen = false
|
||||||
search_holder.beGone()
|
search_holder.beGone()
|
||||||
calendar_fab.beVisibleIf(currentFragments.last() !is YearFragmentsHolder)
|
calendar_fab.beVisibleIf(currentFragments.last() !is YearFragmentsHolder)
|
||||||
|
invalidateOptionsMenu()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue