mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-02 00:26:27 +02:00
fix(frontend); カスタム絵文字のリアクションが二重で表示されることがある問題を修正 (#16092)
* fix(frontend): カスタム絵文字のリアクションが二重で表示されることがある問題を修正 * fix: improve event locking mechanism * fix: remove unused console log * fix: unused import * fix: その場で書き換えることで再レンダリングを最小限に抑える(かも) * refactor: reactive note data を composable内で生成するように
This commit is contained in:
@@ -193,7 +193,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, inject, onMounted, ref, useTemplateRef, watch, provide, shallowRef, reactive } from 'vue';
|
||||
import { computed, inject, onMounted, ref, useTemplateRef, provide } from 'vue';
|
||||
import * as mfm from 'mfm-js';
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { isLink } from '@@/js/is-link.js';
|
||||
@@ -283,12 +283,10 @@ if (noteViewInterruptors.length > 0) {
|
||||
|
||||
const isRenote = Misskey.note.isPureRenote(note);
|
||||
const appearNote = getAppearNote(note);
|
||||
const $appearNote = reactive({
|
||||
reactions: appearNote.reactions,
|
||||
reactionCount: appearNote.reactionCount,
|
||||
reactionEmojis: appearNote.reactionEmojis,
|
||||
myReaction: appearNote.myReaction,
|
||||
pollChoices: appearNote.poll?.choices,
|
||||
const { $note: $appearNote, subscribe: subscribeManuallyToNoteCapture } = useNoteCapture({
|
||||
note: appearNote,
|
||||
parentNote: note,
|
||||
mock: props.mock,
|
||||
});
|
||||
|
||||
const rootEl = useTemplateRef('rootEl');
|
||||
@@ -410,17 +408,6 @@ provide(DI.mfmEmojiReactCallback, (reaction) => {
|
||||
});
|
||||
});
|
||||
|
||||
let subscribeManuallyToNoteCapture: () => void = () => { };
|
||||
|
||||
if (!props.mock) {
|
||||
const { subscribe } = useNoteCapture({
|
||||
note: appearNote,
|
||||
parentNote: note,
|
||||
$note: $appearNote,
|
||||
});
|
||||
subscribeManuallyToNoteCapture = subscribe;
|
||||
}
|
||||
|
||||
if (!props.mock) {
|
||||
useTooltip(renoteButton, async (showing) => {
|
||||
const renotes = await misskeyApi('notes/renotes', {
|
||||
|
||||
Reference in New Issue
Block a user