mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-03-26 06:41:22 -04:00
FIX: Read post icon was not fading
This commit is contained in:
parent
c76e6e173e
commit
befae52c09
1 changed files with 8 additions and 6 deletions
|
@ -715,14 +715,16 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||
},
|
||||
|
||||
readPosts(topicId, postNumbers) {
|
||||
const topic = this.get("model"),
|
||||
postStream = topic.get("postStream");
|
||||
const topic = this.get("model");
|
||||
const postStream = topic.get("postStream");
|
||||
|
||||
if (topic.get('id') === topicId) {
|
||||
|
||||
if (topic.get("id") === topicId) {
|
||||
// TODO identity map for postNumber
|
||||
_.each(postStream.get('posts'), post => {
|
||||
if (_.include(postNumbers, post.post_number) && !post.read) {
|
||||
post.set("read", true);
|
||||
postStream.get('posts').forEach(post => {
|
||||
if (!post.read && postNumbers.indexOf(post.post_number) !== -1) {
|
||||
post.set('read', true);
|
||||
this.appEvents.trigger('post-stream:refresh', post.id);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue