We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b04d4e commit 1678775Copy full SHA for 1678775
WooCommerce/Classes/ViewRelated/Dashboard/Analytics Hub/AnalyticsHubViewModel.swift
@@ -202,11 +202,14 @@ private extension AnalyticsHubViewModel {
202
}.store(in: &subscriptions)
203
204
$timeRangeSelectionType
205
+ .dropFirst() // do not trigger refresh action on initial value
206
.removeDuplicates()
207
.sink { [weak self] newSelectionType in
208
guard let self else { return }
209
self.timeRangeSelection = AnalyticsHubTimeRangeSelection(selectionType: newSelectionType)
210
self.timeRangeCard = AnalyticsHubViewModel.timeRangeCard(timeRangeSelection: self.timeRangeSelection)
211
+
212
+ // Update data on range selection change
213
Task.init {
214
await self.updateData()
215
}
0 commit comments