Skip to content

Commit f294478

Browse files
committed
Resolve storeDismissedSetting with Optional remindAfterDays
By making remindAfterDays an Optional Int, we need to edit storeDismissedSetting as well to either save the current date if is true (by passing 0, so adds 0 days to the current date) or nil if is false
1 parent cdc5089 commit f294478

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WooCommerce/Classes/ViewModels/Feature Announcement Cards/FeatureAnnouncementCardViewModel.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ class FeatureAnnouncementCardViewModel: AnnouncementCardViewModelProtocol {
106106
}
107107

108108
private func storeDismissedSetting(remindLater: Bool) {
109+
let remindAfterDays = remindLater ? 0 : nil
109110
let action = AppSettingsAction.setFeatureAnnouncementDismissed(campaign: config.campaign,
110-
remindAfterDays: nil,
111+
remindAfterDays: remindAfterDays,
111112
onCompletion: nil)
112113
stores.dispatch(action)
113114
shouldBeVisible = false

0 commit comments

Comments
 (0)