FIX: After closing a topic that's set to auto-close, remove the message that it will auto-close. Server was already doing the right thing.
This commit is contained in:
parent
ad375e231a
commit
eca291c9fc
|
@ -146,6 +146,9 @@ Discourse.Topic = Discourse.Model.extend({
|
||||||
|
|
||||||
toggleStatus: function(property) {
|
toggleStatus: function(property) {
|
||||||
this.toggleProperty(property);
|
this.toggleProperty(property);
|
||||||
|
if (property === 'closed' && this.get('closed')) {
|
||||||
|
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',
|
||||||
data: {status: property, enabled: this.get(property) ? 'true' : 'false' }
|
data: {status: property, enabled: this.get(property) ? 'true' : 'false' }
|
||||||
|
|
Loading…
Reference in New Issue