forked from shadowfacts/Tusker
parent
d938c555b7
commit
c0148bb770
|
@ -49,7 +49,9 @@ class AttachmentRowController: ViewController {
|
||||||
|
|
||||||
private func removeAttachment() {
|
private func removeAttachment() {
|
||||||
withAnimation {
|
withAnimation {
|
||||||
parent.draft.attachments.remove(attachment)
|
var newAttachments = parent.draft.draftAttachments
|
||||||
|
newAttachments.removeAll(where: { $0.id == attachment.id })
|
||||||
|
parent.draft.attachments = NSMutableOrderedSet(array: newAttachments)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue