mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-03 03:57:45 +01:00
show a toast the first time everything is filtered out too
This commit is contained in:
parent
9df5855897
commit
3627e9b2b8
@ -329,6 +329,11 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
||||
eventsHelper.getEventTypes(this, false) {
|
||||
val quickFilterEventTypes = config.quickFilterEventTypes
|
||||
quick_event_type_filter.adapter = QuickFilterEventTypeAdapter(this, it, quickFilterEventTypes) {
|
||||
if (config.displayEventTypes.isEmpty() && !config.wasFilteredOutWarningShown) {
|
||||
toast(R.string.everything_filtered_out, Toast.LENGTH_LONG)
|
||||
config.wasFilteredOutWarningShown = true
|
||||
}
|
||||
|
||||
refreshViewPager()
|
||||
updateWidgets()
|
||||
}
|
||||
|
@ -250,4 +250,8 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
var allowCreatingTasks: Boolean
|
||||
get() = prefs.getBoolean(ALLOW_CREATING_TASKS, true)
|
||||
set(allowCreatingTasks) = prefs.edit().putBoolean(ALLOW_CREATING_TASKS, allowCreatingTasks).apply()
|
||||
|
||||
var wasFilteredOutWarningShown: Boolean
|
||||
get() = prefs.getBoolean(WAS_FILTERED_OUT_WARNING_SHOWN, false)
|
||||
set(wasFilteredOutWarningShown) = prefs.edit().putBoolean(WAS_FILTERED_OUT_WARNING_SHOWN, wasFilteredOutWarningShown).apply()
|
||||
}
|
||||
|
@ -123,6 +123,7 @@ const val HIGHLIGHT_WEEKENDS = "highlight_weekends"
|
||||
const val HIGHLIGHT_WEEKENDS_COLOR = "highlight_weekends_color"
|
||||
const val LAST_USED_EVENT_SPAN = "last_used_event_span"
|
||||
const val ALLOW_CREATING_TASKS = "allow_creating_tasks"
|
||||
const val WAS_FILTERED_OUT_WARNING_SHOWN = "was_filtered_out_warning_shown"
|
||||
|
||||
// repeat_rule for monthly and yearly repetition
|
||||
const val REPEAT_SAME_DAY = 1 // i.e. 25th every month, or 3rd june (if yearly repetition)
|
||||
|
Loading…
x
Reference in New Issue
Block a user