Editor: Fix cancel confirmation position

This commit is contained in:
Thomas Ricouard 2023-01-16 22:03:04 +01:00
parent c21272f641
commit ce2f8620ed
1 changed files with 16 additions and 16 deletions

View File

@ -117,25 +117,25 @@ public struct StatusEditorView: View {
} label: {
Text("Cancel")
}
.confirmationDialog("",
isPresented: $isDismissAlertPresented,
actions: {
Button("Delete Draft", role: .destructive) {
dismiss()
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
object: nil)
}
Button("Save Draft") {
preferences.draftsPosts.insert(viewModel.statusText.string, at: 0)
dismiss()
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
object: nil)
}
Button("Cancel", role: .cancel) { }
})
}
}
}
.confirmationDialog("",
isPresented: $isDismissAlertPresented,
actions: {
Button("Delete Draft", role: .destructive) {
dismiss()
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
object: nil)
}
Button("Save Draft") {
preferences.draftsPosts.insert(viewModel.statusText.string, at: 0)
dismiss()
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
object: nil)
}
Button("Cancel", role: .cancel) { }
})
.interactiveDismissDisabled(!viewModel.statusText.string.isEmpty)
}