mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Remove the CommonSettingsProtocol and use UserSession to carry multiple dependencies. (#6302)
* Remove the CommonSettingsProtocol. * Replace multiple dependencies with the UserSession when it carries them.
This commit is contained in:
@@ -273,7 +273,10 @@ Services = where product-level opinions live (Rust SDK stays spec-faithful).
|
||||
- Inject via `init` parameters.
|
||||
- Screen coordinators get `Parameters` struct with specific dependencies.
|
||||
- `CommonFlowParameters` flow-coordinator-only.
|
||||
- `ServiceLocator` **deprecated** — never use services directly. Always inject from above.
|
||||
- `UserSession` = per-account dependency container (`clientProxy`, `userSettings`, `mediaProvider`…).
|
||||
- Need 2+ from it? Pass `userSession` down. Need 1? Pass that one direct.
|
||||
- Receiver may store only pieces it need (e.g. `clientProxy`, `userSettings`).
|
||||
- Never pass `userSession` plus value it already owns (e.g. `userSession` + `userSettings`).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user