Skip to content

Commit 859e44f

Browse files
author
Sharma Elanthiriayan
committed
Introduce updateRightBarButtonItem method for simplicity.
1 parent d63de37 commit 859e44f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

WooCommerce/Classes/ViewRelated/Reviews/ReviewsViewController.swift

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ private extension ReviewsViewController {
276276
tracks.track(.reviewsMarkAllReadSuccess)
277277
}
278278

279-
self.updateMenuButtonState()
279+
self.updateRightBarButtonItem()
280280
self.tableView.reloadData()
281281
}
282282
}
@@ -414,7 +414,7 @@ private extension ReviewsViewController {
414414
/// Note: Just because this func runs does not guarantee `didEnter()` or `didLeave()` will run as well.
415415
///
416416
func willEnter(state: State) {
417-
updateNavBarButtonsState()
417+
updateRightBarButtonItem()
418418
}
419419

420420
/// Runs whenever the FSM enters a State.
@@ -480,13 +480,9 @@ private extension ReviewsViewController {
480480
//
481481
private extension ReviewsViewController {
482482

483-
func updateNavBarButtonsState() {
484-
updateMenuButtonState()
485-
}
486-
487483
/// Show the rightBarButtonItem only if there are unread reviews available.
488484
///
489-
func updateMenuButtonState() {
485+
func updateRightBarButtonItem() {
490486
navigationItem.rightBarButtonItem = viewModel.hasUnreadNotifications ? rightBarButton : nil
491487
}
492488

0 commit comments

Comments
 (0)