From 4cce12044d4faa1f812efb2f489119f6b57079f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=C2=A0Koby=C5=82ko?= Date: Sat, 2 Sep 2023 22:19:44 +0200 Subject: [PATCH] Fix crash --- .../feature/home/ui/services/focus/FocusServiceViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/focus/FocusServiceViewModel.kt b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/focus/FocusServiceViewModel.kt index cd87988a..4e95070b 100644 --- a/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/focus/FocusServiceViewModel.kt +++ b/feature/home/src/main/java/com/twofasapp/feature/home/ui/services/focus/FocusServiceViewModel.kt @@ -22,7 +22,7 @@ class FocusServiceViewModel( init { launchScoped { servicesRepository.observeServicesTicker() - .map { it.first { it.id == serviceId } } + .map { it.firstOrNull { it.id == serviceId } } .collect { service -> uiState.update { it.copy(service = service) } }