Fix donations toast to show only on resume after restart

This commit is contained in:
ayumi-signal
2025-09-05 06:35:09 -07:00
committed by GitHub
parent 6152cd049f
commit 265ab4a732
6 changed files with 1 additions and 12 deletions
-2
View File
@@ -152,7 +152,6 @@ export function DebugLogWindow({
</div>
<ToastManager
changeLocation={shouldNeverBeCalled}
clearDonation={shouldNeverBeCalled}
OS="unused"
hideToast={closeToast}
i18n={i18n}
@@ -213,7 +212,6 @@ export function DebugLogWindow({
</div>
<ToastManager
changeLocation={shouldNeverBeCalled}
clearDonation={shouldNeverBeCalled}
OS="unused"
hideToast={closeToast}
i18n={i18n}
-1
View File
@@ -285,7 +285,6 @@ const useProps = (overrideProps: OverridePropsType = {}): PropsType => {
renderToastManager: ({ containerWidthBreakpoint }) => (
<ToastManager
changeLocation={action('changeLocation')}
clearDonation={action('clearDonation')}
OS="unused"
hideToast={action('hideToast')}
i18n={i18n}
-3
View File
@@ -688,9 +688,6 @@ export function PreferencesDonations({
);
} else {
clearWorkflow();
showToast({
toastType: ToastType.DonationCompleted,
});
}
}}
/>
-1
View File
@@ -269,7 +269,6 @@ export default {
},
args: {
changeLocation: action('changeLocation'),
clearDonation: action('clearDonation'),
hideToast: action('hideToast'),
openFileInFolder: action('openFileInFolder'),
onShowDebugLog: action('onShowDebugLog'),
-3
View File
@@ -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({
<Toast
autoDismissDisabled
onClose={() => {
clearDonation();
hideToast();
}}
toastAction={{