Skip to content

Commit

Permalink
Remove placement
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Sep 30, 2024
1 parent 67eeeb8 commit 540388c
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Sources/XCTSpeziNotificationsUI/NotificationsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,17 @@ public struct NotificationsView: View {
public var body: some View {
PendingNotificationsList()
.toolbar {
ToolbarItem(placement: .topBarLeading) {
if requestAuthorization {
AsyncButton(state: $viewState) {
try await requestNotificationAuthorization(options: [.alert, .sound, .badge])
await queryAuthorization()
authorizationAction()
} label: {
Label {
Text("Request Notification Authorization", bundle: .module)
} icon: {
Image(systemName: "alarm.waves.left.and.right.fill")
.accessibilityHidden(true)
}
if requestAuthorization {
AsyncButton(state: $viewState) {
try await requestNotificationAuthorization(options: [.alert, .sound, .badge])
await queryAuthorization()
authorizationAction()
} label: {
Label {
Text("Request Notification Authorization", bundle: .module)
} icon: {
Image(systemName: "alarm.waves.left.and.right.fill")
.accessibilityHidden(true)
}
}
}
Expand Down

0 comments on commit 540388c

Please sign in to comment.