-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Extract database module #1371
Merged
Merged
Extract database module #1371
Conversation
This file contains 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
2b68280
to
9dc75eb
Compare
9dc75eb
to
3b967dd
Compare
OK, I have done a first check pass, there are things to improve:
|
I am refactoring and studying your code, there is one rule: never duplicate the code. You did it several times for the utilities. There is always a way to encapsulate without duplicating. |
I made only one enum for CompressionAlgorithm to avoid mapping |
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.
Resolves #1370 by extracting the database code into a separate gradle module
There few tricks I had to do to extract the code:
IconPackChooser
. I had to extract an interface (InterfaceIconPackChooser
open to a better name suggestion) so the database module can depend on the interface but not on the implementation that requires values from the appBuildConfig
Exceptions
. Instead of passing a string id, I just identified the exception class and linked it manuallyTemplates
. Default name, fields and title are passed as strings instead of res idsIn a different PR
KeePassDX development can continue with the proposed structure and it should be familiar to any other developer