sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 75ca131934f1e38852949703163f67e653f51e09
parent 969061797a2a5e67c4869b64a00cd4511db27237
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Sun, 30 Aug 2009 17:50:34 -0700

sup-sync: restore state on messages that don't already exist

Diffstat:
M bin/sup-sync | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/bin/sup-sync b/bin/sup-sync
@@ -174,7 +174,12 @@ begin
       ## decide what to do based on message labels and the operation we're performing
       dothis, new_labels = case
       when (op == :restore) && restored_state[m.id] && old_m && (old_m.labels != restored_state[m.id])
+        num_restored += 1
         [:update_message_state, restored_state[m.id]]
+      when (op == :restore) && restored_state[m.id] && !old_m
+        num_restored += 1
+        m.labels = restored_state[m.id]
+        :add_message
       when op == :discard
         if old_m && (old_m.labels != m.labels)
           [:update_message_state, m.labels]