From fb7e5a3face76d67fc375751869d0faab75c2278 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 23 Feb 2023 08:08:17 +0900 Subject: [PATCH] enhance(client): tweak renote collapsing logic --- packages/frontend/src/components/MkNote.vue | 5 +---- packages/frontend/src/os.ts | 6 ------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 4986f1b646..6ed3ee51f5 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -155,7 +155,6 @@ import { deepClone } from '@/scripts/clone'; import { useTooltip } from '@/scripts/use-tooltip'; import { claimAchievement } from '@/scripts/achievements'; import { getNoteSummary } from '@/scripts/get-note-summary'; -import { shownNoteIds } from '@/os'; import { MenuItem } from '@/types/menu'; const props = defineProps<{ @@ -209,9 +208,7 @@ const translation = ref(null); const translating = ref(false); const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance); const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id); -let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId)) || shownNoteIds.has(appearNote.id))); - -shownNoteIds.add(appearNote.id); +let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId)) || (appearNote.myReaction != null))); const keymap = { 'r': () => reply(true), diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index a69fe73f30..7e38fe5f6d 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -603,9 +603,3 @@ export function checkExistence(fileData: ArrayBuffer): Promise { }); }); }*/ - -export const shownNoteIds = new Set(); - -window.setInterval(() => { - shownNoteIds.clear(); -}, 1000 * 60 * 5);