Skip to content

Commit f029712

Browse files
authored
Results controller: Notify listeners of changes when updating predicate and sort descriptors (#16350)
2 parents 354244d + 87e48a7 commit f029712

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Modules/Sources/Yosemite/Tools/ResultsController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,13 +234,15 @@ public class GenericResultsController<T: ResultsControllerMutableType, Output> {
234234
private func refreshFetchedObjects(predicate: NSPredicate?) {
235235
controller.fetchRequest.predicate = predicate
236236
try? controller.performFetch()
237+
onDidChangeContent?()
237238
}
238239

239240
/// Refreshes all of the Fetched Objects, so that the new sort descriptors are applied.
240241
///
241242
private func refreshFetchedObjects(sortDescriptors: [NSSortDescriptor]?) {
242243
controller.fetchRequest.sortDescriptors = sortDescriptors
243244
try? controller.performFetch()
245+
onDidChangeContent?()
244246
}
245247

246248
/// Initializes the FetchedResultsController

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [*] Fix order details presentation when opened from booking details [https://github.com/woocommerce/woocommerce-ios/pull/16331]
1010
- [*] Show POS feedback surveys for eligible merchants [https://github.com/woocommerce/woocommerce-ios/pull/16325]
1111
- [*] Fix product variation selection for order creation [https://github.com/woocommerce/woocommerce-ios/pull/16317]
12+
- [Internal] Notify listeners immediately after updating predicates or sort descriptors for results controllers. [https://github.com/woocommerce/woocommerce-ios/pull/16350]
1213

1314
23.6
1415
-----

0 commit comments

Comments
 (0)