Fix the handling of replaced polls
authorAlexander Ebert <ebert@woltlab.com>
Mon, 2 Oct 2023 14:08:21 +0000 (16:08 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 2 Oct 2023 14:08:21 +0000 (16:08 +0200)
commit6234f6884bfb0b786a235668d1cae91e1439f2c7
treecd654151cd61962aec1c3eeaf75577f479f2b403
parent6d7bf516e05ac790edead9dae77d9d9445481113
Fix the handling of replaced polls

Editing a message with a poll could replace the poll, requiring a new initialization.

The previous map was replaced with a `WeakSet` because it is never read from and the map leaked memory when the poll was discarded.

See https://www.woltlab.com/community/thread/301810-unable-to-click-on-polls-after-editing-post/
ts/WoltLabSuite/Core/Ui/Poll/Poll.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Poll/Poll.js