mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 12:35:25 +08:00
FIX: uses DiscourseURL.routeTo for drawer transitions (#21850)
Calling `transitionTo` directly was bypassing various custom codepaths of core.
This commit is contained in:
parent
473992bd36
commit
80c18b97b4
|
@ -21,6 +21,7 @@ import {
|
|||
import isZoomed from "discourse/plugins/chat/discourse/lib/zoom-check";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import discourseDebounce from "discourse-common/lib/debounce";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
const PAST = "past";
|
||||
|
@ -815,11 +816,14 @@ export default class ChatLivePane extends Component {
|
|||
@action
|
||||
onCloseFullScreen() {
|
||||
this.chatStateManager.prefersDrawer();
|
||||
this.router.transitionTo(this.chatStateManager.lastKnownAppURL).then(() => {
|
||||
|
||||
DiscourseURL.routeTo(this.chatStateManager.lastKnownAppURL, {
|
||||
afterRouteComplete: () => {
|
||||
this.appEvents.trigger(
|
||||
"chat:open-url",
|
||||
this.chatStateManager.lastKnownChatURL
|
||||
);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import { cancel, throttle } from "@ember/runloop";
|
|||
import { inject as service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
import { escapeExpression } from "discourse/lib/utilities";
|
||||
import DiscourseURL from "discourse/lib/url";
|
||||
|
||||
export default Component.extend({
|
||||
tagName: "",
|
||||
|
@ -191,7 +192,7 @@ export default Component.extend({
|
|||
this.chatStateManager.prefersFullPage();
|
||||
this.chat.activeChannel = null;
|
||||
|
||||
return this.router.transitionTo(this.chatStateManager.lastKnownChatURL);
|
||||
return DiscourseURL.routeTo(this.chatStateManager.lastKnownChatURL);
|
||||
},
|
||||
|
||||
@action
|
||||
|
|
Loading…
Reference in New Issue
Block a user