1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-23 22:56:49 +09:00

feat: keep show showPreview (#111)

Co-authored-by: anatawa12 <anatawa12@icloud.com>
This commit is contained in:
まっちゃとーにゅ 2023-07-25 03:31:21 +09:00 committed by GitHub
parent 2b7575e710
commit d886dddbf1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -166,7 +166,8 @@ let poll = $ref<{
expiredAfter: string | null; expiredAfter: string | null;
} | null>(null); } | null>(null);
let useCw = $ref(false); let useCw = $ref(false);
let showPreview = $ref(false); let showPreview = $ref(defaultStore.state.showPreview);
watch($$(showPreview), () => defaultStore.set('showPreview', showPreview));
let cw = $ref<string | null>(null); let cw = $ref<string | null>(null);
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly); let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof misskey.noteVisibilities[number]); let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof misskey.noteVisibilities[number]);

View File

@ -130,6 +130,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'deviceAccount', where: 'deviceAccount',
default: false, default: false,
}, },
showPreview: {
where: 'deviceAccount',
default: false,
},
statusbars: { statusbars: {
where: 'deviceAccount', where: 'deviceAccount',
default: [] as { default: [] as {