Skip to content

Commit f2fadad

Browse files
committed
Update comments in ResultController
1 parent cfaaff8 commit f2fadad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Modules/Sources/Yosemite/Tools/ResultsController.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public class ResultsController<T: ResultsControllerMutableType> {
194194
}
195195

196196
/// Returns an array of all of the (ReadOnly) Fetched Objects.
197+
/// Note: Avoid calling this in computed variables as the conversion of storage items can be costly.
197198
///
198199
public var fetchedObjects: [T.ReadOnlyType] {
199200
let readOnlyObjects = controller.fetchedObjects?.compactMap { mutableObject in
@@ -346,7 +347,8 @@ public extension ResultsController {
346347

347348

348349
public extension ResultsController where T: ListItemConvertible {
349-
/// Returns an array of all list items mapped from the fetched objects
350+
/// Returns an array of all list items mapped from the fetched objects.
351+
/// Note: Avoid calling this in computed variables as the conversion of storage items can be costly.
350352
///
351353
var listItemObjects: [T.ListItemType] {
352354
let listItemObjects = controller.fetchedObjects?.compactMap { mutableObject in

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ private extension OrderDetailsResultsControllers {
374374
try? shippingMethodsResultsController.performFetch()
375375
}
376376

377+
func updateShippingLabels() {
377378
guard shipments.isEmpty else {
378379
shippingLabels = shipments.compactMap { $0.shippingLabel }
379380
return

0 commit comments

Comments
 (0)