Skip to content

Commit aca3263

Browse files
committed
Remove loading state if there are existing tasks while reloading tasks
1 parent d043b67 commit aca3263

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/Onboarding/StoreOnboardingViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ class StoreOnboardingViewModel: ObservableObject {
119119
}
120120

121121
analytics.track(event: .DynamicDashboard.cardLoadingStarted(type: .onboarding))
122-
update(state: .loading)
122+
if taskViewModels.isEmpty {
123+
update(state: .loading)
124+
} else {
125+
update(state: .loaded(rows: taskViewModels))
126+
}
123127

124128
let tasks: [StoreOnboardingTaskViewModel]
125129
var syncingError: Error?

0 commit comments

Comments
 (0)