Require iOS 15 for Disable Infinite Scrolling

This commit is contained in:
Shadowfacts 2021-06-27 17:17:39 -04:00
parent 1e7a6af0bf
commit 60c88ded5e
2 changed files with 5 additions and 2 deletions

View File

@ -16,8 +16,10 @@ struct WellnessPrefsView: View {
showFavAndReblogCount showFavAndReblogCount
notificationsMode notificationsMode
grayscaleImages grayscaleImages
if #available(iOS 15.0, *) {
disableInfiniteScrolling disableInfiniteScrolling
} }
}
.listStyle(InsetGroupedListStyle()) .listStyle(InsetGroupedListStyle())
.navigationBarTitle(Text("Digital Wellness")) .navigationBarTitle(Text("Digital Wellness"))
} }

View File

@ -123,7 +123,8 @@ class TimelineTableViewController: DiffableTimelineLikeTableViewController<Timel
return return
} }
guard !Preferences.shared.disableInfiniteScrolling || didConfirmLoadMore else { if #available(iOS 15.0, *),
Preferences.shared.disableInfiniteScrolling && !didConfirmLoadMore {
guard !currentSnapshot.itemIdentifiers(inSection: .footer).contains(.confirmLoadMore) else { guard !currentSnapshot.itemIdentifiers(inSection: .footer).contains(.confirmLoadMore) else {
// todo: need something more accurate than "success"/"failure" // todo: need something more accurate than "success"/"failure"
completion(.success(currentSnapshot)) completion(.success(currentSnapshot))