From 265ab4a7326cda28a706d64c389061d2ce50af22 Mon Sep 17 00:00:00 2001 From: ayumi-signal <143036029+ayumi-signal@users.noreply.github.com> Date: Fri, 5 Sep 2025 06:35:09 -0700 Subject: [PATCH] Fix donations toast to show only on resume after restart --- ts/components/DebugLogWindow.tsx | 2 -- ts/components/LeftPane.stories.tsx | 1 - ts/components/PreferencesDonations.tsx | 3 --- ts/components/ToastManager.stories.tsx | 1 - ts/components/ToastManager.tsx | 3 --- ts/state/smart/ToastManager.tsx | 3 +-- 6 files changed, 1 insertion(+), 12 deletions(-) diff --git a/ts/components/DebugLogWindow.tsx b/ts/components/DebugLogWindow.tsx index 06340104eb..1f979bde78 100644 --- a/ts/components/DebugLogWindow.tsx +++ b/ts/components/DebugLogWindow.tsx @@ -152,7 +152,6 @@ export function DebugLogWindow({ { renderToastManager: ({ containerWidthBreakpoint }) => ( diff --git a/ts/components/ToastManager.stories.tsx b/ts/components/ToastManager.stories.tsx index 814eb18925..0b6c745cb5 100644 --- a/ts/components/ToastManager.stories.tsx +++ b/ts/components/ToastManager.stories.tsx @@ -269,7 +269,6 @@ export default { }, args: { changeLocation: action('changeLocation'), - clearDonation: action('clearDonation'), hideToast: action('hideToast'), openFileInFolder: action('openFileInFolder'), onShowDebugLog: action('onShowDebugLog'), diff --git a/ts/components/ToastManager.tsx b/ts/components/ToastManager.tsx index 62731d1bd6..45163fec4c 100644 --- a/ts/components/ToastManager.tsx +++ b/ts/components/ToastManager.tsx @@ -23,7 +23,6 @@ import type { Location } from '../types/Nav'; export type PropsType = { changeLocation: (newLocation: Location) => unknown; - clearDonation: () => unknown; hideToast: () => unknown; i18n: LocalizerType; openFileInFolder: (target: string) => unknown; @@ -49,7 +48,6 @@ const SHORT_TIMEOUT = 3 * SECOND; export function renderToast({ changeLocation, - clearDonation, hideToast, i18n, openFileInFolder, @@ -293,7 +291,6 @@ export function renderToast({ { - clearDonation(); hideToast(); }} toastAction={{ diff --git a/ts/state/smart/ToastManager.tsx b/ts/state/smart/ToastManager.tsx index 69223632e2..cbfdd1b4d2 100644 --- a/ts/state/smart/ToastManager.tsx +++ b/ts/state/smart/ToastManager.tsx @@ -56,7 +56,7 @@ export const SmartToastManager = memo(function SmartToastManager({ const selectedNavTab = useSelector(getSelectedNavTab); const selectedConversationId = useSelector(getSelectedConversationId); const { changeLocation } = useNavActions(); - const { clearWorkflow, setDidResume } = useDonationsActions(); + const { setDidResume } = useDonationsActions(); const { onUndoArchive } = useConversationsActions(); const { openFileInFolder, hideToast } = useToastActions(); @@ -91,7 +91,6 @@ export const SmartToastManager = memo(function SmartToastManager({ return (