mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Revert "Drop iOS 14 and macOS 11 support"
This reverts commit dcef7f47ff
.
This commit is contained in:
@@ -16,7 +16,11 @@ struct TrendingCountry: View {
|
||||
VStack {
|
||||
#if !os(tvOS)
|
||||
HStack {
|
||||
TextField("Country", text: $query, prompt: Text(Self.prompt))
|
||||
if #available(iOS 15.0, macOS 12.0, *) {
|
||||
TextField("Country", text: $query, prompt: Text(Self.prompt))
|
||||
} else {
|
||||
TextField(Self.prompt, text: $query)
|
||||
}
|
||||
|
||||
Button("Done") { selectCountryAndDismiss() }
|
||||
.keyboardShortcut(.defaultAction)
|
||||
@@ -53,8 +57,12 @@ struct TrendingCountry: View {
|
||||
|
||||
return Group {
|
||||
#if os(macOS)
|
||||
list
|
||||
.listStyle(.inset(alternatesRowBackgrounds: true))
|
||||
if #available(macOS 12.0, *) {
|
||||
list
|
||||
.listStyle(.inset(alternatesRowBackgrounds: true))
|
||||
} else {
|
||||
list
|
||||
}
|
||||
#else
|
||||
list
|
||||
#endif
|
||||
|
@@ -95,7 +95,12 @@ struct TrendingView: View {
|
||||
.navigationTitle("Trending")
|
||||
#endif
|
||||
#if os(iOS)
|
||||
|
||||
.refreshControl { refreshControl in
|
||||
resource.load().onCompletion { _ in
|
||||
refreshControl.endRefreshing()
|
||||
}
|
||||
}
|
||||
.backport
|
||||
.refreshable {
|
||||
DispatchQueue.main.async {
|
||||
resource.load()
|
||||
|
Reference in New Issue
Block a user