diff --git a/app/assets/javascripts/discourse/app/components/choose-topic.js b/app/assets/javascripts/discourse/app/components/choose-topic.js index 2b6c87aa74f..eb36332c7c0 100644 --- a/app/assets/javascripts/discourse/app/components/choose-topic.js +++ b/app/assets/javascripts/discourse/app/components/choose-topic.js @@ -3,8 +3,10 @@ import { action } from "@ember/object"; import { isEmpty } from "@ember/utils"; import { searchForTerm } from "discourse/lib/search"; import { INPUT_DELAY } from "discourse-common/config/environment"; -import discourseDebounce from "discourse-common/lib/debounce"; -import discourseComputed, { observes } from "discourse-common/utils/decorators"; +import discourseComputed, { + debounce, + observes, +} from "discourse-common/utils/decorators"; export default Component.extend({ loading: null, @@ -69,7 +71,7 @@ export default Component.extend({ oldTopicTitle: this.topicTitle, }); - this.searchDebounced(this.topicTitle); + this.search(this.topicTitle); }, @discourseComputed("label") @@ -86,10 +88,7 @@ export default Component.extend({ this.set("loading", false); }, - searchDebounced(title) { - discourseDebounce(this, this.search, title, INPUT_DELAY); - }, - + @debounce(INPUT_DELAY) search(title) { if (!this.element || this.isDestroying || this.isDestroyed) { return; diff --git a/app/assets/javascripts/discourse/app/components/modal/move-to-topic.hbs b/app/assets/javascripts/discourse/app/components/modal/move-to-topic.hbs index e9cf2409476..e6afc45051a 100644 --- a/app/assets/javascripts/discourse/app/components/modal/move-to-topic.hbs +++ b/app/assets/javascripts/discourse/app/components/modal/move-to-topic.hbs @@ -95,7 +95,6 @@ {{/if}} {{else}} -
{{html-safe +
+ {{html-safe (i18n "topic.merge_topic.instructions" count=@model.selectedPostsCount ) - }}
+ }} +