wip
This commit is contained in:
parent
2f6c45e118
commit
0b2f945bb6
|
@ -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', {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue