feat: keep show showPreview

This commit is contained in:
anatawa12 2023-07-22 16:07:11 +09:00
parent 7097d553e4
commit 5c50a677e8
No known key found for this signature in database
GPG Key ID: 9CA909848B8E4EA6
2 changed files with 6 additions and 1 deletions

View File

@ -166,7 +166,8 @@ let poll = $ref<{
expiredAfter: string | null;
} | null>(null);
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 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]);

View File

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