replacing "find" with "firstOrNull"

This commit is contained in:
tibbi 2021-07-27 19:44:13 +02:00
parent a8ae8bfea4
commit df4eadafde

View file

@ -31,7 +31,7 @@ class QuickFilterEventTypeAdapter(
init {
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)
if (displayEventTypes.contains(eventType.id.toString())) {