warn the user if he has all event types filtered out
This commit is contained in:
parent
0d0c797733
commit
9df5855897
|
@ -70,7 +70,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:a95c7109bd'
|
||||
implementation 'com.github.SimpleMobileTools:Simple-Commons:4dc76358a0'
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
|
|
|
@ -1193,6 +1193,13 @@ class MainActivity : SimpleActivity(), RefreshRecyclerViewListener {
|
|||
search_results_list.adapter = null
|
||||
}
|
||||
|
||||
val placeholderTextId = if (config.displayEventTypes.isEmpty()) {
|
||||
R.string.everything_filtered_out
|
||||
} else {
|
||||
R.string.no_items_found
|
||||
}
|
||||
|
||||
search_placeholder.setText(placeholderTextId)
|
||||
search_placeholder_2.beVisibleIf(text.length == 1)
|
||||
if (text.length >= 2) {
|
||||
if (search_results_list.adapter == null) {
|
||||
|
|
|
@ -162,8 +162,18 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
|
|||
mView.calendar_empty_list_placeholder.beVisibleIf(mEvents.isEmpty())
|
||||
mView.calendar_empty_list_placeholder_2.beVisibleIf(mEvents.isEmpty())
|
||||
mView.calendar_events_list.beGoneIf(mEvents.isEmpty())
|
||||
if (activity != null)
|
||||
if (activity != null) {
|
||||
mView.calendar_empty_list_placeholder.setTextColor(requireActivity().getProperTextColor())
|
||||
if (mEvents.isEmpty()) {
|
||||
val placeholderTextId = if (requireActivity().config.displayEventTypes.isEmpty()) {
|
||||
R.string.everything_filtered_out
|
||||
} else {
|
||||
R.string.no_upcoming_events
|
||||
}
|
||||
|
||||
mView.calendar_empty_list_placeholder.setText(placeholderTextId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun fetchPreviousPeriod() {
|
||||
|
|
Loading…
Reference in New Issue