This commit is contained in:
Travis Parker 2023-10-28 15:00:08 -06:00 committed by GitHub
commit adb86bbf3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -4,6 +4,7 @@ require 'digest'
require 'etc'
require 'json'
require 'readline'
require 'set'
require 'tempfile'
require 'time'
# require 'pry' # Only needed for debugging
@ -234,6 +235,10 @@ class Corpus
end
end
def self.unread_topics_set
unread_topics.map(&:hash).to_set
end
def self.size
@@corpus.size
end
@ -927,8 +932,9 @@ class Interface
Display.say Display.topic_header
# TODO: Paginate here
unread_hashes = Corpus.unread_topics_set
Corpus.topics.each_with_index do |topic, index|
if Corpus.unread_topics.include?(topic)
if unread_hashes.include?(topic.hash)
Display.say topic.to_topic_line(index + 1)
end
end