mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06: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
|
@withChatChannel
|
||||||
export default class ChatChannelRoute extends DiscourseRoute {
|
export default class ChatChannelRoute extends DiscourseRoute {
|
||||||
@service site;
|
@service site;
|
||||||
|
@service router;
|
||||||
|
|
||||||
redirect(model) {
|
redirect(model) {
|
||||||
if (this.site.mobileView) {
|
if (this.site.mobileView) {
|
||||||
@ -15,7 +16,7 @@ export default class ChatChannelRoute extends DiscourseRoute {
|
|||||||
const threadId = this.paramsFor("chat.channel.thread").threadId;
|
const threadId = this.paramsFor("chat.channel.thread").threadId;
|
||||||
|
|
||||||
if (!messageId && !threadId && model.threadsManager.unreadThreadCount > 0) {
|
if (!messageId && !threadId && model.threadsManager.unreadThreadCount > 0) {
|
||||||
this.transitionTo("chat.channel.threads", ...model.routeModels);
|
this.router.transitionTo("chat.channel.threads", ...model.routeModels);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user