Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented 45th eMBee's idea - info in label-search-results-mode about amount of all threads and these unread ones #365

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/sup/modes/label_search_results_mode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def self.spawn_nicely label
when :inbox
BufferManager.raise_to_front InboxMode.instance.buffer
else
b, new = BufferManager.spawn_unless_exists("All threads with label '#{label}'") { LabelSearchResultsMode.new [label] }
unread = Index.num_results_for(:labels => [label, :unread])
allmsg = Index.num_results_for(:labels => [label])
b, new = BufferManager.spawn_unless_exists("'#{label}' - #{allmsg.pluralize 'message'}, #{unread} unread") { LabelSearchResultsMode.new [label] }
b.mode.load_threads :num => b.content_height if new
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/sup/modes/thread_index_mode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def load_threads opts={}
opts[:when_done].call(num) if opts[:when_done]

if num > 0
BufferManager.flash "Found #{num.pluralize 'thread'}."
BufferManager.flash "Loaded #{num.pluralize 'thread'}."
else
BufferManager.flash "No matches."
end
Expand Down