diff --git a/CHANGELOG.md b/CHANGELOG.md index 73a6fc1f1..b1c112320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed event text readability on colored backgrounds ([#1065]) - Fixed invisible current time indicator in weekly view ([#99]) - Fixed stuck zoom level in weekly view on some devices ([#621]) +- Fixed show all calendar type ([#1092]) ## [1.10.3] - 2026-02-14 ### Changed diff --git a/app/src/main/kotlin/org/fossify/calendar/adapters/QuickFilterCalendarAdapter.kt b/app/src/main/kotlin/org/fossify/calendar/adapters/QuickFilterCalendarAdapter.kt index 1ea6a43ca..8edd6a54c 100644 --- a/app/src/main/kotlin/org/fossify/calendar/adapters/QuickFilterCalendarAdapter.kt +++ b/app/src/main/kotlin/org/fossify/calendar/adapters/QuickFilterCalendarAdapter.kt @@ -112,19 +112,23 @@ class QuickFilterCalendarAdapter( quickFilterCalendar.setOnLongClickListener { if (lastLongClickedType != calendar) { lastActiveKeys.clear() + allCalendars.forEach { + lastActiveKeys.add(it.id!!) + } } val activeKeysCopy = HashSet(activeKeys) allCalendars.forEach { - viewClicked(select = lastActiveKeys.contains(it.id!!), calendar = it) + val isSelected = when { + it.id == calendar.id -> true + activeKeysCopy.size > 1 -> false + else -> lastActiveKeys.contains(it.id!!) + } + viewClicked( + select = isSelected, + calendar = it + ) } - val shouldSelectCurrent = if (lastLongClickedType != calendar) { - true - } else { - lastActiveKeys.contains(calendar.id!!) - } - - viewClicked(shouldSelectCurrent, calendar) notifyItemRangeChanged(0, itemCount) callback() lastLongClickedType = calendar