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:
Doug
2026-10-09 10:20:00 +01:00
committed by GitHub
parent a3d170534c
commit 65bab49f39
75 changed files with 212 additions and 369 deletions
+4 -1
View File
@@ -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`).
---