From 96ebeef3898a11b19fd3cb4a10ba9dbe738d0249 Mon Sep 17 00:00:00 2001 From: Marinov Date: Wed, 8 Oct 2025 20:03:05 +0300 Subject: [PATCH] Merge data layer sync info along with buttons' in order to react to data layer updates --- .../feature/dashboard/settings/syncinfo/SyncInfoViewModel.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoViewModel.kt b/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoViewModel.kt index 820b6d6324..62cf5c7cf6 100644 --- a/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoViewModel.kt +++ b/feature/dashboard/src/main/java/com/simprints/feature/dashboard/settings/syncinfo/SyncInfoViewModel.kt @@ -126,11 +126,10 @@ internal class SyncInfoViewModel @Inject constructor( } merge( + dataLayerDrivenSyncInfoFlow, eventSyncButtonResponsiveSyncInfo, imageSyncButtonResponsiveSyncInfo, - ).onStart { - emit(dataLayerDrivenSyncInfoFlow.firstOrNull() ?: SyncInfo()) - }.distinctUntilChanged() + ).distinctUntilChanged() .flowOn(ioDispatcher) .asLiveData(viewModelScope.coroutineContext) }