enhance(client): tweak renote collapsing logic
This commit is contained in:
parent
5dd24e44d1
commit
fb7e5a3fac
@ -155,7 +155,6 @@ import { deepClone } from '@/scripts/clone';
|
|||||||
import { useTooltip } from '@/scripts/use-tooltip';
|
import { useTooltip } from '@/scripts/use-tooltip';
|
||||||
import { claimAchievement } from '@/scripts/achievements';
|
import { claimAchievement } from '@/scripts/achievements';
|
||||||
import { getNoteSummary } from '@/scripts/get-note-summary';
|
import { getNoteSummary } from '@/scripts/get-note-summary';
|
||||||
import { shownNoteIds } from '@/os';
|
|
||||||
import { MenuItem } from '@/types/menu';
|
import { MenuItem } from '@/types/menu';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@ -209,9 +208,7 @@ const translation = ref<any>(null);
|
|||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
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);
|
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)));
|
let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId)) || (appearNote.myReaction != null)));
|
||||||
|
|
||||||
shownNoteIds.add(appearNote.id);
|
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
'r': () => reply(true),
|
'r': () => reply(true),
|
||||||
|
@ -603,9 +603,3 @@ export function checkExistence(fileData: ArrayBuffer): Promise<any> {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
export const shownNoteIds = new Set();
|
|
||||||
|
|
||||||
window.setInterval(() => {
|
|
||||||
shownNoteIds.clear();
|
|
||||||
}, 1000 * 60 * 5);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user