fix(frontend): 連合なしの状態の読み書きができない問題 (#13777)

* fix: 連合なしの状態の読み書きができない問題

* update changelog

* fix types: https://github.com/misskey-dev/misskey/pull/13777#discussion_r1585901601
This commit is contained in:
taiy 2024-05-01 15:29:38 +09:00 committed by GitHub
parent ef630df443
commit 9f66f22953
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 15 additions and 9 deletions

View file

@ -492,10 +492,9 @@ export function getNoteMenu(props: {
};
}
type Visibility = 'public' | 'home' | 'followers' | 'specified';
type Visibility = (typeof Misskey.noteVisibilities)[number];
// defaultStore.state.visibilityがstringなためstringも受け付けている
function smallerVisibility(a: Visibility | string, b: Visibility | string): Visibility {
function smallerVisibility(a: Visibility, b: Visibility): Visibility {
if (a === 'specified' || b === 'specified') return 'specified';
if (a === 'followers' || b === 'followers') return 'followers';
if (a === 'home' || b === 'home') return 'home';