Skip to content

Commit 8205bb7

Browse files
committed
NotificationsViewController: Filtering Active Site's Notifications
1 parent e2eb771 commit 8205bb7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

WooCommerce/Classes/ViewRelated/Notifications/NotificationsViewController.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ class NotificationsViewController: UIViewController {
2525
/// Store Notifications CoreData Filter.
2626
///
2727
private var filter: NSPredicate {
28-
return NSPredicate(format: "type == %@ OR subtype == %@", Note.Kind.storeOrder.rawValue, Note.Subkind.storeReview.rawValue)
28+
let typePredicate = NSPredicate(format: "type == %@ OR subtype == %@", Note.Kind.storeOrder.rawValue, Note.Subkind.storeReview.rawValue)
29+
let sitePredicate = NSPredicate(format: "siteID == %lld", StoresManager.shared.sessionManager.defaultStoreID ?? Int.min)
30+
31+
return NSCompoundPredicate(andPredicateWithSubpredicates: [typePredicate, sitePredicate])
2932
}
3033

3134
/// Pull To Refresh Support.

0 commit comments

Comments
 (0)