From 99543414348f65d9a0d6dd8539bb2be8897c4fcb Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:05:12 +0200 Subject: [PATCH] Remind about server update later on dialog close Stop opening server update info dialog for one hour after the dialog was closed --- src/components/util/ServerUpdateChecker.tsx | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/util/ServerUpdateChecker.tsx b/src/components/util/ServerUpdateChecker.tsx index f2101c86..a5fe0331 100644 --- a/src/components/util/ServerUpdateChecker.tsx +++ b/src/components/util/ServerUpdateChecker.tsx @@ -43,7 +43,7 @@ export const ServerUpdateChecker = () => { setOpen(false); }; - useUpdateChecker('server', checkForUpdate); + const updateChecker = useUpdateChecker('server', checkForUpdate, selectedServerChannelInfo?.tag); if (isCheckingForServerUpdate) { return null; @@ -62,13 +62,12 @@ export const ServerUpdateChecker = () => { return null; } + if (!updateChecker.handleUpdate) { + return null; + } + return ( - + {t('global.update.label.available')} @@ -80,6 +79,14 @@ export const ServerUpdateChecker = () => { +