The second opened cowebsite must be displayed on highlighted

This commit is contained in:
Alexis Faizeau 2022-02-15 11:50:17 +01:00
parent 03b63174d4
commit 0f16d909e7

View File

@ -596,12 +596,20 @@ class CoWebsiteManager {
.load() .load()
.then(() => { .then(() => {
const mainCoWebsite = this.getMainCoWebsite(); const mainCoWebsite = this.getMainCoWebsite();
if (mainCoWebsite && mainCoWebsite.getId() === coWebsite.getId()) { const highlightedEmbed = get(highlightedEmbedScreen);
if (mainCoWebsite) {
if (mainCoWebsite.getId() === coWebsite.getId()) {
this.openMain(); this.openMain();
setTimeout(() => { setTimeout(() => {
this.fire(); this.fire();
}, animationTime); }, animationTime);
} else if (!highlightedEmbed) {
highlightedEmbedScreen.toggleHighlight({
type: "cowebsite",
embed: coWebsite,
});
}
} }
this.resizeAllIframes(); this.resizeAllIframes();
}) })