import { Account } from '@app/shared/account/account.model'
import { Notifier } from '@app/core'
import { UserService } from '@app/shared'
+import { Actor } from '@app/shared/actor/actor.model'
@Component({
selector: 'my-video-comment',
@Input() commentTree: VideoCommentThreadTree
@Input() inReplyToCommentId: number
@Input() highlightedComment = false
+ @Input() firstInThread = false
@Output() wantedToDelete = new EventEmitter<VideoComment>()
@Output() wantedToReply = new EventEmitter<VideoComment>()
)
}
+ switchToDefaultAvatar ($event: Event) {
+ ($event.target as HTMLImageElement).src = Actor.GET_DEFAULT_AVATAR_URL()
+ }
+
private getUserIfNeeded (account: Account) {
if (!account.userId) return
if (!this.authService.isLoggedIn()) return
const user = this.authService.getUser()
if (user.hasRight(UserRight.MANAGE_USERS)) {
- this.userService.getUser(account.userId)
+ this.userService.getUserWithCache(account.userId)
.subscribe(
user => this.commentUser = user,