summaryrefslogtreecommitdiff
path: root/packages/frontend/src/preferences/manager.ts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2025-12-16 22:56:57 +0900
committerGitHub <noreply@github.com>2025-12-16 22:56:57 +0900
commitcc05d93194f7bdf31a852c61647ed4431a106c98 (patch)
treef0740fc89afddba4fdb6cbfde71b76ec6c32e105 /packages/frontend/src/preferences/manager.ts
parentfix(frontend): 無限スクロールできる箇所の調整 (#17000) (diff)
downloadmisskey-cc05d93194f7bdf31a852c61647ed4431a106c98.tar.gz
misskey-cc05d93194f7bdf31a852c61647ed4431a106c98.tar.bz2
misskey-cc05d93194f7bdf31a852c61647ed4431a106c98.zip
fix(frontend): まれに設定変更のタブ間同期に失敗する問題を修正 (#16991)
Diffstat (limited to 'packages/frontend/src/preferences/manager.ts')
-rw-r--r--packages/frontend/src/preferences/manager.ts21
1 files changed, 12 insertions, 9 deletions
diff --git a/packages/frontend/src/preferences/manager.ts b/packages/frontend/src/preferences/manager.ts
index 5949ee71eb..13ba0000e4 100644
--- a/packages/frontend/src/preferences/manager.ts
+++ b/packages/frontend/src/preferences/manager.ts
@@ -257,20 +257,23 @@ export class PreferencesManager extends EventEmitter<PreferencesManagerEvents> {
this.rewriteRawState(key, v);
- this.emit('committed', {
- key,
- value: v,
- oldValue: this.s[key],
- });
-
const record = this.getMatchedRecordOf(key);
+ const _save = () => {
+ this.save();
+ this.emit('committed', {
+ key,
+ value: v,
+ oldValue: this.s[key],
+ });
+ };
+
if (parseScope(record[0]).account == null && isAccountDependentKey(key) && currentAccount != null) {
this.profile.preferences[key].push([makeScope({
server: host,
account: currentAccount.id,
}), v, {}]);
- this.save();
+ _save();
return;
}
@@ -278,12 +281,12 @@ export class PreferencesManager extends EventEmitter<PreferencesManagerEvents> {
this.profile.preferences[key].push([makeScope({
server: host,
}), v, {}]);
- this.save();
+ _save();
return;
}
record[1] = v;
- this.save();
+ _save();
if (record[2].sync) {
// awaitの必要なし