From 30a8f66db28b568f31018595bfb1709ed380800a Mon Sep 17 00:00:00 2001 From: nimbleghost <132819643+nimbleghost@users.noreply.github.com> Date: Sat, 17 Jun 2023 22:32:24 +0200 Subject: [PATCH] Reorder start/stopWorkers --- web/src/components/hooks.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/web/src/components/hooks.js b/web/src/components/hooks.js index 85cabd9a..65360ba0 100644 --- a/web/src/components/hooks.js +++ b/web/src/components/hooks.js @@ -139,13 +139,6 @@ export const useAutoSubscribe = (subscriptions, selected) => { * up "unused" imports. See https://github.com/binwiederhier/ntfy/issues/186. */ -const stopWorkers = () => { - poller.stopWorker(); - pruner.stopWorker(); - accountApi.stopWorker(); - webPush.stopWorker(); -}; - const startWorkers = () => { poller.startWorker(); pruner.startWorker(); @@ -153,6 +146,13 @@ const startWorkers = () => { webPush.startWorker(); }; +const stopWorkers = () => { + poller.stopWorker(); + pruner.stopWorker(); + accountApi.stopWorker(); + webPush.stopWorker(); +}; + export const useBackgroundProcesses = () => { useWebPushTopicListener();