make sure the filter action menu button is visible when everything is unchecked
This commit is contained in:
parent
6d79b686fa
commit
a9bcb6ce77
|
@ -9,6 +9,7 @@ import android.view.MenuItem
|
||||||
import com.simplemobiletools.calendar.R
|
import com.simplemobiletools.calendar.R
|
||||||
import com.simplemobiletools.calendar.adapters.MyDayPagerAdapter
|
import com.simplemobiletools.calendar.adapters.MyDayPagerAdapter
|
||||||
import com.simplemobiletools.calendar.dialogs.FilterEventTypesDialog
|
import com.simplemobiletools.calendar.dialogs.FilterEventTypesDialog
|
||||||
|
import com.simplemobiletools.calendar.extensions.config
|
||||||
import com.simplemobiletools.calendar.extensions.getNewEventTimestampFromCode
|
import com.simplemobiletools.calendar.extensions.getNewEventTimestampFromCode
|
||||||
import com.simplemobiletools.calendar.helpers.DAY_CODE
|
import com.simplemobiletools.calendar.helpers.DAY_CODE
|
||||||
import com.simplemobiletools.calendar.helpers.DBHelper
|
import com.simplemobiletools.calendar.helpers.DBHelper
|
||||||
|
@ -50,7 +51,7 @@ class DayActivity : SimpleActivity(), NavigationListener, ViewPager.OnPageChange
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
menuInflater.inflate(R.menu.menu_day, menu)
|
menuInflater.inflate(R.menu.menu_day, menu)
|
||||||
menu.findItem(R.id.filter).isVisible = eventTypeColors.size() > 1
|
menu.findItem(R.id.filter).isVisible = eventTypeColors.size() > 1 || config.displayEventTypes.isEmpty()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ class MainActivity : SimpleActivity(), NavigationListener {
|
||||||
|
|
||||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||||
menuInflater.inflate(R.menu.menu_main, menu)
|
menuInflater.inflate(R.menu.menu_main, menu)
|
||||||
menu.findItem(R.id.filter).isVisible = eventTypeColors.size() > 1
|
menu.findItem(R.id.filter).isVisible = eventTypeColors.size() > 1 || config.displayEventTypes.isEmpty()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue