avluis / Hentoid

Doujinshi Android App
https://discord.gg/QEZ3qk9
Apache License 2.0
1.06k stars 83 forks source link

BundleX.kt cleanup #1147

Closed wightwulf1944 closed 6 months ago

wightwulf1944 commented 6 months ago

Reduce duplicate code by using property factory

A bug in older Android SDKs prevented us from using method references to refer to Bundle member functions. In particular Bundle::getBoolean could not be referenced which prevented us from using a generic factory function that receives these method references.

Now that this issue has been fixed in newer compileSdk, this PR aims to improve code readability while maintaining functionality.

A Rebase and Merge is recommended when accepting this pull request to keep git history neat.

RobbWatershed commented 6 months ago

Thank you for the explanation and the code simplification 😉