Skip to content

Conversation

@aitorvs
Copy link
Collaborator

@aitorvs aitorvs commented Jan 25, 2021

Task/Issue URL: https://app.asana.com/0/0/1199916263225059/f
Tech Design URL:
CC:

Description:
Use dagger multibindings to decouple the DaggerWorkerFactory.

The DaggerWorkerFactory is a big object that creates the workers AND inject its dependencies. For that reason it needs to know and depend on ALL dependencies all the app workers require. Which makes it a god object.
In this PR I use dagger multibindings to setup a kind of plugin system where the DaggerWorkerFactory can delegate the injection of dependencies to the worker plugins.

Steps to test this PR:

  1. install/update the app
  2. app should work as before
  3. all workes should just work as before

Internal references:

Software Engineering Expectations
Technical Design Template

Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

Nice job @aitorvs! I noticed the clear data notification does not show up anymore, left a couple of comments about that.

notificationDao: NotificationDao,
notificationFactory: NotificationFactory,
pixel: Pixel,
privacyProtectionNotification: PrivacyProtectionNotification
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be ClearDataNotification?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! done

private val notificationDao: NotificationDao,
private val notificationFactory: NotificationFactory,
private val pixel: Pixel,
private val privacyProtectionNotification: PrivacyProtectionNotification
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be ClearDataNotification?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! done

@aitorvs aitorvs requested a review from marcosholgado February 9, 2021 12:43
@aitorvs
Copy link
Collaborator Author

aitorvs commented Feb 9, 2021

Nice job @aitorvs! I noticed the clear data notification does not show up anymore, left a couple of comments about that.

Thanks @marcosholgado, good catch! it should be fixed now!

Copy link
Contributor

@marcosholgado marcosholgado left a comment

Choose a reason for hiding this comment

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

Nice one! 👍

@aitorvs aitorvs merged commit 05e86b4 into develop Feb 9, 2021
@aitorvs aitorvs deleted the poc/aitor/plugins branch February 9, 2021 13:19
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.

2 participants