refactor(frontend): アカウント情報はstore管理に

This commit is contained in:
syuilo 2025-04-16 09:25:13 +09:00
parent de19d9a4d4
commit 75267f87d5
5 changed files with 61 additions and 44 deletions

View file

@ -32,10 +32,11 @@ export type SoundStore = {
// NOTE: デフォルト値は他の設定の状態に依存してはならない(依存していた場合、ユーザーがその設定項目単体で「初期値にリセット」した場合不具合の原因になる)
export const PREF_DEF = {
// TODO: 持つのはホストやユーザーID、ユーザー名など最低限にしといて、その他のプロフィール情報はpreferences外で管理した方が綺麗そう
// 現状だと、updateCurrentAccount/updateCurrentAccountPartialが呼ばれるたびに「設定」へのcommitが行われて不自然(明らかに設定の更新とは捉えにくい)だし
accounts: {
default: [] as [host: string, user: Misskey.entities.User][],
default: [] as [host: string, user: {
id: string;
username: string;
}][],
},
pinnedUserLists: {