Marking all items as read did not reset the count
authorAlexander Ebert <ebert@woltlab.com>
Mon, 21 Feb 2022 13:11:54 +0000 (14:11 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 21 Feb 2022 13:11:54 +0000 (14:11 +0100)
files/js/WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation.js
ts/WoltLabSuite/Core/Conversation/Ui/User/Menu/Data/Conversation.ts

index 243226d31abc8a07b198da9be4a17c4c78dc2826..e8e730c44d7aa3f8fcad18b427eb9dd896c7664f 100644 (file)
@@ -100,6 +100,7 @@ define(["require", "exports", "tslib", "WoltLabSuite/Core/Ajax", "WoltLabSuite/C
         }
         async markAllAsRead() {
             await (0, Ajax_1.dboAction)("markAllAsRead", "wcf\\data\\conversation\\ConversationAction").dispatch();
+            this.updateCounter(0);
         }
         updateCounter(counter) {
             let badge = this.button.querySelector(".badge");
index 2c6c4234134223bb14ae45685cc75ceef1eb0dd2..3de6c5f0ef022009def3d5421f43a932cb9e5ce6 100644 (file)
@@ -151,6 +151,8 @@ class UserMenuDataConversation implements UserMenuProvider {
 
   async markAllAsRead(): Promise<void> {
     await dboAction("markAllAsRead", "wcf\\data\\conversation\\ConversationAction").dispatch();
+
+    this.updateCounter(0);
   }
 
   private updateCounter(counter: number): void {