Skip to content

Commit

Permalink
Remove workaround for tableviews
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitschlag committed Dec 17, 2022
1 parent af2cf75 commit 2cdd8af
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 40 deletions.
4 changes: 0 additions & 4 deletions Mastodon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@
DB72602725E36A6F00235243 /* MastodonServerRulesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB72602625E36A6F00235243 /* MastodonServerRulesViewModel.swift */; };
DB7274F4273BB9B200577D95 /* ListBatchFetchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB7274F3273BB9B200577D95 /* ListBatchFetchViewModel.swift */; };
DB73B490261F030A002E9E9F /* SafariActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB73B48F261F030A002E9E9F /* SafariActivity.swift */; };
DB73BF4B27140C0800781945 /* UITableViewDiffableDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB73BF4A27140C0800781945 /* UITableViewDiffableDataSource.swift */; };
DB75BF1E263C1C1B00EDBF1F /* CustomScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB75BF1D263C1C1B00EDBF1F /* CustomScheduler.swift */; };
DB789A0B25F9F2950071ACA0 /* ComposeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB789A0A25F9F2950071ACA0 /* ComposeViewController.swift */; };
DB789A1225F9F2CC0071ACA0 /* ComposeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB789A1125F9F2CC0071ACA0 /* ComposeViewModel.swift */; };
Expand Down Expand Up @@ -880,7 +879,6 @@
DB72602625E36A6F00235243 /* MastodonServerRulesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MastodonServerRulesViewModel.swift; sourceTree = "<group>"; };
DB7274F3273BB9B200577D95 /* ListBatchFetchViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListBatchFetchViewModel.swift; sourceTree = "<group>"; };
DB73B48F261F030A002E9E9F /* SafariActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SafariActivity.swift; sourceTree = "<group>"; };
DB73BF4A27140C0800781945 /* UITableViewDiffableDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UITableViewDiffableDataSource.swift; sourceTree = "<group>"; };
DB75BF1D263C1C1B00EDBF1F /* CustomScheduler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomScheduler.swift; sourceTree = "<group>"; };
DB789A0A25F9F2950071ACA0 /* ComposeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeViewController.swift; sourceTree = "<group>"; };
DB789A1125F9F2CC0071ACA0 /* ComposeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposeViewModel.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2283,7 +2281,6 @@
DB9E0D6E25EE008500CFDD76 /* UIInterpolatingMotionEffect.swift */,
2AE244472927831100BDBF7C /* UIImage+SFSymbols.swift */,
DBCC3B2F261440A50045B23D /* UITabBarController.swift */,
DB73BF4A27140C0800781945 /* UITableViewDiffableDataSource.swift */,
2A1FE47D2938C11200784BF1 /* Collection+IsNotEmpty.swift */,
);
path = Extension;
Expand Down Expand Up @@ -3406,7 +3403,6 @@
DB1E346825F518E20079D7DF /* CategoryPickerSection.swift in Sources */,
DB7274F4273BB9B200577D95 /* ListBatchFetchViewModel.swift in Sources */,
DB0618052785A73D0030EE79 /* RegisterItem.swift in Sources */,
DB73BF4B27140C0800781945 /* UITableViewDiffableDataSource.swift in Sources */,
DBB525642612C988002F1F29 /* MeProfileViewModel.swift in Sources */,
DB3EA8EF281B837000598866 /* DiscoveryCommunityViewController+DataSourceProvider.swift in Sources */,
DB6B74EF272FB55000C70B6E /* FollowerListViewController.swift in Sources */,
Expand Down
25 changes: 0 additions & 25 deletions Mastodon/Extension/UITableViewDiffableDataSource.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension DiscoveryCommunityViewModel {
}
}

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extension DiscoveryForYouViewModel {
let items = records.map { DiscoveryItem.user($0) }
snapshot.appendItems(items, toSection: .forYou)

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension DiscoveryNewsViewModel {
}
}

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension DiscoveryPostsViewModel {
}
}

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ extension MastodonLoginViewController: MastodonLoginViewModelDelegate {
snapshot.appendSections([MastodonLoginViewSection.servers])
snapshot.appendItems(viewModel.filteredServers)

dataSource?.applySnapshot(snapshot, animated: false)
dataSource?.apply(snapshot, animatingDifferences: false)

OperationQueue.main.addOperation {
let numberOfResults = viewModel.filteredServers.count
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ extension MastodonServerRulesViewModel {
return ServerRuleItem.rule(ruleContext)
}
snapshot.appendItems(ruleItems, toSection: .rules)
diffableDataSource?.applySnapshot(snapshot, animated: false, completion: nil)
diffableDataSource?.apply(snapshot, animatingDifferences: false)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension BookmarkViewModel {
}
}

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extension FavoriteViewModel {
}
}

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class FollowedTagsViewModel: NSObject {
var snapshot = NSDiffableDataSourceSnapshot<Section, Item>()
snapshot.appendSections([.main])
snapshot.appendItems(records.map {.hashtag($0) })
self.diffableDataSource?.applySnapshot(snapshot, animated: true)
self.diffableDataSource?.apply(snapshot, animatingDifferences: true)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extension UserTimelineViewModel {
}
}

diffableDataSource.applySnapshot(snapshot, animated: false)
diffableDataSource.apply(snapshot, animatingDifferences: false)
}
.store(in: &disposeBag)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extension ReportStatusViewModel {
break
}

diffableDataSource.applySnapshot(snapshot, animated: false) { [weak self] in
diffableDataSource.apply(snapshot, animatingDifferences: false) { [weak self] in
guard let self = self else { return }
guard let diffableDataSource = self.diffableDataSource else { return }

Expand Down

0 comments on commit 2cdd8af

Please sign in to comment.