mirror of
https://github.com/discourse/discourse.git
synced 2025-06-07 14:06:44 +08:00
FIX: removing a timer with duration
doesn't work.
This commit is contained in:
@ -76,15 +76,15 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
return "true" === isPublic ? publicTopicTimer : privateTopicTimer;
|
return "true" === isPublic ? publicTopicTimer : privateTopicTimer;
|
||||||
},
|
},
|
||||||
|
|
||||||
_setTimer(time, duration, statusType) {
|
_setTimer(time, duration, statusType, basedOnLastPost, categoryId) {
|
||||||
this.set("loading", true);
|
this.set("loading", true);
|
||||||
|
|
||||||
TopicTimer.updateStatus(
|
TopicTimer.updateStatus(
|
||||||
this.get("model.id"),
|
this.get("model.id"),
|
||||||
time,
|
time,
|
||||||
this.get("topicTimer.based_on_last_post"),
|
basedOnLastPost,
|
||||||
statusType,
|
statusType,
|
||||||
this.get("topicTimer.category_id"),
|
categoryId,
|
||||||
duration
|
duration
|
||||||
)
|
)
|
||||||
.then(result => {
|
.then(result => {
|
||||||
@ -155,7 +155,9 @@ export default Controller.extend(ModalFunctionality, {
|
|||||||
this._setTimer(
|
this._setTimer(
|
||||||
this.get("topicTimer.updateTime"),
|
this.get("topicTimer.updateTime"),
|
||||||
this.get("topicTimer.duration"),
|
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")
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user