fix(notifications): a notice's button is said when shown, like its text
An action label was translated when the notice was raised, so after a language switch a live toast or center row read in one language with its button in the other. The access-requests nudge no longer re-issues on a switch for it. New tests: the button and a server refusal follow a switch.
This commit is contained in:
@@ -2,7 +2,6 @@ import { HttpError } from "./api";
|
||||
import { markReported } from "./api/core";
|
||||
import { msg, notify, type NotifText } from "./notifications";
|
||||
import { notifyActionError } from "./actionErrors";
|
||||
import i18n from "../i18n";
|
||||
|
||||
// A YouTube-gated action (subscribe, sync, backfill, unsubscribe) that 403s means the user hasn't
|
||||
// granted the write scope — surface a "Connect" affordance instead of a vague failure. Pass
|
||||
@@ -19,9 +18,7 @@ export function notifyYouTubeActionError(
|
||||
notify({
|
||||
level: "error",
|
||||
message: msg("channels.notify.needYouTube"),
|
||||
action: onConnect
|
||||
? { label: i18n.t("channels.notify.connect"), onClick: onConnect }
|
||||
: undefined,
|
||||
action: onConnect ? { label: msg("channels.notify.connect"), onClick: onConnect } : undefined,
|
||||
});
|
||||
markReported(err);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user