selfcustody / krux

Open-source signing device firmware for Bitcoin
https://selfcustody.github.io/krux/
Other
185 stars 37 forks source link

[Bug] Settings Hardware>Printer>Driver stop working when using TOUCH and PAGE #444

Closed tadeubas closed 3 months ago

tadeubas commented 3 months ago

Summary

When changing the Hardware>Printer>Driver by TOUCH then pressing PAGE or PAGE_PREV make the config to stop working

Device

Version

Describe the bug

Go to Settings>Hardware>Printer>Driver, TOUCH to move next to cnc/file then press PAGE pr PAGE_PREV and None will be shown, then the config doesn't respond to TOUCH or PAGE/PAGE_PREV anymore. If you click on Go after the config problem, it will be frozen and you will be unable to change it. Only using Factory Settings to restore will allow to config this setting again.

jdlcdl commented 3 months ago

Do the same in language, and you'll get locale=None as well. Thank you for figuring out how to provoke that!

tadeubas commented 3 months ago

Odudex suggested this https://github.com/selfcustody/krux/blob/develop/src/krux/themes.py#L130

if current_theme not in (list(ThemeSettings.THEME_NAMES.values())):
            # In case old version theme in use was deleted
            current_theme = ThemeSettings.DARK_THEME_NAME
            Settings().appearance.theme = current_theme
odudex commented 3 months ago

Odudex suggested this https://github.com/selfcustody/krux/blob/develop/src/krux/themes.py#L130

if current_theme not in (list(ThemeSettings.THEME_NAMES.values())):
            # In case old version theme in use was deleted
            current_theme = ThemeSettings.DARK_THEME_NAME
            Settings().appearance.theme = current_theme

This was before you found out how to reproduce the error. I'm pushing a fix now.

odudex commented 3 months ago

Fixed with af4b62157ff94a066071101ca41e1d357d0902b6