Sha256: 116d139796e7ed65700425689efe7f285ec3c13b8ae357ba605dba677d95e41d

Contents?: true

Size: 399 Bytes

Versions: 18

Compression:

Stored size: 399 Bytes

Contents

# frozen_string_literal: true

module Thredded
  class NullUserTopicReadState
    attr_reader :posts_count

    def initialize(posts_count:)
      @posts_count = posts_count
    end

    def page
      1
    end

    def read?
      false
    end

    def post_read?(_post)
      false
    end

    def first_unread_post_page
      nil
    end

    def last_read_post_page
      1
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
thredded-1.1.0 app/models/thredded/null_user_topic_read_state.rb
thredded-1.0.1 app/models/thredded/null_user_topic_read_state.rb
thredded-1.0.0 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.16 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.15 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.14 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.13 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.12 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.11 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.10 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.9 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.8 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.7 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.6 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.5 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.4 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.3 app/models/thredded/null_user_topic_read_state.rb
thredded-0.16.1 app/models/thredded/null_user_topic_read_state.rb