소스 검색

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é 6 년 전
부모
커밋
fd0ca76255
1개의 변경된 파일8개의 추가작업 그리고 12개의 파일을 삭제
  1. 8
    12
      modules/UI/videolayout/SmallVideo.js

+ 8
- 12
modules/UI/videolayout/SmallVideo.js 파일 보기

@@ -557,24 +557,19 @@ SmallVideo.prototype._isHovered = function() {
557 557
  * Hides or shows the user's avatar.
558 558
  * This update assumes that large video had been updated and we will
559 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 561
 SmallVideo.prototype.updateView = function() {
565 562
     if (this.disableUpdateView) {
566 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 575
     this.$container.removeClass((index, classNames) =>
@@ -621,7 +616,8 @@ SmallVideo.prototype.initializeAvatar = function() {
621 616
             <Provider store = { APP.store }>
622 617
                 <AvatarDisplay
623 618
                     className = 'userAvatar'
624
-                    participantId = { this.id } />
619
+                    participantId = { this.id }
620
+                    size = { this.$avatar().width() } />
625 621
             </Provider>,
626 622
             thumbnail
627 623
         );

Loading…
취소
저장