FIX: Read post icon was not fading
This commit is contained in:
parent
c76e6e173e
commit
befae52c09
|
@ -715,14 +715,16 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
||||||
},
|
},
|
||||||
|
|
||||||
readPosts(topicId, postNumbers) {
|
readPosts(topicId, postNumbers) {
|
||||||
const topic = this.get("model"),
|
const topic = this.get("model");
|
||||||
postStream = topic.get("postStream");
|
const postStream = topic.get("postStream");
|
||||||
|
|
||||||
|
if (topic.get('id') === topicId) {
|
||||||
|
|
||||||
if (topic.get("id") === topicId) {
|
|
||||||
// TODO identity map for postNumber
|
// TODO identity map for postNumber
|
||||||
_.each(postStream.get('posts'), post => {
|
postStream.get('posts').forEach(post => {
|
||||||
if (_.include(postNumbers, post.post_number) && !post.read) {
|
if (!post.read && postNumbers.indexOf(post.post_number) !== -1) {
|
||||||
post.set("read", true);
|
post.set('read', true);
|
||||||
|
this.appEvents.trigger('post-stream:refresh', post.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue