From: wmorgan Date: Sat, 6 Jan 2007 01:00:24 +0000 (+0000) Subject: bugfix to # of loaded entries X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=e751f8f42da0f65754d559dbb747a5ec8311748c;p=sup bugfix to # of loaded entries git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@200 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/modes/contact-list-mode.rb b/lib/sup/modes/contact-list-mode.rb index fe10a2c..e5c3c5e 100644 --- a/lib/sup/modes/contact-list-mode.rb +++ b/lib/sup/modes/contact-list-mode.rb @@ -100,8 +100,7 @@ protected def regen_text @user_contacts = ContactManager.contacts.invert - recent = Index.load_contacts AccountManager.user_emails, - :num => @num + recent = Index.load_contacts AccountManager.user_emails, :num => [@num - @user_contacts.length, 0].max @contacts = (@user_contacts.keys + recent.select { |p| !@user_contacts[p] }).sort_by { |p| p.sort_by_me + (p.name || "") + p.email }.remove_successive_dupes