Skip to content

Commit

Permalink
arrayをsetに変更
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkokari-gtyih committed Dec 14, 2024
1 parent 8204d68 commit c293cdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/frontend/src/components/MkNoteMediaGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<template v-for="file in note.files">
<div
v-if="(defaultStore.state.nsfw === 'force' || file.isSensitive) && defaultStore.state.nsfw !== 'ignore' && !showingFiles.includes(file.id)"
v-if="(defaultStore.state.nsfw === 'force' || file.isSensitive) && defaultStore.state.nsfw !== 'ignore' && !showingFiles.has(file.id)"
:class="[$style.img, { [$style.square]: square }]"
@click="showingFiles.push(file.id)"
@click="showingFiles.add(file.id)"
>
<!-- TODO: 画像以外のファイルに対応 -->
<ImgWithBlurhash
Expand Down Expand Up @@ -59,7 +59,7 @@ defineProps<{
bgIsPanel?: boolean;
}>();

const showingFiles = ref<string[]>([]);
const showingFiles = ref<Set<string>>(new Set());

function thumbnail(image: Misskey.entities.DriveFile): string {
return defaultStore.state.disableShowingAnimatedImages
Expand Down

0 comments on commit c293cdb

Please sign in to comment.