fix(frontend): デッキのプロファイルが新規作成できない問題を修正 (#15406)
* fix(frontend): デッキのプロファイルが保存できない問題を修正 * Update Changelog * Update CHANGELOG.md
This commit is contained in:
parent
2f4e2a7cca
commit
fd880660a3
3 changed files with 28 additions and 9 deletions
|
|
@ -112,9 +112,8 @@ export const loadDeck = async () => {
|
|||
deckStore.set('layout', deck.layout);
|
||||
};
|
||||
|
||||
// TODO: deckがloadされていない状態でsaveすると意図せず上書きが発生するので対策する
|
||||
export const saveDeck = throttle(1000, () => {
|
||||
misskeyApi('i/registry/set', {
|
||||
export async function forceSaveDeck() {
|
||||
await misskeyApi('i/registry/set', {
|
||||
scope: ['client', 'deck', 'profiles'],
|
||||
key: deckStore.state.profile,
|
||||
value: {
|
||||
|
|
@ -122,6 +121,11 @@ export const saveDeck = throttle(1000, () => {
|
|||
layout: deckStore.reactiveState.layout.value,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: deckがloadされていない状態でsaveすると意図せず上書きが発生するので対策する
|
||||
export const saveDeck = throttle(1000, () => {
|
||||
forceSaveDeck();
|
||||
});
|
||||
|
||||
export async function getProfiles(): Promise<string[]> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue