Browse Source

fix(UI): Do not re-compute the container width when chat window is closed.

Since the external API now sets preferredWidth/preferredHeight for resizing the large video, we don't need to add chat width to the computed window width when the chat window is closed.
Fixes https://github.com/jitsi/jitsi-meet/issues/7889
master
Jaya Allamsetty 5 years ago
parent
commit
223187c640
1 changed files with 5 additions and 10 deletions
  1. 5
    10
      modules/UI/videolayout/LargeVideoManager.js

+ 5
- 10
modules/UI/videolayout/LargeVideoManager.js View File

356
         let widthToUse = this.preferredWidth || window.innerWidth;
356
         let widthToUse = this.preferredWidth || window.innerWidth;
357
         const { isOpen } = APP.store.getState()['features/chat'];
357
         const { isOpen } = APP.store.getState()['features/chat'];
358
 
358
 
359
-        /**
360
-         * If chat state is open, we re-compute the container width by subtracting the default width of
361
-         * the chat. We re-compute the width again after the chat window is closed. This is needed when
362
-         * custom styling is configured on the large video container through the iFrame API.
363
-         */
364
-        if (isOpen && !this.resizedForChat) {
359
+        if (isOpen) {
360
+            /**
361
+             * If chat state is open, we re-compute the container width
362
+             * by subtracting the default width of the chat.
363
+             */
365
             widthToUse -= CHAT_SIZE;
364
             widthToUse -= CHAT_SIZE;
366
-            this.resizedForChat = true;
367
-        } else if (this.resizedForChat) {
368
-            this.resizedForChat = false;
369
-            widthToUse += CHAT_SIZE;
370
         }
365
         }
371
 
366
 
372
         this.width = widthToUse;
367
         this.width = widthToUse;

Loading…
Cancel
Save