clean: remove remnants of "rememberNoteVisibility"

This commit is contained in:
Chloe Kudryavtsev 2022-08-19 18:32:07 -04:00
commit 027cad7aa0
2 changed files with 1 additions and 15 deletions

View file

@ -133,7 +133,7 @@ let poll = $ref<{
let useCw = $ref(false);
let showPreview = $ref(false);
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.defaultNoteLocalOnly);
// TODO: compat with misskey-js, should likely be moved into foundkey-js
const visibilityScore = (a: string): number => {
@ -398,15 +398,9 @@ function setVisibility() {
}, {
changeVisibility: v => {
visibility = v;
if (defaultStore.state.rememberNoteVisibility) {
defaultStore.set('visibility', visibility);
}
},
changeLocalOnly: v => {
localOnly = v;
if (defaultStore.state.rememberNoteVisibility) {
defaultStore.set('localOnly', localOnly);
}
},
}, 'closed');
}

View file

@ -71,14 +71,6 @@ export const defaultStore = markRaw(new Storage('base', {
'ui',
],
},
visibility: { // TODO: verify that this is no longer used and remove
where: 'deviceAccount',
default: 'public' as 'public' | 'home' | 'followers' | 'specified',
},
localOnly: {
where: 'deviceAccount',
default: false,
},
widgets: {
where: 'deviceAccount',
default: [] as {