Wait for `markAllAsRead` before updating the UI
authorAlexander Ebert <ebert@woltlab.com>
Tue, 19 Jul 2022 11:02:09 +0000 (13:02 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Tue, 19 Jul 2022 11:02:09 +0000 (13:02 +0200)
commit7ed2d85b1b1d73e698f0bb8d136ec25c9079f863
tree4026f7989ed7bb157e781dfdab43a8598c52f943
parentaeb3bf4c9b0eeafbfe8f0d5a49f0b8aea67584f1
Wait for `markAllAsRead` before updating the UI

The number of unread items relies on an internal counter that is updated based on the server-side value of the `markAllAsRead` action.

Not waiting for the action to complete will cause the UI to become out-of-sync. Notably the unread indicator of the mobile UI tab relies on the internal counter that is updated at a later stage.

See https://www.woltlab.com/community/thread/296509-mobiles-kontrollzentrum-icon-bleibt/
ts/WoltLabSuite/Core/Ui/User/Menu/View.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Menu/View.js