mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
replacing "find" with "firstOrNull"
This commit is contained in:
@@ -31,7 +31,7 @@ class QuickFilterEventTypeAdapter(
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
quickFilterEventTypeIds.forEach { quickFilterEventType ->
|
quickFilterEventTypeIds.forEach { quickFilterEventType ->
|
||||||
val eventType = allEventTypes.find { eventType -> eventType.id.toString() == quickFilterEventType } ?: return@forEach
|
val eventType = allEventTypes.firstOrNull { eventType -> eventType.id.toString() == quickFilterEventType } ?: return@forEach
|
||||||
quickFilterEventTypes.add(eventType)
|
quickFilterEventTypes.add(eventType)
|
||||||
|
|
||||||
if (displayEventTypes.contains(eventType.id.toString())) {
|
if (displayEventTypes.contains(eventType.id.toString())) {
|
||||||
|
Reference in New Issue
Block a user