lib/ayadn/view.rb in ayadn-1.2.5 vs lib/ayadn/view.rb in ayadn-1.2.6

- old
+ new

@@ -303,11 +303,11 @@ def build_stream_with_index(data, options, niceranks) #expects an array @view = "" posts = @workers.build_posts(data.reverse, niceranks) - posts = filter_nicerank posts, options + posts = filter_nicerank(posts, options) posts.each do |id,content| count = "%03d" % content[:count] if content[:username] == Settings.config[:identity][:username] @view << count.color(Settings.options[:colors][:index]).inverse @@ -324,11 +324,11 @@ def build_stream_without_index(data, options, niceranks) #expects an array @view = "" posts = @workers.build_posts(data.reverse, niceranks) - posts = filter_nicerank posts, options + posts = filter_nicerank(posts, options) posts.each do |id,content| if content[:username] == Settings.config[:identity][:username] @view << content[:id].to_s.color(Settings.options[:colors][:id]).inverse + " " elsif content[:mentions].include?(Settings.config[:identity][:username]) && options[:in_mentions].nil? @@ -458,12 +458,14 @@ if Settings.options[:timeline][:show_real_name] header << " " header << content[:name].color(Settings.options[:colors][:name]) end - if Settings.options[:timeline][:show_nicerank] && content[:nicerank] && Settings.options[:nicerank][:filter] - header << " " - header << "[#{content[:nicerank]}]".color(Settings.options[:colors][:nicerank]) + if Settings.options[:timeline][:show_nicerank] && content[:nicerank] + if Settings.options[:nicerank][:filter] == true + header << " " + header << "[#{content[:nicerank]}]".color(Settings.options[:colors][:nicerank]) + end end if Settings.options[:timeline][:show_date] header << " " header << content[:date].color(Settings.options[:colors][:date])