mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Extracted DM Relay UI logic and DM Attachment logic into separate binder modules to reduce the size of ProfileModalController.js. Updated file size baseline. Co-authored-by: PR0M3TH3AN <[email protected]>
726 B
726 B
Decisions
Extraction Strategy
- Extracted logic heavily depends on
this(the controller instance). - To avoid modifying
ProfileDirectMessageController.js(keeping changes confined toProfileModalControllerdecomposition), we will create "Binder" modules that export standalone functions accepting the controller instance. - This pattern mimics the "Mixin" or "Extension Method" pattern but with pure functions.
Naming
ProfileDmRelayBinder.js: Handles relay preferences and UI binding.ProfileDmAttachmentBinder.js: Handles attachment queue rendering and uploading.
Dependencies
- Binders will import necessary utilities (logger, helpers) but rely on the controller instance for state and services.