Improve reaction picker performance

This commit is contained in:
syuilo 2021-03-05 13:49:46 +09:00
parent a4ddd18f12
commit f871cf1053
6 changed files with 49 additions and 35 deletions

View file

@ -121,6 +121,7 @@ import { checkWordMute } from '@/scripts/check-word-mute';
import { userPage } from '@/filters/user';
import * as os from '@/os';
import { noteActions, noteViewInterruptors } from '@/store';
import { reactionPicker } from '@/scripts/reaction-picker';
function markRawAll(...xs) {
for (const x of xs) {
@ -504,7 +505,7 @@ export default defineComponent({
pleaseLogin();
this.operating = true;
this.blur();
os.pickReaction(this.$refs.reactButton, reaction => {
reactionPicker.show(this.$refs.reactButton, reaction => {
os.api('notes/reactions/create', {
noteId: this.appearNote.id,
reaction: reaction