Skip to content

Commit 8fefa69

Browse files
committed
Merge branch 'woomob-619-xcode-warnings-performing-io-on-the-main-thread-can-cause' into woomob-619-product-list-update
2 parents 2e10b2f + 98f92c7 commit 8fefa69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WooCommerce/Classes/ViewModels/Order Details/OrderDetailsResultsControllers.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ final class OrderDetailsResultsControllers {
2424
/// Product ResultsController.
2525
///
2626
private lazy var productResultsController: ResultsController<StorageProduct> = {
27-
let predicate = NSPredicate(format: "siteID == %lld", siteID)
27+
let productIDs = order.items.map { $0.productID }
28+
let predicate = NSPredicate(format: "siteID == %lld AND productID IN %@", siteID, productIDs)
2829
let descriptor = NSSortDescriptor(key: "name", ascending: true)
2930

3031
return ResultsController<StorageProduct>(storageManager: storageManager, matching: predicate, sortedBy: [descriptor])

0 commit comments

Comments
 (0)