DEV: Remove deprecated `openTopicDraft` (#30850)
This commit is contained in:
parent
56f9a174fc
commit
33296d5913
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue