-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Refactor usage of Html.fromHtml to use HtmlCompat.fromHtml (Issue #6002) #6071
Conversation
…egacy Android versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry would you mind fixing the conflict? Thanks a lot!
Thanks for pointing that out! |
@nicolas-raoul I’ve gone ahead and rebased the branch, force-pushed the changes, and checked the MediaLicenseFragment.java file for any conflicts, but I’m not seeing anything that stands out. Could you kindly take a look again or trigger the CI checks to see if the issue is sorted now? |
@sonalyadav1 Got it, you changed the .java version of the said file but in the mean time upstream branch is updated with .kt version and .java version was deleted. So, you now have to make the same changes to the .kt file and don't include the .java version again. Hope this helps you :) |
@parneet-guraya Just to confirm, based on your message, I should create the MediaLicenseFragment.kt file by converting the logic from the previously existing .java file. Is there anything else I should be aware of in the process? |
Okay, so here what you should do. Basic thing is your branch has .java version but the Also, when you finished with all the things below , do the diff locally to make sure only intended changes exist. Then only do the force push because if anything goes wrong this is your backup to start fresh. Now here's what you can do ->
in terminal This will bring and stage the file into your current branch.
|
Since the change is not very big, another solution is to create a different branch from main, apply your changes (to the .kt files), then send a new pull request. 🙂 |
Well that works too 😅 |
Description:
This PR refactors the usage of Html.fromHtml across the project to address the deprecation warning and replace it with HtmlCompat.fromHtml for compatibility across all Android API levels.
Changes:
Replaced deprecated Html.fromHtml with HtmlCompat.fromHtml in multiple files:
StringUtil.kt
NearbyParentFragment.java
FeedbackDialog.kt
ReviewImageFragment.kt
Why:
The Html.fromHtml method has been deprecated, and we aim to ensure compatibility with newer Android versions by using HtmlCompat.fromHtml.
**Fixes: #6002 **
Testing:
Ensure the Html.fromHtml functionality is working correctly after the refactor.