mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 02:03:09 +02: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 {
|
} 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 => {
|
||||||
customEmojis.value = [ emojiData.emoji, ...customEmojis.value ]
|
setTimeout(() => {
|
||||||
|
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 a new issue