add: expand all long notes option

This commit is contained in:
Mar0xy 2023-12-03 20:08:21 +01:00
parent 304a91a474
commit e5667913f7
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
4 changed files with 7 additions and 3 deletions

View File

@ -277,7 +277,7 @@ const urls = $computed(() => parsed ? extractUrlFromMfm(parsed).filter(u => u !=
const animated = $computed(() => parsed ? checkAnimationFromMfm(parsed) : null);
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
const isLong = shouldCollapsed(appearNote, urls ?? []);
const collapsed = ref(appearNote.cw == null && isLong);
const collapsed = defaultStore.state.expandLongNote && appearNote.cw == null ? false : ref(appearNote.cw == null && isLong);
const isDeleted = ref(false);
const renoted = ref(false);
const muted = ref($i ? checkWordMute(appearNote, $i, $i.mutedWords) : false);

View File

@ -73,7 +73,7 @@ const parsed = $computed(() => props.note.text ? mfm.parse(props.note.text) : nu
const animated = $computed(() => parsed ? checkAnimationFromMfm(parsed) : null);
let allowAnim = $ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
const isLong = shouldCollapsed(props.note, []);
const isLong = defaultStore.state.expandLongNote && !props.hideFiles ? false : shouldCollapsed(props.note, []);
function animatedMFM() {
if (allowAnim) {

View File

@ -278,7 +278,7 @@ const urls = $computed(() => parsed ? extractUrlFromMfm(parsed).filter(u => u !=
const animated = $computed(() => parsed ? checkAnimationFromMfm(parsed) : null);
const allowAnim = ref(defaultStore.state.advancedMfm && defaultStore.state.animatedMfm ? true : false);
const isLong = shouldCollapsed(appearNote, urls ?? []);
const collapsed = ref(appearNote.cw == null && isLong);
const collapsed = defaultStore.state.expandLongNote && appearNote.cw == null ? false : ref(appearNote.cw == null && isLong);
const isDeleted = ref(false);
const renoted = ref(false);
const muted = ref($i ? checkWordMute(appearNote, $i, $i.mutedWords) : false);

View File

@ -78,6 +78,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'account',
default: false,
},
expandLongNote: {
where: 'device',
default: false,
},
rememberNoteVisibility: {
where: 'account',
default: false,