mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03: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
1 changed files with 13 additions and 0 deletions
|
@ -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 a new issue