Files
ThreadNet-Web/apps/web/test
Florian DurosandGitHub 27d97d3661 Instantiate message previewers lazily (#34065)
* fix(room-list): instantiate message previewers lazily

Removing the unused SettingsStore import from MessagePreviewStore (when
the
feature_new_room_list flag is dropped) changed module load order and
exposed a latent circular dependency: ReactionEventPreview imports
MessagePreviewStore, which eagerly did `new ReactionEventPreview()` at
module-eval — so importing ReactionEventPreview first (as its unit test
does) hit "ReactionEventPreview is not a constructor".

Construct the previewers lazily on first use (cached) instead of at
module
load, so nothing dereferences a mid-evaluation module. Fixes
ReactionEventPreview-test.

* refactor: pass MessagePreviewStore to ReactEventPreview
2026-07-01 10:14:41 +00:00
..