Skip to content

Commit 7b471e1

Browse files
authored
Merge pull request #14907 from woocommerce/woomob-1638-beta-236-local-catalog-splash-screen-shown-even-for-non
[Woo POS][Local Catalog][Beta 23.6] Do not show "Local Catalog syncing" state if local catalog is disabled
2 parents 7c0e00d + c1beca9 commit 7b471e1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

WooCommerce/src/main/kotlin/com/woocommerce/android/ui/woopos/home/items/products/WooPosProductsDataSource.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ class WooPosProductsDataSource @Inject constructor(
5757
private var activeSource: WooPosProductsDataSourceInterface? = null
5858

5959
fun prepopulateCache(): Flow<WooPosPrepopulatingDataStatus> = flow {
60-
emit(WooPosPrepopulatingDataStatus.Syncing)
61-
6260
val requirement = syncStatusChecker.checkSyncRequirement()
6361
when (requirement) {
6462
is WooPosFullSyncRequirement.LocalCatalogDisabled -> {
@@ -80,6 +78,7 @@ class WooPosProductsDataSource @Inject constructor(
8078
}
8179

8280
is WooPosFullSyncRequirement.BlockingRequired -> {
81+
emit(WooPosPrepopulatingDataStatus.Syncing)
8382
activeSource = localDbDataSource
8483
localDbDataSource.prepopulateCache().fold(
8584
onSuccess = {

0 commit comments

Comments
 (0)