File tree 1 file changed +9
-1
lines changed
src/components/MessagesList/MessagesGroup/Message/MessagePart
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 23
23
<template>
24
24
<!-- reactions buttons and popover with details -->
25
25
<div class="reactions-wrapper">
26
- <NcPopover v-for="reaction in Object.keys(detailedReactions ?? plainReactions) "
26
+ <NcPopover v-for="reaction in reactionsSorted "
27
27
:key="reaction"
28
28
:delay="200"
29
29
:focus-trap="false"
@@ -136,6 +136,14 @@ export default {
136
136
return this.$store.getters.message(this.token, this.id).reactionsSelf
137
137
},
138
138
139
+ reactionsSorted() {
140
+ return this.detailedReactions
141
+ ? Object.keys(this.detailedReactions)
142
+ .sort((a, b) => this.detailedReactions[b].length - this.detailedReactions[a].length)
143
+ : Object.keys(this.plainReactions)
144
+ .sort((a, b) => this.plainReactions[b] - this.plainReactions[a])
145
+ },
146
+
139
147
/**
140
148
* Compare the plain reactions with the simplified detailed reactions.
141
149
*/
You can’t perform that action at this time.
0 commit comments