mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Implement deletion functionality for share options view
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
a4551b25c6
commit
ff305ec9fc
@ -124,4 +124,17 @@ class ShareOptionsView: NSView {
|
||||
await dataSource?.reload()
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func delete(_ sender: Any) {
|
||||
Task { @MainActor in
|
||||
setAllFields(enabled: false)
|
||||
deleteButton.isEnabled = false
|
||||
saveButton.isEnabled = false
|
||||
let error = await controller?.delete()
|
||||
if let error = error, error != .success {
|
||||
dataSource?.uiDelegate?.showError("Error deleting share: \(error.errorDescription)")
|
||||
}
|
||||
await dataSource?.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user