Show notification after "mark as read" is done
authorMarcel Werk <burntime@woltlab.com>
Sun, 24 Apr 2022 13:01:32 +0000 (15:01 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 24 Apr 2022 13:01:32 +0000 (15:01 +0200)
ts/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Article/MarkAllAsRead.js

index 726c44b7be2f37b676eb5d827efe74351bcbc2a2..5e6d6eac0e3cd94476df329a0ee2718e2ee430d3 100644 (file)
@@ -11,6 +11,7 @@
 import * as Ajax from "../../Ajax";
 import { AjaxCallbackObject, AjaxCallbackSetup } from "../../Ajax/Data";
 import * as EventHandler from "../../Event/Handler";
+import * as UiNotification from "../Notification";
 
 class UiArticleMarkAllAsRead implements AjaxCallbackObject {
   constructor() {
@@ -38,6 +39,7 @@ class UiArticleMarkAllAsRead implements AjaxCallbackObject {
     document.querySelectorAll(".contentItemList .contentItemBadgeNew").forEach((el) => el.remove());
 
     EventHandler.fire("com.woltlab.wcf.MainMenuMobile", "updateButtonState");
+    UiNotification.show();
   }
 
   _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
index b2fdfd54b8ae7a166be65e3359e6c41deef64874..439a97d71cc86ccf8c1e060d95cd50fe4421d616 100644 (file)
@@ -7,12 +7,13 @@
  * @module  WoltLabSuite/Core/Ui/Article/MarkAllAsRead
  * @woltlabExcludeBundle tiny
  */
-define(["require", "exports", "tslib", "../../Ajax", "../../Event/Handler"], function (require, exports, tslib_1, Ajax, EventHandler) {
+define(["require", "exports", "tslib", "../../Ajax", "../../Event/Handler", "../Notification"], function (require, exports, tslib_1, Ajax, EventHandler, UiNotification) {
     "use strict";
     Object.defineProperty(exports, "__esModule", { value: true });
     exports.init = void 0;
     Ajax = tslib_1.__importStar(Ajax);
     EventHandler = tslib_1.__importStar(EventHandler);
+    UiNotification = tslib_1.__importStar(UiNotification);
     class UiArticleMarkAllAsRead {
         constructor() {
             document.querySelectorAll(".markAllAsReadButton").forEach((button) => {
@@ -35,6 +36,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Event/Handler"], fun
             // article list
             document.querySelectorAll(".contentItemList .contentItemBadgeNew").forEach((el) => el.remove());
             EventHandler.fire("com.woltlab.wcf.MainMenuMobile", "updateButtonState");
+            UiNotification.show();
         }
         _ajaxSetup() {
             return {