From 98907c0e81c92bf532fdaa969d9b3dc3c75eab66 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 17 Jul 2014 14:54:04 -0400 Subject: [PATCH] FIX: Category counts were incorrect when the names were duplicates. --- app/assets/javascripts/discourse/models/category.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/discourse/models/category.js b/app/assets/javascripts/discourse/models/category.js index b78421bd501..8fa361c64d3 100644 --- a/app/assets/javascripts/discourse/models/category.js +++ b/app/assets/javascripts/discourse/models/category.js @@ -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() {