FEATURE: live delete / recover
BUGFIX: total post count could be smaller than filtered posts count BUGFIX: filteredPostsCount not correctly defined
This commit is contained in:
@@ -265,6 +265,12 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
||||
return (this.get('progressPosition') < 2);
|
||||
}.property('progressPosition'),
|
||||
|
||||
filteredPostCountChanged: function(){
|
||||
if(this.get('postStream.filteredPostsCount') < this.get('progressPosition')){
|
||||
this.set('progressPosition', this.get('postStream.filteredPostsCount'));
|
||||
}
|
||||
}.observes('postStream.filteredPostsCount'),
|
||||
|
||||
jumpBottomDisabled: function() {
|
||||
return this.get('progressPosition') >= this.get('postStream.filteredPostsCount') ||
|
||||
this.get('progressPosition') >= this.get('highest_post_number');
|
||||
@@ -410,6 +416,16 @@ Discourse.TopicController = Discourse.ObjectController.extend(Discourse.Selected
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.type === "deleted"){
|
||||
postStream.triggerDeletedPost(data.id, data.post_number);
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.type === "recovered"){
|
||||
postStream.triggerRecoveredPost(data.id, data.post_number);
|
||||
return;
|
||||
}
|
||||
|
||||
// Add the new post into the stream
|
||||
postStream.triggerNewPostInStream(data.id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user