Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Conversation

RomanPodymov
Copy link
Owner

No description provided.

@RomanPodymov RomanPodymov requested a review from Copilot April 26, 2025 22:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates dependency versions and adds local storage support via RealmSwift or SwiftData for the Bookie app while also updating test configurations and introducing new data source implementations.

  • Upgrade Kingfisher to version 8.3.2
  • Add RealmSwift dependency and configuration for local storage
  • Refactor data fetching in BooksViewModel to use dependency injection with remote and local data sources

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
project.yml Updated dependency versions and added RealmSwift configuration
BookieTests/BookieTests.swift Added tests for new data source functionality and retroactive Equatable conformance
Bookie/ViewModel/SwiftDataSource.swift Implemented local data source using SwiftData models for iOS 17
Bookie/ViewModel/RealmDataSource.swift Implemented alternative local data source for pre-iOS 17 devices
Bookie/ViewModel/GoogleRemoteDataSource.swift Added remote data source using Moya to fetch book data
Bookie/ViewModel/BooksViewModel.swift Modified reloadData to resolve remote/local data sources and update data
Bookie/UI/AppDelegate.swift Configured dependency registrations for new data sources and Coordinator
Comments suppressed due to low confidence (1)

Bookie/ViewModel/BooksViewModel.swift:86

  • The local variable 'newSet' shadows the view model's property and is not assigned back, which may lead to an inconsistent state. Consider updating the view model's 'newSet' property (e.g. using 'self.newSet = …') to ensure that the latest data is stored.
let newSet = [DataSetKeyType: [Book]](grouping: newSetFiltered, by: { $0.volumeInfo.categories.map { .init($0) } ?? .init() }).mapValues { $0.sorted(by: \ .volumeInfo.title) }.map { DataSetItemType(model: $0.key, elements: $0.value) }.sorted { lhs, rhs in lhs.model.joined() < rhs.model.joined() }

@RomanPodymov RomanPodymov merged commit c9ccabc into main Apr 26, 2025
1 check passed
@RomanPodymov RomanPodymov deleted the feature/local branch April 26, 2025 23:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant