From 8360c2dec90dee9088637b628db0d603972a847a Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Fri, 12 Jan 2024 06:18:12 -0800 Subject: [PATCH] Update DesktopEventHandler.tsx (#6376) --- app/components/DesktopEventHandler.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/components/DesktopEventHandler.tsx b/app/components/DesktopEventHandler.tsx index e75e26ed7..e4a513abb 100644 --- a/app/components/DesktopEventHandler.tsx +++ b/app/components/DesktopEventHandler.tsx @@ -12,6 +12,7 @@ export default function DesktopEventHandler() { const { t } = useTranslation(); const history = useHistory(); const { dialogs } = useStores(); + const hasDisabledUpdateMessage = React.useRef(false); React.useEffect(() => { Desktop.bridge?.redirect((path: string, replace = false) => { @@ -23,6 +24,11 @@ export default function DesktopEventHandler() { }); Desktop.bridge?.updateDownloaded(() => { + if (hasDisabledUpdateMessage.current) { + return; + } + + hasDisabledUpdateMessage.current = true; toast.message("An update is ready to install.", { duration: Infinity, dismissible: true,