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,7 +16,9 @@ struct WellnessPrefsView: View {
showFavAndReblogCount
notificationsMode
grayscaleImages
disableInfiniteScrolling
if #available(iOS 15.0, *) {
disableInfiniteScrolling
}
}
.listStyle(InsetGroupedListStyle())
.navigationBarTitle(Text("Digital Wellness"))

View File

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