diff --git a/app/assets/javascripts/discourse/app/components/topic-timer-info.js b/app/assets/javascripts/discourse/app/components/topic-timer-info.js index 8d54e60675c..949a9457c3d 100644 --- a/app/assets/javascripts/discourse/app/components/topic-timer-info.js +++ b/app/assets/javascripts/discourse/app/components/topic-timer-info.js @@ -69,7 +69,16 @@ export default Component.extend({ const topicStatus = this.topicClosed ? "close" : "open"; const topicStatusKnown = this.topicClosed !== undefined; + const topicStatusUpdate = this.statusUpdate !== undefined; if (topicStatusKnown && topicStatus === this.statusType) { + if (!topicStatusUpdate) { + return; + } + + // The topic status has just been toggled, so we can hide the timer info. + this.set("showTopicTimer", null); + // The timer has already been removed on the back end. The front end is not aware of the change yet. + this.set("executeAt", null); return; } diff --git a/app/assets/javascripts/discourse/app/templates/topic.hbs b/app/assets/javascripts/discourse/app/templates/topic.hbs index 7a025c49098..b5cc8aec10a 100644 --- a/app/assets/javascripts/discourse/app/templates/topic.hbs +++ b/app/assets/javascripts/discourse/app/templates/topic.hbs @@ -462,6 +462,7 @@