From: wmorgan Date: Mon, 11 Jun 2007 16:21:10 +0000 (+0000) Subject: bugfix and yet more address imrpvoements: always use 'me' when possible X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=52bf32738e89c5cffab04d42f058ae69791734b6;p=sup 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 --- diff --git a/lib/sup/account.rb b/lib/sup/account.rb index 344572e..4110608 100644 --- 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 index b90c21e..4333995 100644 --- 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