mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-23 15:29:07 +00:00
[Glitch] Emoji Indexing and Search
Port a1e8813522 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
13
app/javascript/flavours/glitch/features/emoji/worker.ts
Normal file
13
app/javascript/flavours/glitch/features/emoji/worker.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { importEmojiData, importCustomEmojiData } from './loader';
|
||||
|
||||
addEventListener('message', handleMessage);
|
||||
self.postMessage('ready'); // After the worker is ready, notify the main thread
|
||||
|
||||
function handleMessage(event: MessageEvent<string>) {
|
||||
const { data: locale } = event;
|
||||
if (locale !== 'custom') {
|
||||
void importEmojiData(locale);
|
||||
} else {
|
||||
void importCustomEmojiData();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user