mirror of
https://github.com/discourse/discourse.git
synced 2025-02-27 16:06:10 +00:00
FIX: not counting new/unread on categories
This commit is contained in:
parent
afdb15f99f
commit
66ec6b6e17
@ -276,15 +276,17 @@ const TopicTrackingState = Discourse.Model.extend({
|
|||||||
this.lookupCount("unread", category);
|
this.lookupCount("unread", category);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let categoryId = category ? Em.get(category, "id") : null;
|
||||||
let categoryName = category ? Em.get(category, "name") : null;
|
let categoryName = category ? Em.get(category, "name") : null;
|
||||||
|
|
||||||
if (name === "new") {
|
if (name === "new") {
|
||||||
return this.countNew(categoryName);
|
return this.countNew(categoryId);
|
||||||
} else if (name === "unread") {
|
} else if (name === "unread") {
|
||||||
return this.countUnread(categoryName);
|
return this.countUnread(categoryId);
|
||||||
} else {
|
} else {
|
||||||
categoryName = name.split("/")[1];
|
categoryName = name.split("/")[1];
|
||||||
if (categoryName) {
|
if (categoryName) {
|
||||||
return this.countCategory(categoryName);
|
return this.countCategory(categoryId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user