From 8128f46a3838d175057091fb31fdd2f5aab1713e Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 9 May 2022 14:17:55 +0200 Subject: [PATCH] Suppress the redundant loading indicator See https://www.woltlab.com/community/thread/295539-doppelte-ladebalken/ --- ts/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.ts | 7 +++---- ts/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.ts | 7 +++---- .../WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.js | 4 +++- .../js/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.js | 4 +++- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/ts/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.ts b/ts/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.ts index bbbe95c57f..9602a1f110 100644 --- a/ts/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.ts +++ b/ts/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.ts @@ -63,10 +63,9 @@ class UserMenuDataModerationQueue implements UserMenuProvider { } async getData(): Promise { - const data = (await dboAction( - "getModerationQueueData", - "wcf\\data\\moderation\\queue\\ModerationQueueAction", - ).dispatch()) as UserMenuData[]; + const data = (await dboAction("getModerationQueueData", "wcf\\data\\moderation\\queue\\ModerationQueueAction") + .disableLoadingIndicator() + .dispatch()) as UserMenuData[]; const counter = data.filter((item) => item.isUnread).length; this.updateCounter(counter); diff --git a/ts/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.ts b/ts/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.ts index 494a128ea2..04a4c296c2 100644 --- a/ts/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.ts +++ b/ts/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.ts @@ -177,10 +177,9 @@ class UserMenuDataNotification implements DesktopNotifications, UserMenuProvider } async getData(): Promise { - const data = (await dboAction( - "getNotificationData", - "wcf\\data\\user\\notification\\UserNotificationAction", - ).dispatch()) as UserMenuData[]; + const data = (await dboAction("getNotificationData", "wcf\\data\\user\\notification\\UserNotificationAction") + .disableLoadingIndicator() + .dispatch()) as UserMenuData[]; const counter = data.filter((item) => item.isUnread).length; this.updateCounter(counter); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.js index 7548a9ab63..76f1b6d905 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.js @@ -41,7 +41,9 @@ define(["require", "exports", "tslib", "../../../../Ajax", "../View", "../Manage ]; } async getData() { - const data = (await (0, Ajax_1.dboAction)("getModerationQueueData", "wcf\\data\\moderation\\queue\\ModerationQueueAction").dispatch()); + const data = (await (0, Ajax_1.dboAction)("getModerationQueueData", "wcf\\data\\moderation\\queue\\ModerationQueueAction") + .disableLoadingIndicator() + .dispatch()); const counter = data.filter((item) => item.isUnread).length; this.updateCounter(counter); this.stale = false; diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.js index b216b9e008..3ede4ef56c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/Notification.js @@ -132,7 +132,9 @@ define(["require", "exports", "tslib", "../../../../Ajax", "../View", "../Manage return "com.woltlab.wcf.notifications"; } async getData() { - const data = (await (0, Ajax_1.dboAction)("getNotificationData", "wcf\\data\\user\\notification\\UserNotificationAction").dispatch()); + const data = (await (0, Ajax_1.dboAction)("getNotificationData", "wcf\\data\\user\\notification\\UserNotificationAction") + .disableLoadingIndicator() + .dispatch()); const counter = data.filter((item) => item.isUnread).length; this.updateCounter(counter); this.stale = false; -- 2.20.1