aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-08-04 21:43:48 -0500
committerRobin Jarry <robin@jarry.cc>2022-08-05 21:57:12 +0200
commit6057d156e6abd0b4c309e00c05021213565a2775 (patch)
tree5d23a8903d12b52e35555639a509add63f1f8ee7 /lib
parent602a5778e872cf18935433b2916b0e4a54f5fcea (diff)
downloadaerc-6057d156e6abd0b4c309e00c05021213565a2775.tar.gz
delete: revert deleted messages if Delete is unsupported
Delete operations are not supported by the notmuch backend. Revert deleted messages when the operation is not supported, and reselect the original selection. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Tested-by: Koni Marti <koni.marti@gmail.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index efa6f732..9799a996 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -440,6 +440,9 @@ func (store *MessageStore) Delete(uids []uint32,
if _, ok := msg.(*types.Error); ok {
store.revertDeleted(uids)
}
+ if _, ok := msg.(*types.Unsupported); ok {
+ store.revertDeleted(uids)
+ }
cb(msg)
})
}