Skip to content

Commit

Permalink
Remove iOS 17 APIs usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Jun 23, 2024
1 parent 21cf3f0 commit 4e1189d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
9 changes: 2 additions & 7 deletions Sources/PulseUI/Features/Console/ConsoleDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ protocol ConsoleDataSourceDelegate: AnyObject {
func dataSource(_ dataSource: ConsoleDataSource, didUpdateWith diff: CollectionDifference<NSManagedObjectID>?)
}

@MainActor
final class ConsoleDataSource: NSObject, NSFetchedResultsControllerDelegate {
weak var delegate: ConsoleDataSourceDelegate?

Expand Down Expand Up @@ -136,15 +135,11 @@ final class ConsoleDataSource: NSObject, NSFetchedResultsControllerDelegate {
// MARK: NSFetchedResultsControllerDelegate

nonisolated func controllerDidChangeContent(_ controller: NSFetchedResultsController<NSFetchRequestResult>) {
MainActor.assumeIsolated {
delegate?.dataSource(self, didUpdateWith: nil)
}
delegate?.dataSource(self, didUpdateWith: nil)
}

nonisolated func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChangeContentWith diff: CollectionDifference<NSManagedObjectID>) {
MainActor.assumeIsolated {
delegate?.dataSource(self, didUpdateWith: diff)
}
delegate?.dataSource(self, didUpdateWith: diff)
}

// MARK: Predicate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Pulse
import Combine
import SwiftUI

@MainActor
final class ConsoleFiltersViewModel: ObservableObject {
@Published var mode: ConsoleMode = .all
@Published var options = ConsoleDataSource.PredicateOptions()
Expand Down

0 comments on commit 4e1189d

Please sign in to comment.