mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
[iOS] Reduced Project Warnings
- Unused code has been removed (`InteractiveLabel`) - `NavigationLink` code updated - `Async` alternative used for UNUserNotificationCenter - iOS target update to 16 to remove Storyboard related warnings
This commit is contained in:
@@ -21,7 +21,7 @@ struct SettingsView: View {
|
||||
@Binding var isConfigureAppearanceShown: Bool
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
NavigationStack {
|
||||
List {
|
||||
// Device Permissions
|
||||
Section(header: Text("label.text.device-permissions", comment: "Device Permissions"),
|
||||
@@ -101,9 +101,8 @@ struct SettingsView: View {
|
||||
AboutView()
|
||||
}
|
||||
.task {
|
||||
UNUserNotificationCenter.current().getNotificationSettings { settings in
|
||||
Task { await MainActor.run { self.viewModel.notificationPermissions = settings.authorizationStatus }}
|
||||
}
|
||||
let settings = await UNUserNotificationCenter.current().notificationSettings()
|
||||
Task { await MainActor.run { self.viewModel.notificationPermissions = settings.authorizationStatus }}
|
||||
}
|
||||
.onChange(of: scenePhase, perform: { phase in
|
||||
if phase == .active {
|
||||
@@ -155,6 +154,7 @@ struct SettingsView: View {
|
||||
isPresented: $viewModel.showImportExportError,
|
||||
actions: {},
|
||||
message: { Text(verbatim: viewModel.importExportError?.localizedDescription ?? "") } )
|
||||
}.navigationViewStyle(.stack)
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user