mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-02 20:07:52 -05:00
FIX: Don't show topics as unread when hitting back
This commit is contained in:
parent
0ae3c327de
commit
fc71662a13
1 changed files with 4 additions and 1 deletions
|
@ -122,6 +122,9 @@ Discourse.TopicTrackingState = Discourse.Model.extend({
|
||||||
unread = postsCount - state.last_read_post_number;
|
unread = postsCount - state.last_read_post_number;
|
||||||
|
|
||||||
if (newPosts < 0) { newPosts = 0; }
|
if (newPosts < 0) { newPosts = 0; }
|
||||||
|
if (!state.last_read_post_number) {
|
||||||
|
unread = 0;
|
||||||
|
}
|
||||||
if (unread < 0) { unread = 0; }
|
if (unread < 0) { unread = 0; }
|
||||||
|
|
||||||
t.setProperties({
|
t.setProperties({
|
||||||
|
@ -129,7 +132,7 @@ Discourse.TopicTrackingState = Discourse.Model.extend({
|
||||||
last_read_post_number: state.last_read_post_number,
|
last_read_post_number: state.last_read_post_number,
|
||||||
new_posts: newPosts,
|
new_posts: newPosts,
|
||||||
unread: unread,
|
unread: unread,
|
||||||
unseen: false
|
unseen: !state.last_read_post_number
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue