소스 검색

Reorder start/stopWorkers

nimbleghost 2 년 전
부모
커밋
30a8f66db2
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      web/src/components/hooks.js

+ 7 - 7
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();