Skip to content

Commit

Permalink
Remove internal _isDatabaseObserverItemReusingEnabled runtime check (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
laevandus authored Jan 17, 2025
1 parent 9474d33 commit 5624d53
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions Sources/StreamChat/Config/StreamRuntimeCheck.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public enum StreamRuntimeCheck {
currentDepth <= _backgroundMappingRelationshipsMaxDepth
}

/// For *internal use* only
///
/// Enables reusing unchanged converted items in database observers.
public static var _isDatabaseObserverItemReusingEnabled = true

/// For *internal use* only
///
/// Core Data prefetches data used for creating immutable model objects (faulting is disabled).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum DatabaseItemConverter {
let items: [Item]

// Reuse converted items by id
if StreamRuntimeCheck._isDatabaseObserverItemReusingEnabled, let itemReuseKeyPaths {
if let itemReuseKeyPaths {
let existingItems = existing.map { ($0[keyPath: itemReuseKeyPaths.item], $0) }
var lookup = Dictionary(existingItems, uniquingKeysWith: { _, second in second })
// Changes contains newly converted items, add them to the lookup
Expand Down

0 comments on commit 5624d53

Please sign in to comment.