Skip to content

Commit ad493bc

Browse files
committed
Improves comments, fix class naming
1 parent 77c4e5c commit ad493bc

File tree

15 files changed

+35
-51
lines changed

15 files changed

+35
-51
lines changed

ts/WoltLabSuite/Core/Api/ModerationQueues/DeleteContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Deletes the content associated with a moderation queue entry.
2+
* Deletes the content associated with a moderation queue.
33
*
44
* @author Marcel Werk
55
* @copyright 2001-2024 WoltLab GmbH

ts/WoltLabSuite/Core/Api/ModerationQueues/EnableContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Enables the content associated with a moderation queue entry.
2+
* Enables the content associated with a moderation queue.
33
*
44
* @author Marcel Werk
55
* @copyright 2001-2024 WoltLab GmbH

ts/WoltLabSuite/Core/Api/ModerationQueues/MarkAllAsRead.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Mark all moderation queue as read.
2+
* Marks all moderation queues as read.
33
*
44
* @author Olaf Braun
55
* @copyright 2001-2025 WoltLab GmbH

ts/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,13 @@ class UserMenuDataModerationQueue implements UserMenuProvider {
6464
}
6565

6666
async getData(): Promise<UserMenuData[]> {
67-
const response = await getUserMenuItems();
68-
if (!response.ok) {
69-
throw new Error("Moderation queue items could not be loaded.");
70-
}
67+
const { items, unreadModerationCount } = (await getUserMenuItems()).unwrap();
7168

72-
this.updateCounter(response.value.unreadModerationCount);
69+
this.updateCounter(unreadModerationCount);
7370

7471
this.stale = false;
7572

76-
return response.value.items;
73+
return items;
7774
}
7875

7976
getFooter(): UserMenuFooter | null {

wcfsetup/install/files/js/WoltLabSuite/Core/Api/ModerationQueues/DeleteContent.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/Core/Api/ModerationQueues/EnableContent.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/Core/Api/ModerationQueues/MarkAllAsRead.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/Data/ModerationQueue.js

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wcfsetup/install/files/lib/command/moderation/queue/MarkAllModerationQueueAsRead.class.php renamed to wcfsetup/install/files/lib/command/moderation/queue/MarkAllModerationQueuesAsRead.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use wcf\system\WCF;
88

99
/**
10-
* Marks all moderation queue entry as read for the current logged-in user.
10+
* Marks all moderation queues as read for the current user.
1111
*
1212
* @author Olaf Braun
1313
* @copyright 2001-2025 WoltLab GmbH
1414
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
1515
* @since 6.3
1616
*/
17-
final class MarkAllModerationQueueAsRead
17+
final class MarkAllModerationQueuesAsRead
1818
{
1919
public function __invoke(): void
2020
{

wcfsetup/install/files/lib/command/moderation/queue/MarkModerationQueueAsDone.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
*/
1717
final class MarkModerationQueueAsDone
1818
{
19-
public function __construct(private readonly ModerationQueue $queue) {}
19+
public function __construct(
20+
private readonly ModerationQueue $queue
21+
) {}
2022

2123
public function __invoke(): void
2224
{

0 commit comments

Comments
 (0)