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:
2026-10-30 00:10:38 +01:00
parent 4a0d4b0964
commit b515c16117
26 changed files with 98 additions and 70 deletions
@@ -202,12 +202,13 @@ describe("DownloadTray", () => {
const notice = h.notify.mock.calls[0]![0] as {
title: NotifText;
message: NotifText;
action: { label: string; onClick: () => void };
secondaryAction: { label: string; onClick: () => void };
action: { label: NotifText; onClick: () => void };
secondaryAction: { label: NotifText; onClick: () => void };
};
expect(notice.title).toEqual(msg("tray.done.title", { title: raw("Clip 1") }));
expect(notice.message).toEqual(msg("tray.done.phone"));
expect(notice.action.label).toBe("tray.done.copyLink");
expect(notice.action.label).toEqual(msg("tray.done.copyLink"));
expect(notice.secondaryAction.label).toEqual(msg("tray.done.open"));
notice.action.onClick();
expect(h.share).toHaveBeenCalled();
notice.secondaryAction.onClick();