|
|
|
@ -1077,13 +1077,6 @@ extension ConversationVC:
|
|
|
|
|
.done { _ in
|
|
|
|
|
// Delete the interaction (and associated data) from the database
|
|
|
|
|
Storage.shared.writeAsync { db in
|
|
|
|
|
try Quote
|
|
|
|
|
.updateBeforeQuotedInterationDeletion(
|
|
|
|
|
db,
|
|
|
|
|
timestampMs: cellViewModel.timestampMs,
|
|
|
|
|
authorId: cellViewModel.authorId
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
_ = try Interaction
|
|
|
|
|
.filter(id: cellViewModel.id)
|
|
|
|
|
.deleteAll(db)
|
|
|
|
@ -1164,13 +1157,6 @@ extension ConversationVC:
|
|
|
|
|
// For incoming interactions or interactions with no serverHash just delete them locally
|
|
|
|
|
guard cellViewModel.variant == .standardOutgoing, let serverHash: String = serverHash else {
|
|
|
|
|
Storage.shared.writeAsync { db in
|
|
|
|
|
try Quote
|
|
|
|
|
.updateBeforeQuotedInterationDeletion(
|
|
|
|
|
db,
|
|
|
|
|
timestampMs: cellViewModel.timestampMs,
|
|
|
|
|
authorId: cellViewModel.authorId
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
_ = try Interaction
|
|
|
|
|
.filter(id: cellViewModel.id)
|
|
|
|
|
.deleteAll(db)
|
|
|
|
@ -1194,13 +1180,6 @@ extension ConversationVC:
|
|
|
|
|
let alertVC = UIAlertController.init(title: nil, message: nil, preferredStyle: .actionSheet)
|
|
|
|
|
alertVC.addAction(UIAlertAction(title: "delete_message_for_me".localized(), style: .destructive) { [weak self] _ in
|
|
|
|
|
Storage.shared.writeAsync { db in
|
|
|
|
|
try Quote
|
|
|
|
|
.updateBeforeQuotedInterationDeletion(
|
|
|
|
|
db,
|
|
|
|
|
timestampMs: cellViewModel.timestampMs,
|
|
|
|
|
authorId: cellViewModel.authorId
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
_ = try Interaction
|
|
|
|
|
.filter(id: cellViewModel.id)
|
|
|
|
|
.deleteAll(db)
|
|
|
|
|