diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2021-03-05 13:49:46 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2021-03-05 13:49:46 +0900 |
| commit | f871cf10538cc35d67114d780ec13afa4d30903c (patch) | |
| tree | 54ea2d2fd2706376513bfafc6c03fb6936587ed2 /src/client/os.ts | |
| parent | Merge pull request #7295 from syuilo/dependabot/npm_and_yarn/typescript-eslin... (diff) | |
| download | misskey-f871cf10538cc35d67114d780ec13afa4d30903c.tar.gz misskey-f871cf10538cc35d67114d780ec13afa4d30903c.tar.bz2 misskey-f871cf10538cc35d67114d780ec13afa4d30903c.zip | |
Improve reaction picker performance
Diffstat (limited to 'src/client/os.ts')
| -rw-r--r-- | src/client/os.ts | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/client/os.ts b/src/client/os.ts index 2b72391bf5..9be45e6c6d 100644 --- a/src/client/os.ts +++ b/src/client/os.ts @@ -357,38 +357,6 @@ export async function openEmojiPicker(src?: HTMLElement, opts, initialTextarea: }); } -let reactionPicker = null; -export async function pickReaction(src: HTMLElement, chosen, closed) { - if (reactionPicker) { - reactionPicker.src.value = src; - reactionPicker.manualShowing.value = true; - reactionPicker.chosen = chosen; - reactionPicker.closed = closed; - } else { - reactionPicker = { - src: ref(src), - manualShowing: ref(true), - chosen, closed - }; - popup(import('@/components/emoji-picker-dialog.vue'), { - src: reactionPicker.src, - asReactionPicker: true, - manualShowing: reactionPicker.manualShowing - }, { - done: reaction => { - reactionPicker.chosen(reaction); - }, - close: () => { - reactionPicker.manualShowing.value = false; - }, - closed: () => { - reactionPicker.src.value = null; - reactionPicker.closed(); - } - }); - } -} - export function modalMenu(items: any[], src?: HTMLElement, options?: { align?: string; viaKeyboard?: boolean }) { return new Promise((resolve, reject) => { let dispose; |