diff --git a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift index 0aa79b49e..26b127f4c 100644 --- a/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/Labels/LabelsView.swift @@ -17,21 +17,6 @@ struct LabelsView: View { #if os(iOS) Form { innerBody - .alert("Are you sure you want to delete this label?", isPresented: $showDeleteConfirmation) { - Button("Delete Label", role: .destructive) { - if let label = labelToRemove { - withAnimation { - viewModel.deleteLabel( - dataService: dataService, - labelID: label.unwrappedID, - name: label.unwrappedName - ) - } - } - self.labelToRemove = nil - } - Button("Cancel", role: .cancel) { self.labelToRemove = nil } - } } #elseif os(macOS) List { @@ -39,6 +24,21 @@ struct LabelsView: View { } #endif } + .alert("Are you sure you want to delete this label?", isPresented: $showDeleteConfirmation) { + Button("Delete Label", role: .destructive) { + if let label = labelToRemove { + withAnimation { + viewModel.deleteLabel( + dataService: dataService, + labelID: label.unwrappedID, + name: label.unwrappedName + ) + } + } + self.labelToRemove = nil + } + Button("Cancel", role: .cancel) { self.labelToRemove = nil } + } .sheet(isPresented: $viewModel.showCreateLabelModal) { CreateLabelView(viewModel: viewModel) }