Merge pull request 'Fix emojis breaking user bio editing' (#3483) from shibao/pleroma-fe:fix-emojis into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3483
This commit is contained in:
commit
aa8c9fec3b
4 changed files with 20 additions and 15 deletions
1
changelog.d/fix-emojis-breaking-bio.fix
Normal file
1
changelog.d/fix-emojis-breaking-bio.fix
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fix emojis breaking user bio/description editing
|
||||
|
|
@ -277,10 +277,10 @@ const PostStatusForm = {
|
|||
})
|
||||
},
|
||||
emoji() {
|
||||
return useEmojiStore().standardEmojiList || []
|
||||
return useEmojiStore().standardEmojiList
|
||||
},
|
||||
customEmoji() {
|
||||
return useEmojiStore().customEmoji || []
|
||||
return useEmojiStore().customEmoji
|
||||
},
|
||||
statusLength() {
|
||||
return this.newStatus.status.length
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ export default {
|
|||
emojiUserSuggestor() {
|
||||
return suggestor({
|
||||
emoji: [
|
||||
...this.$store.getters.standardEmojiList,
|
||||
...useEmojiStore().standardEmojiList,
|
||||
...useEmojiStore().customEmoji,
|
||||
],
|
||||
store: this.$store,
|
||||
|
|
@ -389,7 +389,7 @@ export default {
|
|||
emojiSuggestor() {
|
||||
return suggestor({
|
||||
emoji: [
|
||||
...this.$store.getters.standardEmojiList,
|
||||
...useEmojiStore().standardEmojiList,
|
||||
...useEmojiStore().customEmoji,
|
||||
],
|
||||
})
|
||||
|
|
|
|||
|
|
@ -115,19 +115,23 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
}, {})
|
||||
},
|
||||
standardEmojiList(state) {
|
||||
return SORTED_EMOJI_GROUP_IDS.map((groupId) =>
|
||||
(this.emoji[groupId] || []).map((k) =>
|
||||
injectAnnotations(k, this.unicodeEmojiAnnotations),
|
||||
),
|
||||
).reduce((a, b) => a.concat(b), [])
|
||||
return (
|
||||
SORTED_EMOJI_GROUP_IDS.map((groupId) =>
|
||||
(this.emoji[groupId] || []).map((k) =>
|
||||
injectAnnotations(k, this.unicodeEmojiAnnotations),
|
||||
),
|
||||
).reduce((a, b) => a.concat(b), []) ?? []
|
||||
)
|
||||
},
|
||||
standardEmojiGroupList(state) {
|
||||
return SORTED_EMOJI_GROUP_IDS.map((groupId) => ({
|
||||
id: groupId,
|
||||
emojis: (this.emoji[groupId] || []).map((k) =>
|
||||
injectAnnotations(k, this.unicodeEmojiAnnotations),
|
||||
),
|
||||
}))
|
||||
return (
|
||||
SORTED_EMOJI_GROUP_IDS.map((groupId) => ({
|
||||
id: groupId,
|
||||
emojis: (this.emoji[groupId] || []).map((k) =>
|
||||
injectAnnotations(k, this.unicodeEmojiAnnotations),
|
||||
),
|
||||
})) ?? []
|
||||
)
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue