Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimelineWindow remove listener #4533

Open
theobouwman opened this issue Nov 15, 2024 · 1 comment
Open

TimelineWindow remove listener #4533

theobouwman opened this issue Nov 15, 2024 · 1 comment
Labels
A-Documentation T-Other Questions, user support, anything else X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@theobouwman
Copy link

How can I remove the listener created with initiating a TimelineWindow: https://matrix-org.github.io/matrix-js-sdk/classes/matrix.TimelineWindow.html

Docs: Note that constructing an instance of this class for a room adds a listener for RoomEvent.Timeline events which is never removed. In theory this should not cause a leak since the EventEmitter uses weak mappings.

We use it when we open a screen to show the timeline and want to remove the listener when we close the screen.

@dosubot dosubot bot added A-Documentation T-Other Questions, user support, anything else labels Nov 15, 2024
@dbkr
Copy link
Member

dbkr commented Nov 18, 2024

We can't really offer code-level support here as this is a bug tracker, but it sounds like you're saying that the docs are wrong and that it is important that the listener is explicitly removed?

@dbkr dbkr added the X-Needs-Info This issue is blocked awaiting information from the reporter label Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Documentation T-Other Questions, user support, anything else X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

2 participants