]> git.cworth.org Git - sup/blobdiff - lib/sup/modes/inbox-mode.rb
don't automatically save with dispatch-and-kill
[sup] / lib / sup / modes / inbox-mode.rb
index 719565bce1ef1be42b795b768d86b86f3f209ec3..a2de13fc5b6717d36052741bba7341d7d8153525 100644 (file)
@@ -38,18 +38,15 @@ class InboxMode < ThreadIndexMode
     regen_text
   end
 
-  def handle_archived_update sender, t
-    if contains_thread? t
-      hide_thread t
-      regen_text
-    end
+  def handle_unarchived_update sender, m
+    add_or_unhide m
   end
 
-# not quite working, and not sure if i like it anyways
-#   def handle_unarchived_update sender, t
-#     Redwood::log "unarchived #{t.subj}"
-#     show_thread t
-  end
+  def handle_archived_update sender, m
+    t = thread_containing(m) or return
+    hide_thread t
+    regen_text
+  end
 
   def status
     super + "    #{Index.size} messages in index"