mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Closing and opening topic should increment posts count.
This commit is contained in:
parent
f1bce927b3
commit
23c4b51805
@ -157,8 +157,12 @@ const Topic = RestModel.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
saveStatus(property, value, until) {
|
saveStatus(property, value, until) {
|
||||||
if (property === 'closed' && value === true) {
|
if (property === 'closed') {
|
||||||
this.set('details.auto_close_at', null);
|
this.incrementProperty('posts_count');
|
||||||
|
|
||||||
|
if (value === true) {
|
||||||
|
this.set('details.auto_close_at', null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Discourse.ajax(this.get('url') + "/status", {
|
return Discourse.ajax(this.get('url') + "/status", {
|
||||||
type: 'PUT',
|
type: 'PUT',
|
||||||
|
Loading…
Reference in New Issue
Block a user