Hide custom emoji in reaction picker when BE does not advertise pleroma_custom_emoji_reactions

This commit is contained in:
Alexander Tumin 2023-03-02 11:13:05 +03:00
commit 832019b2c2
5 changed files with 13 additions and 2 deletions

View file

@ -98,6 +98,11 @@ const EmojiPicker = {
required: false,
type: Boolean,
default: false
},
hideCustomEmoji: {
required: false,
type: Boolean,
default: false
}
},
data () {
@ -280,6 +285,9 @@ const EmojiPicker = {
return 0
},
allCustomGroups () {
if (this.hideCustomEmoji) {
return {}
}
const emojis = this.$store.getters.groupedCustomEmojis
if (emojis.unpacked) {
emojis.unpacked.text = this.$t('emoji.unpacked')