FEATURE: when moving posts to existing topic auto-select single topic (#12064)

This commit is contained in:
Arpit Jalan 2021-02-12 23:11:20 +05:30 committed by GitHub
parent cc0d2b623f
commit 46e7d303b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 });
}