FIX: applies getURL on both app and chat URLs (#21847)
This commit is contained in:
parent
83af25179d
commit
7c4d229f37
|
@ -1,4 +1,3 @@
|
|||
import getURL from "discourse-common/lib/get-url";
|
||||
import Component from "@ember/component";
|
||||
import { bind, observes } from "discourse-common/utils/decorators";
|
||||
import { action } from "@ember/object";
|
||||
|
@ -192,9 +191,7 @@ export default Component.extend({
|
|||
this.chatStateManager.prefersFullPage();
|
||||
this.chat.activeChannel = null;
|
||||
|
||||
return this.router.transitionTo(
|
||||
getURL(this.chatStateManager.lastKnownChatURL)
|
||||
);
|
||||
return this.router.transitionTo(this.chatStateManager.lastKnownChatURL);
|
||||
},
|
||||
|
||||
@action
|
||||
|
|
|
@ -3,6 +3,7 @@ import { defaultHomepage } from "discourse/lib/utilities";
|
|||
import { tracked } from "@glimmer/tracking";
|
||||
import KeyValueStore from "discourse/lib/key-value-store";
|
||||
import Site from "discourse/models/site";
|
||||
import getURL from "discourse-common/lib/get-url";
|
||||
|
||||
const PREFERRED_MODE_KEY = "preferred_mode";
|
||||
const PREFERRED_MODE_STORE_NAMESPACE = "discourse_chat_";
|
||||
|
@ -133,11 +134,11 @@ export default class ChatStateManager extends Service {
|
|||
url = this.router.urlFor(`discovery.${defaultHomepage()}`);
|
||||
}
|
||||
|
||||
return url;
|
||||
return getURL(url);
|
||||
}
|
||||
|
||||
get lastKnownChatURL() {
|
||||
return this._chatURL || "/chat";
|
||||
return getURL(this._chatURL || "/chat");
|
||||
}
|
||||
|
||||
#publishStateChange() {
|
||||
|
|
Loading…
Reference in New Issue