From 37bf38f801408035c53faeb8667c445d6f5e48e6 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Thu, 2 Apr 2020 05:59:35 +0530 Subject: [PATCH] FIX: removing a timer with `duration` doesn't work. --- .../discourse/controllers/edit-topic-timer.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/edit-topic-timer.js b/app/assets/javascripts/discourse/controllers/edit-topic-timer.js index 461fa3c64d1..926c2492b91 100644 --- a/app/assets/javascripts/discourse/controllers/edit-topic-timer.js +++ b/app/assets/javascripts/discourse/controllers/edit-topic-timer.js @@ -76,15 +76,15 @@ export default Controller.extend(ModalFunctionality, { return "true" === isPublic ? publicTopicTimer : privateTopicTimer; }, - _setTimer(time, duration, statusType) { + _setTimer(time, duration, statusType, basedOnLastPost, categoryId) { this.set("loading", true); TopicTimer.updateStatus( this.get("model.id"), time, - this.get("topicTimer.based_on_last_post"), + basedOnLastPost, statusType, - this.get("topicTimer.category_id"), + categoryId, duration ) .then(result => { @@ -155,7 +155,9 @@ export default Controller.extend(ModalFunctionality, { this._setTimer( this.get("topicTimer.updateTime"), this.get("topicTimer.duration"), - this.get("topicTimer.status_type") + this.get("topicTimer.status_type"), + this.get("topicTimer.based_on_last_post"), + this.get("topicTimer.category_id") ); },