mirror of
https://github.com/discourse/discourse.git
synced 2025-03-21 05:45:43 +08:00
DEV: Resolve transitionTo deprecation in chat-channel route (#24668)
This commit is contained in:
parent
9f9c82ea97
commit
d636ff216a
@ -5,6 +5,7 @@ import withChatChannel from "./chat-channel-decorator";
|
||||
@withChatChannel
|
||||
export default class ChatChannelRoute extends DiscourseRoute {
|
||||
@service site;
|
||||
@service router;
|
||||
|
||||
redirect(model) {
|
||||
if (this.site.mobileView) {
|
||||
@ -15,7 +16,7 @@ export default class ChatChannelRoute extends DiscourseRoute {
|
||||
const threadId = this.paramsFor("chat.channel.thread").threadId;
|
||||
|
||||
if (!messageId && !threadId && model.threadsManager.unreadThreadCount > 0) {
|
||||
this.transitionTo("chat.channel.threads", ...model.routeModels);
|
||||
this.router.transitionTo("chat.channel.threads", ...model.routeModels);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user