Refresh the mobile unread indicator on DOM update
authorAlexander Ebert <ebert@woltlab.com>
Thu, 23 Jun 2022 16:56:28 +0000 (18:56 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 23 Jun 2022 16:56:28 +0000 (18:56 +0200)
commit10423cdc9b31913f03fb7a2884e8325afe9b2ed2
treea7f154b4df727ace64c4e63716729489e04fff30
parentd78a85d0cde1aeb07c9fee3077bad3618cf358b1
Refresh the mobile unread indicator on DOM update

The unread indicator might become out of sync if the menu is closed, but an action causes the last remaining element(s) to be marked as read.

Using a `MutationObserver` removes the need of signaling such change directly by all actions, for example a “Mark All as Read” button.

See https://www.woltlab.com/community/thread/296063-alle-als-gelesen-markieren-entfernt-badge-nicht/
ts/WoltLabSuite/Core/Ui/Page/Menu/Main.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/Menu/Main.js