From 46e7d303b1494c0ec017594843a80102f1c56836 Mon Sep 17 00:00:00 2001 From: Arpit Jalan Date: Fri, 12 Feb 2021 23:11:20 +0530 Subject: [PATCH] FEATURE: when moving posts to existing topic auto-select single topic (#12064) --- .../javascripts/discourse/app/components/choose-topic.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/choose-topic.js b/app/assets/javascripts/discourse/app/components/choose-topic.js index ab0bc966bfc..5957bdb7d5b 100644 --- a/app/assets/javascripts/discourse/app/components/choose-topic.js +++ b/app/assets/javascripts/discourse/app/components/choose-topic.js @@ -95,6 +95,9 @@ export default Component.extend({ .mapBy("topic") .filter((t) => t.id !== currentTopicId) ); + if (this.topics.length === 1) { + this.send("chooseTopic", this.topics[0]); + } } else { this.setProperties({ topics: null, loading: false }); }