forked from shadowfacts/Tusker
Require iOS 15 for Disable Infinite Scrolling
This commit is contained in:
parent
1e7a6af0bf
commit
60c88ded5e
|
@ -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"))
|
||||||
}
|
}
|
||||||
|
|
|
@ -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))
|
||||||
|
|
Loading…
Reference in New Issue