Skip to content

Commit fa0a035

Browse files
author
Sharma Elanthiriayan
committed
Update comments
- Remove old comment from `updateNavBarButtonsState` method. - Add a comment to `updateMenuButtonState` method which takes care of showing/hiding the menu bar button item.
1 parent 6371ff8 commit fa0a035

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

WooCommerce/Classes/ViewRelated/Reviews/ReviewsViewController.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,14 +478,12 @@ private extension ReviewsViewController {
478478
//
479479
private extension ReviewsViewController {
480480

481-
/// Enables/disables the navbar buttons if needed
482-
///
483-
/// - Parameter filterEnabled: If true, the filter navbar buttons is enabled; if false, it's disabled
484-
///
485481
func updateNavBarButtonsState() {
486482
updateMenuButtonState()
487483
}
488484

485+
/// Show the rightBarButtonItem only if there are unread reviews available.
486+
///
489487
func updateMenuButtonState() {
490488
navigationItem.rightBarButtonItem = viewModel.hasUnreadNotifications ? rightBarButton : nil
491489
}

0 commit comments

Comments
 (0)