mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
* Revert "Revert "FEATURE: Publish read state on group messages. (#7989) [Undo revert] (#8024)""
This reverts commit 36425eb9f0
.
* Fix: Show who read only if the attribute is enabled
* PERF: Precalculate the last post readed by a group member
* Use book-reader icon instear of far-eye
* FIX: update topic groups correctly
* DEV: Tidy up read indicator update on write
This commit is contained in:
parent
f2331ef07f
commit
7c741fa0d6
42 changed files with 688 additions and 21 deletions
|
@ -1020,6 +1020,24 @@ describe TopicQuery do
|
|||
|
||||
expect(topics).to eq([])
|
||||
end
|
||||
|
||||
context "Calculating minimum unread count for a topic" do
|
||||
before { group.update!(publish_read_state: true) }
|
||||
|
||||
let(:listed_message) do
|
||||
TopicQuery.new(nil, group_name: group.name)
|
||||
.list_private_messages_group(creator)
|
||||
.topics.first
|
||||
end
|
||||
|
||||
it 'returns the last read post number' do
|
||||
topic_group = TopicGroup.create!(
|
||||
topic: group_message, group: group, last_read_post_number: 10
|
||||
)
|
||||
|
||||
expect(listed_message.last_read_post_number).to eq(topic_group.last_read_post_number)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "shared drafts" do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue