Skip to content
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

Feature/bma/arch fixes #7239

Merged
merged 11 commits into from
Oct 18, 2022
Merged

Feature/bma/arch fixes #7239

merged 11 commits into from
Oct 18, 2022

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Sep 26, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Fix some issues in our inject class members. There are some other issues, but I stop here for now.

Motivation and context

Avoid duplicated code, avoid injecting Session in the Views (Activity/Fragment)

Screenshots / GIFs

NA

Tests

  • Smoke tests.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@bmarty bmarty requested review from a team and ganfra and removed request for a team September 26, 2022 14:05
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

Some remarks

/**
* Contains synchronous methods to create permalinks from the Session.
*/
class PermalinkUseCase @Inject constructor(
Copy link
Member

Choose a reason for hiding this comment

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

Thats a bit weird, a UseCase should only offer one method, as it's supposed to encapsulate one business rule

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is not really a UseCase, rather a Proxy. Which name do you suggest?


@Inject lateinit var sessionListener: SessionListener
Copy link
Member

Choose a reason for hiding this comment

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

Some of the properties were kept private on purpose, we are losing this. I don't like having @Inject in Base Activity/Fragment class

Copy link
Member Author

Choose a reason for hiding this comment

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

All the injected members cannot be private. So on my side this is not much worth than before.

@bmarty bmarty force-pushed the feature/bma/arch_fixes branch from 84b6cd3 to ff830a8 Compare October 4, 2022 14:49
@bmarty bmarty force-pushed the feature/bma/arch_fixes branch from 6bca813 to 822f06f Compare October 17, 2022 13:08
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

12.5% 12.5% Coverage
0.0% 0.0% Duplication

@bmarty bmarty merged commit f330969 into develop Oct 18, 2022
@bmarty bmarty deleted the feature/bma/arch_fixes branch October 18, 2022 09:47
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