1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-10-31 23:31:48 +09:00
This commit is contained in:
tamaina 2023-01-22 15:13:03 +00:00
parent 2f6c45e118
commit 0b2f945bb6
2 changed files with 5 additions and 3 deletions

View File

@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
}); });
} else { } else {
this.globalEventService.publishBroadcastStream('emojiDeleted', { this.globalEventService.publishBroadcastStream('emojiDeleted', {
emojis: [ emoji ], emojis: [ await this.emojiEntityService.pack(emoji) ],
}); });
this.globalEventService.publishBroadcastStream('emojiAdded', { this.globalEventService.publishBroadcastStream('emojiAdded', {

View File

@ -17,7 +17,9 @@ export const customEmojiCategories = computed<string[]>(() => {
fetchCustomEmojis(); fetchCustomEmojis();
stream.on('emojiAdded', emojiData => { stream.on('emojiAdded', emojiData => {
setTimeout(() => {
customEmojis.value = [ emojiData.emoji, ...customEmojis.value ] customEmojis.value = [ emojiData.emoji, ...customEmojis.value ]
}, 100);
}); });
stream.on('emojiUpdated', emojiData => { stream.on('emojiUpdated', emojiData => {
@ -25,7 +27,7 @@ stream.on('emojiUpdated', emojiData => {
}); });
stream.on('emojiDeleted', 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() { export async function fetchCustomEmojis() {