jerryhcooke / smouldering_durtles

An attempt to keep a well-loved Android client for WaniKani alive amid changes
Other
47 stars 14 forks source link

Fixed bug where info boxes in settings would have no summary #66

Closed hummusw closed 5 months ago

hummusw commented 6 months ago

This issue seems to originate from changes added with automatic theme switching.

From what I can tell, it's a result of findPreference("theme") returning null depending on where in the settings the user is currently in. Seems like the code would exit before it got to the lines where it got to the setSummaryHtml lines.

These changes make the code resilient to findPreference("theme") returning null. I've also moved it so that it's only run once per screen instead of every time the visibility of a preference is set.