Skip to content

Commit

Permalink
rename and clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jessesquires committed Mar 30, 2024
1 parent 1a49b82 commit bb6f6b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Sources/DiffableDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension DiffableDataSource {
}
}

var destinationSnapshot = _DiffableSnapshot(viewModel: destination)
var destinationSnapshot = DiffableSnapshot(viewModel: destination)
destinationSnapshot.reconfigureItems(itemsToReload)

// Apply item updates
Expand Down Expand Up @@ -113,7 +113,7 @@ extension DiffableDataSource {
}

func reload(_ viewModel: CollectionViewModel, completion: SnapshotCompletion?) {
let snapshot = _DiffableSnapshot(viewModel: viewModel)
let snapshot = DiffableSnapshot(viewModel: viewModel)
self.applySnapshotUsingReloadData(snapshot, completion: completion)
}
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/DiffableSnapshot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
// Copyright © 2019-present Jesse Squires
//

import Foundation
import UIKit

typealias _DiffableSnapshot = NSDiffableDataSourceSnapshot<AnyHashable, AnyHashable>

extension _DiffableSnapshot {
typealias DiffableSnapshot = NSDiffableDataSourceSnapshot<AnyHashable, AnyHashable>

extension DiffableSnapshot {
init(viewModel: CollectionViewModel) {
self.init()

Expand Down
2 changes: 1 addition & 1 deletion Sources/DiffableViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public protocol DiffableViewModel: Hashable {
// swiftlint:disable unavailable_function

extension DiffableViewModel {
public var id: UniqueIdentifier { self }
// TODO: use id for these?

public static func == (left: Self, right: Self) -> Bool {
preconditionFailure("\(self) must implement Equatable \(#function)")
Expand Down
1 change: 1 addition & 0 deletions Sources/SupplementaryViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
// Copyright © 2019-present Jesse Squires
//

import Foundation
import UIKit

public typealias SupplementaryViewKind = String
Expand Down

0 comments on commit bb6f6b4

Please sign in to comment.