DEV: Remove deprecated `openTopicDraft` (#30850)

This commit is contained in:
Jarek Radosz 2025-01-18 13:13:35 +01:00 committed by GitHub
parent 56f9a174fc
commit 33296d5913
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 14 deletions

View File

@ -2,8 +2,6 @@ import { action } from "@ember/object";
import Route from "@ember/routing/route";
import { once } from "@ember/runloop";
import { service } from "@ember/service";
import deprecated from "discourse/lib/deprecated";
import { getOwnerWithFallback } from "discourse/lib/get-owner";
import { seenUser } from "discourse/lib/user-presence";
export default class DiscourseRoute extends Route {
@ -45,18 +43,6 @@ export default class DiscourseRoute extends Route {
}
}
openTopicDraft() {
deprecated(
"DiscourseRoute#openTopicDraft is deprecated. Inject the composer service and call openNewTopic instead",
{ id: "discourse.open-topic-draft" }
);
if (this.currentUser?.has_topic_draft) {
return getOwnerWithFallback(this)
.lookup("service:composer")
.openNewTopic({ preferDraft: true });
}
}
isCurrentUser(user) {
if (!this.currentUser) {
return false; // the current user is anonymous