From a52ad233d8583deb3acf99a1b71db8cb0217d9a4 Mon Sep 17 00:00:00 2001 From: Alexis Faizeau Date: Tue, 15 Feb 2022 11:54:58 +0100 Subject: [PATCH] Fix cowebsite swap --- front/src/WebRtc/CoWebsiteManager.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/front/src/WebRtc/CoWebsiteManager.ts b/front/src/WebRtc/CoWebsiteManager.ts index 6173be08..5a3585f6 100644 --- a/front/src/WebRtc/CoWebsiteManager.ts +++ b/front/src/WebRtc/CoWebsiteManager.ts @@ -159,9 +159,17 @@ class CoWebsiteManager { }); buttonSwipe.addEventListener("click", () => { + const mainCoWebsite = this.getMainCoWebsite(); const highlightedEmbed = get(highlightedEmbedScreen); if (highlightedEmbed?.type === "cowebsite") { this.goToMain(highlightedEmbed.embed); + + if (mainCoWebsite) { + highlightedEmbedScreen.toggleHighlight({ + type: "cowebsite", + embed: mainCoWebsite, + }); + } } }); }