mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-29 16:03:04 +00:00
wip
This commit is contained in:
parent
2f6c45e118
commit
0b2f945bb6
2 changed files with 5 additions and 3 deletions
|
@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||
});
|
||||
} else {
|
||||
this.globalEventService.publishBroadcastStream('emojiDeleted', {
|
||||
emojis: [ emoji ],
|
||||
emojis: [ await this.emojiEntityService.pack(emoji) ],
|
||||
});
|
||||
|
||||
this.globalEventService.publishBroadcastStream('emojiAdded', {
|
||||
|
|
|
@ -17,7 +17,9 @@ export const customEmojiCategories = computed<string[]>(() => {
|
|||
fetchCustomEmojis();
|
||||
|
||||
stream.on('emojiAdded', emojiData => {
|
||||
customEmojis.value = [ emojiData.emoji, ...customEmojis.value ]
|
||||
setTimeout(() => {
|
||||
customEmojis.value = [ emojiData.emoji, ...customEmojis.value ]
|
||||
}, 100);
|
||||
});
|
||||
|
||||
stream.on('emojiUpdated', emojiData => {
|
||||
|
@ -25,7 +27,7 @@ stream.on('emojiUpdated', emojiData => {
|
|||
});
|
||||
|
||||
stream.on('emojiDeleted', emojiData => {
|
||||
customEmojis.value = customEmojis.value.filter(item => !emojiData.emojis.some(search => search.name === item.name))
|
||||
customEmojis.value = customEmojis.value.filter(item => !emojiData.emojis.some(search => search.name === item.name));
|
||||
});
|
||||
|
||||
export async function fetchCustomEmojis() {
|
||||
|
|
Loading…
Reference in a new issue