Skip to content

Commit e474845

Browse files
author
Paul Von Schrottky
authored
Sync Weekly Roundup and notifications switch state (#19615)
This fixes a bug where the notifications switch could be off but Weekly Roundup was still showing up in the app's UI. #19590 hid Weekly Roundup when the switch was off. I noticed that toggling the switch wouldn't always toggle Weekly Roundup's visibility. I would need to close and re-open the Notifications Settings screen for the switch's state to take effect.
1 parent b624f73 commit e474845

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WordPress/Classes/Models/Notifications/NotificationSettings.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ open class NotificationSettings {
139139
}
140140

141141
// MARK: - Private Properties
142-
fileprivate let blogPreferenceKeys: [String] = {
142+
fileprivate var blogPreferenceKeys: [String] {
143143
var keys = [Keys.commentAdded, Keys.commentLiked, Keys.postLiked, Keys.follower, Keys.achievement, Keys.mention]
144144

145145
if Feature.enabled(.weeklyRoundup) {
146146
keys.append(Keys.weeklyRoundup)
147147
}
148148

149149
return keys
150-
}()
150+
}
151151
fileprivate let blogEmailPreferenceKeys = [Keys.commentAdded, Keys.commentLiked, Keys.postLiked, Keys.follower, Keys.mention]
152152
fileprivate let otherPreferenceKeys = [Keys.commentLiked, Keys.commentReplied]
153153
fileprivate let wpcomPreferenceKeys = [Keys.marketing, Keys.research, Keys.community]

0 commit comments

Comments
 (0)