refactor: avoid tight coupling by using dependency injection - #13
Merged
alexgerardojacinto merged 3 commits intoMar 23, 2026
Conversation
alexgerardojacinto
requested review from
OS-pedrogustavobilro,
OS-ruimoreiramendes and
andredestro
March 20, 2026 22:39
Comment on lines
+46
to
+50
| private val context: Context, | ||
| private val activity: AppCompatActivity, | ||
| private val bridge: Bridge, | ||
| private val appId: String, | ||
| private val permissionHelper: PermissionHelper |
Contributor
There was a problem hiding this comment.
I'd say this is much better.
I think one day we could look into not passing stuff like activity and context directly (and probably we'd only need activity, we could derive context from it), but don't think that needs to be addressed here.
Collaborator
Author
There was a problem hiding this comment.
Yeah I also thought of that. We can probably do that in the future. For this one I specifically asked Claude to fix the tight coupling without changing the code too much and keeping the two separate classes (IonCameraFlow and LegacyCameraFlow (in Java)) without changing too much stuff, so I believe that's why it did it like this.
Co-authored-by: Pedro Bilro <pedro.gustavo.bilro@outsystems.com>
OS-pedrogustavobilro
approved these changes
Mar 23, 2026
alexgerardojacinto
merged commit Mar 23, 2026
31ff8cd
into
feat/RMET-4099/camera-unification
5 of 6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclaimer: This PR was generated with Claude.
Problem
Solution: Constructor Dependency Injection
Benefits
Files Changed