From 6eceac472375e33dfc3b411012fa2e42410f145e Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 8 Mar 2026 16:41:01 +0000 Subject: [PATCH 1/2] fix emojis breaking user bio editing --- .../post_status_form/post_status_form.js | 4 +-- src/components/user_card/user_card.js | 4 +-- src/stores/emoji.js | 26 +++++++++++-------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 853e62ee8..507d12f6c 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -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 diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index a77406ca5..8e3b4b9b7 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -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, ], }) diff --git a/src/stores/emoji.js b/src/stores/emoji.js index 5c284064b..0673862e9 100644 --- a/src/stores/emoji.js +++ b/src/stores/emoji.js @@ -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: { From a1f4dd21423ab2c2974644288b5f8a2f1581f267 Mon Sep 17 00:00:00 2001 From: shibao Date: Sun, 8 Mar 2026 16:42:47 +0000 Subject: [PATCH 2/2] add changelog note for emojis breaking user bio editing --- changelog.d/fix-emojis-breaking-bio.fix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/fix-emojis-breaking-bio.fix diff --git a/changelog.d/fix-emojis-breaking-bio.fix b/changelog.d/fix-emojis-breaking-bio.fix new file mode 100644 index 000000000..62a607d8a --- /dev/null +++ b/changelog.d/fix-emojis-breaking-bio.fix @@ -0,0 +1 @@ +Fix emojis breaking user bio/description editing