Explorar el Código

web,avatar: fix setting avatar size

Use the width of its container as the size, so the font icons can be rendered at
a good size.
j8
Saúl Ibarra Corretgé hace 6 años
padre
commit
fd0ca76255
Se han modificado 1 ficheros con 8 adiciones y 12 borrados
  1. 8
    12
      modules/UI/videolayout/SmallVideo.js

+ 8
- 12
modules/UI/videolayout/SmallVideo.js Ver fichero

557
  * Hides or shows the user's avatar.
557
  * Hides or shows the user's avatar.
558
  * This update assumes that large video had been updated and we will
558
  * This update assumes that large video had been updated and we will
559
  * reflect it on this small video.
559
  * reflect it on this small video.
560
- *
561
- * @param show whether we should show the avatar or not
562
- * video because there is no dominant speaker and no focused speaker
563
  */
560
  */
564
 SmallVideo.prototype.updateView = function() {
561
 SmallVideo.prototype.updateView = function() {
565
     if (this.disableUpdateView) {
562
     if (this.disableUpdateView) {
566
         return;
563
         return;
567
     }
564
     }
568
 
565
 
569
-    if (!this.hasAvatar) {
570
-        if (this.id) {
571
-            // Init avatar
572
-            this.initializeAvatar();
573
-        } else {
574
-            logger.error('Unable to init avatar - no id', this);
566
+    if (this.id) {
567
+        // Init / refresh avatar
568
+        this.initializeAvatar();
569
+    } else {
570
+        logger.error('Unable to init avatar - no id', this);
575
 
571
 
576
-            return;
577
-        }
572
+        return;
578
     }
573
     }
579
 
574
 
580
     this.$container.removeClass((index, classNames) =>
575
     this.$container.removeClass((index, classNames) =>
621
             <Provider store = { APP.store }>
616
             <Provider store = { APP.store }>
622
                 <AvatarDisplay
617
                 <AvatarDisplay
623
                     className = 'userAvatar'
618
                     className = 'userAvatar'
624
-                    participantId = { this.id } />
619
+                    participantId = { this.id }
620
+                    size = { this.$avatar().width() } />
625
             </Provider>,
621
             </Provider>,
626
             thumbnail
622
             thumbnail
627
         );
623
         );

Loading…
Cancelar
Guardar