FIX: Category counts were incorrect when the names were duplicates.

This commit is contained in:
Robin Ward 2014-07-17 14:54:04 -04:00
parent 5ccb656b62
commit 98907c0e81
1 changed files with 2 additions and 10 deletions

View File

@ -1,11 +1,3 @@
/**
A data model that represents a category
@class Category
@extends Discourse.Model
@namespace Discourse
@module Discourse
**/
Discourse.Category = Discourse.Model.extend({
init: function() {
@ -135,11 +127,11 @@ Discourse.Category = Discourse.Model.extend({
}.property(),
unreadTopics: function(){
return this.get('topicTrackingState').countUnread(this.get('name'));
return this.get('topicTrackingState').countUnread(this.get('id'));
}.property('topicTrackingState.messageCount'),
newTopics: function(){
return this.get('topicTrackingState').countNew(this.get('name'));
return this.get('topicTrackingState').countNew(this.get('id'));
}.property('topicTrackingState.messageCount'),
topicStatsTitle: function() {