aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-06 16:13:18 +0100
committerChocobozzz <me@florianbigard.com>2020-01-06 16:13:26 +0100
commit218b0874ede2f0d35fdbcfb64dbe19083b0a2b04 (patch)
tree1ef2e68f11d707c4253d49df43142bee7d499aed /client/src/app/videos
parentbc6f886347f676220847461600122cde86edc272 (diff)
downloadPeerTube-218b0874ede2f0d35fdbcfb64dbe19083b0a2b04.tar.gz
PeerTube-218b0874ede2f0d35fdbcfb64dbe19083b0a2b04.tar.zst
PeerTube-218b0874ede2f0d35fdbcfb64dbe19083b0a2b04.zip
Add get user cache for comments
Diffstat (limited to 'client/src/app/videos')
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.component.html7
-rw-r--r--client/src/app/videos/+video-watch/comment/video-comment.component.ts2
2 files changed, 5 insertions, 4 deletions
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.html b/client/src/app/videos/+video-watch/comment/video-comment.component.html
index 4753641bd..246a08435 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.component.html
+++ b/client/src/app/videos/+video-watch/comment/video-comment.component.html
@@ -36,8 +36,9 @@
36 <div class="comment-actions"> 36 <div class="comment-actions">
37 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div> 37 <div *ngIf="isUserLoggedIn()" (click)="onWantToReply()" class="comment-action-reply" i18n>Reply</div>
38 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div> 38 <div *ngIf="isRemovableByUser()" (click)="onWantToDelete()" class="comment-action-delete" i18n>Delete</div>
39
39 <my-user-moderation-dropdown 40 <my-user-moderation-dropdown
40 buttonSize="small" [account]="commentAccount" [user]="commentUser" label="Options" placement="bottom-left auto" 41 buttonSize="small" [account]="commentAccount" [user]="commentUser" i18n-label label="Options" placement="bottom-left auto"
41 ></my-user-moderation-dropdown> 42 ></my-user-moderation-dropdown>
42 </div> 43 </div>
43 </ng-container> 44 </ng-container>
@@ -80,8 +81,8 @@
80 ></my-video-comment> 81 ></my-video-comment>
81 </div> 82 </div>
82 </div> 83 </div>
83 </div>
84 84
85 <ng-content></ng-content> 85 <ng-content></ng-content>
86 </div>
86 </div> 87 </div>
87</div> 88</div>
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.ts b/client/src/app/videos/+video-watch/comment/video-comment.component.ts
index 8c376d654..0c18b6e5d 100644
--- a/client/src/app/videos/+video-watch/comment/video-comment.component.ts
+++ b/client/src/app/videos/+video-watch/comment/video-comment.component.ts
@@ -107,7 +107,7 @@ export class VideoCommentComponent implements OnInit, OnChanges {
107 107
108 const user = this.authService.getUser() 108 const user = this.authService.getUser()
109 if (user.hasRight(UserRight.MANAGE_USERS)) { 109 if (user.hasRight(UserRight.MANAGE_USERS)) {
110 this.userService.getUser(account.userId) 110 this.userService.getUserWithCache(account.userId)
111 .subscribe( 111 .subscribe(
112 user => this.commentUser = user, 112 user => this.commentUser = user,
113 113