Skip to content

DI: rework how components are created and provided #1378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 19, 2023

Conversation

ganfra
Copy link
Member

@ganfra ganfra commented Sep 19, 2023

Rework how dagger components are created and provided.

The way it was done previously, we could end up using the wrong component for a given node. Now, it makes sure the component is provided by a parent node.
Also I took the opportunity to simplify the code so we don't have to pass callback throughplugins.

It should fix #1277
It might also fix some crashes we have with nodeFactories not found.

@ganfra ganfra marked this pull request as ready for review September 19, 2023 15:56
@ganfra ganfra requested a review from a team as a code owner September 19, 2023 15:56
@ganfra ganfra requested review from julioromano and removed request for a team September 19, 2023 15:56
@ganfra ganfra requested a review from bmarty September 19, 2023 16:10
@github-actions
Copy link
Contributor

github-actions bot commented Sep 19, 2023

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/FdX7SP

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (f1ad735) 57.75% compared to head (916801b) 57.75%.
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1378   +/-   ##
========================================
  Coverage    57.75%   57.75%           
========================================
  Files         1123     1124    +1     
  Lines        29567    29566    -1     
  Branches      6029     6029           
========================================
  Hits         17077    17077           
+ Misses        9910     9909    -1     
  Partials      2580     2580           
Files Changed Coverage Δ
...c/main/kotlin/io/element/android/x/MainActivity.kt 0.00% <0.00%> (ø)
...lement/android/x/di/DefaultRoomComponentFactory.kt 0.00% <0.00%> (ø)
...ent/android/x/di/DefaultSessionComponentFactory.kt 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@ganfra ganfra merged commit e743e86 into develop Sep 19, 2023
@ganfra ganfra deleted the feature/fga/fix_nav_restoration branch September 19, 2023 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attachment sent to previously viewed room
2 participants