move stickers to emoji store
This commit is contained in:
parent
573a980512
commit
5e21134d9b
4 changed files with 11 additions and 5 deletions
|
|
@ -232,7 +232,7 @@ const getStickers = async ({ store }) => {
|
|||
).sort((a, b) => {
|
||||
return a.meta.title.localeCompare(b.meta.title)
|
||||
})
|
||||
useInstanceStore().set({ name: 'stickers', value: stickers })
|
||||
useEmojiStore().setStickers(stickers)
|
||||
} else {
|
||||
throw res
|
||||
}
|
||||
|
|
|
|||
|
|
@ -351,8 +351,8 @@ const EmojiPicker = {
|
|||
return this.showingStickers ? '' : this.activeGroup
|
||||
},
|
||||
stickersAvailable() {
|
||||
if (useInstanceStore().stickers) {
|
||||
return useInstanceStore().stickers.length > 0
|
||||
if (useEmojiStore().stickers) {
|
||||
return useEmojiStore().stickers.length > 0
|
||||
}
|
||||
return 0
|
||||
},
|
||||
|
|
@ -383,7 +383,7 @@ const EmojiPicker = {
|
|||
.concat(this.unicodeEmojiGroups)
|
||||
},
|
||||
stickerPickerEnabled() {
|
||||
return (useInstanceStore().stickers || []).length !== 0
|
||||
return (useEmojiStore().stickers || []).length !== 0
|
||||
},
|
||||
debouncedHandleKeywordChange() {
|
||||
return debounce(() => {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ const StickerPicker = {
|
|||
},
|
||||
computed: {
|
||||
pack() {
|
||||
return useInstanceStore().stickers || []
|
||||
return useEmojiStore().stickers || []
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ const defaultState = {
|
|||
emoji: {},
|
||||
emojiFetched: false,
|
||||
unicodeEmojiAnnotations: {},
|
||||
|
||||
// Stickers
|
||||
stickers: null
|
||||
}
|
||||
|
||||
const SORTED_EMOJI_GROUP_IDS = [
|
||||
|
|
@ -127,6 +130,9 @@ export const useEmojiStore = defineStore('emoji', {
|
|||
},
|
||||
},
|
||||
actions: {
|
||||
setStickers (stickers) {
|
||||
this.stickers = stickers
|
||||
},
|
||||
async getStaticEmoji() {
|
||||
try {
|
||||
// See build/emojis_plugin for more details
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue