FIX: A post via the message bus wasn't updating highest_post_number properly.

This commit is contained in:
Robin Ward
2013-12-03 16:25:26 -05:00
parent 915861a646
commit cb9fb2acfa
3 changed files with 13 additions and 4 deletions
@@ -271,7 +271,8 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
streamPercentage: function() {
if (!this.get('postStream.loaded')) { return 0; }
if (this.get('postStream.highest_post_number') === 0) { return 0; }
return this.get('progressPosition') / this.get('highest_post_number');
var perc = this.get('progressPosition') / this.get('highest_post_number');
return (perc > 1.0) ? 1.0 : perc;
}.property('postStream.loaded', 'progressPosition', 'highest_post_number'),
multiSelectChanged: function() {