Skip to content

Commit fa0653d

Browse files
committed
feat: reset application badge in ReviewDetailsViewController
1 parent 34b5eda commit fa0653d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

WooCommerce/Classes/ViewRelated/Reviews/ReviewDetailsViewController.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ final class ReviewDetailsViewController: UIViewController {
7575
override func viewWillAppear(_ animated: Bool) {
7676
super.viewWillAppear(animated)
7777
markAsReadIfNeeded(notification)
78+
resetApplicationBadge()
7879
}
7980

8081
override var shouldShowOfflineBanner: Bool {
@@ -127,6 +128,12 @@ private extension ReviewDetailsViewController {
127128
func reloadRows() {
128129
rows = [.header, .content]
129130
}
131+
132+
/// Nukes the BadgeCount
133+
///
134+
func resetApplicationBadge() {
135+
ServiceLocator.pushNotesManager.resetBadgeCount(type: .comment)
136+
}
130137
}
131138

132139

0 commit comments

Comments
 (0)