bring in unread items to "latest" as well as new items.
This commit is contained in:
parent
4d7a520a8c
commit
6d85dc1724
|
@ -58,6 +58,11 @@ Discourse.TopicList = Discourse.Model.extend({
|
|||
var _this = this;
|
||||
var topics = this.get('topics');
|
||||
|
||||
// refresh dupes
|
||||
topics.removeObjects(topics.filter(function(topic){
|
||||
return topic_ids.indexOf(topic.get('id')) >= 0;
|
||||
}));
|
||||
|
||||
Discourse.TopicList.loadTopics(topic_ids, this.get('filter'))
|
||||
.then(function(newTopics){
|
||||
_this.forEachNew(newTopics, function(t) {
|
||||
|
|
|
@ -46,7 +46,7 @@ Discourse.TopicTrackingState = Discourse.Model.extend({
|
|||
if ((this.filter === "all" ||this.filter === "latest" || this.filter === "new") && data.message_type === "new_topic" ) {
|
||||
this.newIncoming.push(data.topic_id);
|
||||
}
|
||||
if ((this.filter === "all" || this.filter === "unread") && data.message_type === "unread") {
|
||||
if ((this.filter === "all" ||this.filter === "latest" || this.filter === "unread") && data.message_type === "unread") {
|
||||
var old = this.states["t" + data.topic_id];
|
||||
if(!old) {
|
||||
this.newIncoming.push(data.topic_id);
|
||||
|
|
Loading…
Reference in New Issue