The binding should not be passed around#57
Merged
maestromac merged 5 commits intoforem:masterfrom Nov 6, 2019
Merged
Conversation
The binding generated by the MainActivity should not be passed around as it can generate memory leaks. This also helps to keep things where they belong instead of doing view logic everywhere. Eventually this could help to write better unit tests.
joanb
reviewed
Oct 16, 2019
app/src/main/java/to/dev/dev_android/view/main/view/CustomWebViewClient.kt
Outdated
Show resolved
Hide resolved
joanb
reviewed
Oct 18, 2019
app/src/main/java/to/dev/dev_android/view/main/view/MainActivity.kt
Outdated
Show resolved
Hide resolved
joanb
previously approved these changes
Oct 18, 2019
…ty.kt Co-Authored-By: Joan Barroso Garrido <joanbarrosogarrido@gmail.com>
VarunBarad
suggested changes
Oct 22, 2019
Contributor
VarunBarad
left a comment
There was a problem hiding this comment.
Everything looks good, only a small change is required in one file to make it less error-prone and more readable.
app/src/main/java/to/dev/dev_android/view/main/view/CustomWebViewClient.kt
Outdated
Show resolved
Hide resolved
joanb
approved these changes
Oct 24, 2019
Contributor
Author
|
Any help merging @maestromac ? |
maestromac
approved these changes
Nov 6, 2019
Contributor
maestromac
left a comment
There was a problem hiding this comment.
Sorry for the long delay @sierisimo 🙇
LGTM!
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.
What type of PR is this? (check all applicable)
Description
The binding generated by the
MainActivityshould not be passed around as it can generate memory leaks. This also helps to keep things where they belong instead of doing view logic everywhere.Adding a single lambda instead as the way to communicate makes the class more generic and easy to manage.
Eventually this could help to write better unit tests.
[optional] What gif best describes this PR or how it makes you feel?