Skip to content

Commit

Permalink
Replace NullStore with InMemoryFeedStore to improve UX
Browse files Browse the repository at this point in the history
- The InMemoryStore can provide better UX as it supports pagination and image caching
- Made the infra queue serial - instead of concurrent - since the InMemoryFeedStore is not thread safe
  • Loading branch information
caiozullo committed Mar 27, 2024
1 parent fdee7d7 commit ff62369
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions EssentialApp/EssentialApp/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

return DispatchQueue(
label: "com.essentialdeveloper.infra.queue",
qos: .userInitiated,
attributes: .concurrent
qos: .userInitiated
).eraseToAnyScheduler()
}()

Expand All @@ -38,7 +37,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
} catch {
assertionFailure("Failed to instantiate CoreData store with error: \(error.localizedDescription)")
logger.fault("Failed to instantiate CoreData store with error: \(error.localizedDescription)")
return NullStore()
return InMemoryFeedStore()
}
}()

Expand Down

0 comments on commit ff62369

Please sign in to comment.