resolve display issue by simplifying reaction.userId handling

This commit is contained in:
Chneemann 2024-09-18 04:36:48 +02:00
parent 11def9cb0d
commit d9076621bf

View file

@ -30,13 +30,13 @@
></app-emoji-picker> ></app-emoji-picker>
} }
<div class="emojiSection"> <div class="emojiSection">
@for (reaction of getReaction(chat.id); track reaction; let i = $index) { @for (reaction of getReaction(chat.id); track reaction) { @if (reaction.id)
@if (reaction.id) { {
<div <div
class="emoji" class="emoji"
[ngStyle]="{ [ngStyle]="{
'background-color': 'background-color':
reaction.userId[i] == userService.getCurrentUserId() ? '#c7cafc' : '' reaction.userId == userService.getCurrentUserId() ? '#c7cafc' : ''
}" }"
(click)="toggleEmoji(reaction.id)" (click)="toggleEmoji(reaction.id)"
(mousemove)="openDialog(reaction.id, $event)" (mousemove)="openDialog(reaction.id, $event)"