sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 52bf32738e89c5cffab04d42f058ae69791734b6
parent ef84454caff512230352ed901487ab020e715d19
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Mon, 11 Jun 2007 16:21:10 +0000

bugfix and yet more address imrpvoements: always use 'me' when possible

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@445 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/account.rb | 2 +-
M lib/sup/modes/thread-index-mode.rb | 14 +++++++++-----
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/lib/sup/account.rb b/lib/sup/account.rb
@@ -26,7 +26,7 @@ class AccountManager
   end
 
   def user_accounts; @accounts.keys; end
-  def user_emails; (@email_map.keys + @alternate_map.keys).uniq.select { |e| String === e }; end
+  def user_emails; @email_map.keys.select { |e| String === e }; end
 
   def add_account hash, default=false
     main_email = hash[:email]
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
@@ -433,11 +433,15 @@ protected
   end
   
   def author_text_for_thread t
-    if t.authors.size == 1
-      t.authors.first.mediumname
-    else
-      t.authors.map { |p| AccountManager.is_account?(p) ? "me" : p.shortname }.join ", "
-    end
+    t.authors.map do |p|
+      if AccountManager.is_account?(p)
+        "me"
+      elsif t.authors.size == 1
+        p.mediumname
+      else
+        p.shortname
+      end
+    end.join ","
   end
 
   def text_for_thread t