Initial prototype for Swift 6 mode

This commit is contained in:
John Estropia
2026-07-07 11:18:17 +09:00
parent 38ec439b18
commit 49f65601cd
71 changed files with 998 additions and 684 deletions
+13 -3
View File
@@ -95,7 +95,10 @@ extension DiffableDataSource {
- parameter dataStack: the `DataStack` instance that the dataSource will fetch objects from
- parameter cellProvider: a closure that configures and returns the `UITableViewCell` for the object
*/
public init(target: T, dataStack: DataStack) {
public init(
target: T,
dataStack: DataStack
) {
self.target = target
self.dataStack = dataStack
@@ -106,7 +109,10 @@ extension DiffableDataSource {
Clears the target.
- parameter animatingDifferences: if `true`, animations may be applied accordingly. Defaults to `true`.
*/
open func purge(animatingDifferences: Bool = true, completion: @escaping () -> Void = {}) {
open func purge(
animatingDifferences: Bool = true,
completion: @escaping @Sendable () -> Void = {}
) {
self.dispatcher.purge(
target: self.target,
@@ -136,7 +142,11 @@ extension DiffableDataSource {
- parameter snapshot: the `ListSnapshot` used to reload the target with. This is typically from the `snapshot` property of a `ListPublisher`.
- parameter animatingDifferences: if `true`, animations may be applied accordingly. Defaults to `true`.
*/
open func apply(_ snapshot: ListSnapshot<O>, animatingDifferences: Bool = true, completion: @escaping () -> Void = {}) {
open func apply(
_ snapshot: ListSnapshot<O>,
animatingDifferences: Bool = true,
completion: @escaping @Sendable () -> Void = {}
) {
let diffableSnapshot = snapshot.diffableSnapshot
self.dispatcher.apply(