mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
Merge pull request #3674 from tgxworld/increment_posts_count_when_closing_topic
FIX: Closing and opening topic should increment posts count.
This commit is contained in:
commit
fadd6582af
@ -157,8 +157,12 @@ const Topic = RestModel.extend({
|
||||
},
|
||||
|
||||
saveStatus(property, value, until) {
|
||||
if (property === 'closed' && value === true) {
|
||||
this.set('details.auto_close_at', null);
|
||||
if (property === 'closed') {
|
||||
this.incrementProperty('posts_count');
|
||||
|
||||
if (value === true) {
|
||||
this.set('details.auto_close_at', null);
|
||||
}
|
||||
}
|
||||
return Discourse.ajax(this.get('url') + "/status", {
|
||||
type: 'PUT',
|
||||
|
Loading…
Reference in New Issue
Block a user