mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-19 21:20:43 +01:00
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 {
|
||||
goToTodayButton = findItem(R.id.go_to_today)
|
||||
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
|
||||
}
|
||||
|
||||
@ -276,6 +276,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
search_holder.beVisible()
|
||||
calendar_fab.beGone()
|
||||
searchQueryChanged("")
|
||||
invalidateOptionsMenu()
|
||||
return true
|
||||
}
|
||||
|
||||
@ -283,6 +284,7 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
mIsSearchOpen = false
|
||||
search_holder.beGone()
|
||||
calendar_fab.beVisibleIf(currentFragments.last() !is YearFragmentsHolder)
|
||||
invalidateOptionsMenu()
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user