sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 0c5aecc959b988b057b5d5cf30c2ba6e50cbe70e
parent 120a3170b1f13fb2394d30772d01bac3ed46e3a0
Author: William Morgan <wmorgan-sup@masanjin.net>
Date:   Thu, 24 Jan 2008 18:51:58 -0800

Merge branch 'update-fix' into next

Diffstat:
M lib/sup/modes/thread-index-mode.rb | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -526,14 +526,12 @@ EOS
 protected
 
   def add_or_unhide m
-    if @hidden_threads[m]
-      @hidden_threads.delete m
-      ## now it will re-appear when #update is called
-    else
-      @ts_mutex.synchronize do
-        return unless is_relevant?(m) || @ts.is_relevant?(m)
+    @ts_mutex.synchronize do
+      if (is_relevant?(m) || @ts.is_relevant?(m)) && !@ts.contains?(m)
         @ts.load_thread_for_message m
       end
+
+      @hidden_threads.delete @ts.thread_for(m)
     end
 
     update