Drop iOS 14 and macOS 11 support

This commit is contained in:
Arkadiusz Fal
2023-07-01 18:38:11 +02:00
parent a1c9d3aaa9
commit dcef7f47ff
46 changed files with 90 additions and 688 deletions

View File

@@ -8,7 +8,7 @@ struct OpenSettingsButton: View {
#endif
var body: some View {
let button = Button {
Button {
presentationMode.wrappedValue.dismiss()
#if os(macOS)
@@ -20,13 +20,7 @@ struct OpenSettingsButton: View {
Label("Open Settings", systemImage: "gearshape.2")
}
.buttonStyle(.plain)
if #available(iOS 15.0, macOS 12.0, tvOS 15.0, *) {
button
.buttonStyle(.borderedProminent)
} else {
button
}
.buttonStyle(.borderedProminent)
}
}

View File

@@ -47,14 +47,6 @@ struct PopularView: View {
}
}
.navigationBarTitleDisplayMode(.inline)
.refreshControl { refreshControl in
resource?.load().onCompletion { _ in
refreshControl.endRefreshing()
}
.onFailure { self.error = $0 }
.onSuccess { _ in self.error = nil }
}
.backport
.refreshable {
DispatchQueue.main.async {
resource?.load()
@@ -62,7 +54,7 @@ struct PopularView: View {
.onSuccess { _ in self.error = nil }
}
}
.navigationBarTitleDisplayMode(RefreshControl.navigationBarTitleDisplayMode)
.navigationBarTitleDisplayMode(.inline)
#endif
#if os(macOS)
.toolbar {

View File

@@ -281,11 +281,7 @@ struct VideoContextMenuView: View {
let label = Label("Remove…", systemImage: "trash.fill")
.foregroundColor(Color("AppRedColor"))
if #available(iOS 15, macOS 12, *) {
Button(role: .destructive, action: action) { label }
} else {
Button(action: action) { label }
}
Button(role: .destructive, action: action) { label }
}
#endif