Skip to content

Commit 71cd788

Browse files
author
César Vargas Casaseca
committed
Use a constant to make code more readable
1 parent 7e8ee71 commit 71cd788

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WooCommerce/Classes/ViewRelated/Products/ProductsViewController.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ final class ProductsViewController: UIViewController {
113113

114114
private var filters: FilterProductListViewModel.Filters = FilterProductListViewModel.Filters() {
115115
didSet {
116+
let contentIsNotSyncedYet = syncingCoordinator.highestPageBeingSynced ?? 0 == 0
116117
if filters != oldValue ||
117-
syncingCoordinator.highestPageBeingSynced ?? 0 == 0 {
118+
contentIsNotSyncedYet {
118119
updateLocalProductSettings(sort: sortOrder,
119120
filters: filters)
120121
updateFilterButtonTitle(filters: filters)

0 commit comments

Comments
 (0)