Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<template>
<!-- reactions buttons and popover with details -->
<div class="reactions-wrapper">
<div v-if="reactionsCount && reactionsSorted" class="reactions-wrapper">
<NcPopover v-for="reaction in reactionsSorted"
:key="reaction"
:delay="200"
Expand Down Expand Up @@ -175,11 +175,14 @@ export default {
},

reactionsSorted() {
return this.detailedReactions
? Object.keys(this.detailedReactions)
if (this.detailedReactions) {
return Object.keys(this.detailedReactions)
.sort((a, b) => this.detailedReactions[b].length - this.detailedReactions[a].length)
: Object.keys(this.plainReactions)
} else if (this.plainReactions) {
return Object.keys(this.plainReactions)
.sort((a, b) => this.plainReactions[b] - this.plainReactions[a])
}
return undefined
},

/**
Expand Down Expand Up @@ -243,6 +246,9 @@ export default {
},

reactionsCount(reaction) {
if (!this.detailedReactions || !this.plainReactions) {
return undefined
}
return this.detailedReactions
? this.detailedReactions[reaction]?.length
: this.plainReactions[reaction]
Expand Down
4 changes: 2 additions & 2 deletions src/components/MessagesList/MessagesGroup/MessagesGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->

<template>
<div class="wrapper">
<li class="wrapper">
<div class="messages__avatar">
<AvatarWrapper :id="actorId"
:name="actorDisplayName"
Expand All @@ -47,7 +47,7 @@
:actor-type="actorType"
:actor-id="actorId" />
</ul>
</div>
</li>
</template>

<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->

<template>
<div class="wrapper wrapper--system">
<li class="wrapper wrapper--system">
<div v-for="messagesCollapsed in messagesGroupedBySystemMessage"
:key="messagesCollapsed.id"
class="messages-group__system">
Expand All @@ -45,7 +45,7 @@
:previous-message-id="getPrevMessageId(message)" />
</ul>
</div>
</div>
</li>
</template>

<script>
Expand Down
Loading