FIX: makes sidebar links respect drawer mode (#18918)

Clicking a link of the sidebar will now open the drawer and load the correct channel.

This solution should correctly solve these cases:

closing drawer, clicking sidebar channel, should open the drawer on correct channel
visiting /chat then visiting / and clicking sidebar channel, should open full page chat on correct channel
This commit is contained in:
Joffrey JAFFEUX
2022-11-08 16:23:13 +01:00
committed by GitHub
parent d2ea39c932
commit 21570410ab
8 changed files with 80 additions and 17 deletions
@@ -1,9 +1,11 @@
import { module, test } from "qunit";
import { getOwner } from "discourse-common/lib/get-owner";
import { setupTest } from "ember-qunit";
module("Discourse Chat | Unit | Service | full-page-chat", function (hooks) {
setupTest(hooks);
hooks.beforeEach(function () {
this.fullPageChat = getOwner(this).lookup("service:full-page-chat");
this.fullPageChat = this.owner.lookup("service:full-page-chat");
});
hooks.afterEach(function () {