fix(notifications): a notice keeps what to say and says it in the reader's language when shown
This commit is contained in:
@@ -6,13 +6,13 @@ import type { Me } from "./api/account";
|
||||
import { getAccountRaw, writeAccount } from "./storage";
|
||||
import { notifyActionError } from "./actionErrors";
|
||||
import { updateMeCache } from "./useMe";
|
||||
import i18n from "../i18n";
|
||||
import { msg } from "./notifications";
|
||||
|
||||
// The local state + cache already show the new value, so a refused save is otherwise invisible until
|
||||
// the next load quietly puts the old one back. `req` reports none of 403/404/429 and only the
|
||||
// connection notice for a lost connection — say it.
|
||||
const reportPrefSaveFailure = (err: unknown) =>
|
||||
notifyActionError(err, i18n.t("errors.writeFailed.prefs"));
|
||||
notifyActionError(err, msg("errors.writeFailed.prefs"));
|
||||
|
||||
// The ONE per-account + server preference hook. A preference (unlike an ephemeral filter) persists to
|
||||
// the account on the server (PUT /api/me/preferences, which MERGES the partial payload) and follows the
|
||||
|
||||
Reference in New Issue
Block a user