This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app
Alan Guo Xiang Tan c245b74398
FIX: Avoid leaking TopicTrackingState listeners due to sidebar (#18131)
In eb12daa7f8 when adding community
section support for anonymous users, we changed the `sectionLinks`
property into a getter method. This meant that if the getter method was
called again after the community section has been rendered, we would end
up reintializing the section links classes. As part of the
initialisation, some section links would setup a TopicTrackingState
onStateChange listener. However, the listener is only removed when the
entire community section is removed which resulted in us leaking the
onStateChange listeners.

This commit reverts the `sectionLinks` from being defined as a getter
method into a property which is only set once when the community section
is being constructor. Also, we changed it such that the community
section will register the listener instead of each section link since it
makes cleaning up much easier to reason about.

No tests have been added for this commit because the original bug is
not possible after this change and we already have an existing tests
ensuring that TopicTrackingState change listeners are cleaned up when
the community section is destroyed.

Internal ref: /t/73224
2022-08-30 11:39:32 +08:00
..
assets FIX: Avoid leaking TopicTrackingState listeners due to sidebar (#18131) 2022-08-30 11:39:32 +08:00
controllers FIX: LocalJumpError : unexpected return (#18114) 2022-08-27 18:06:56 +02:00
helpers UX: Improve safe-mode usability (#17929) 2022-08-15 15:15:15 +01:00
jobs DEV: Increase timeout when pulling hotlinked image (#18036) 2022-08-23 09:38:10 -04:00
mailers FEATURE: Custom unsubscribe options (#17090) 2022-06-21 15:49:47 -03:00
models DEV: Support inline-hbs compilation in themes (#18112) 2022-08-29 19:53:42 +01:00
serializers PERF: Rely on preload for first_post for TopicBookmarkable (#18066) 2022-08-24 16:01:29 +10:00
services FIX: Do not notify admins watching PM tags (#18103) 2022-08-29 16:11:11 +03:00
views UX: fix styles for the wizard congrats step (#18105) 2022-08-26 12:29:40 -04:00