truefedex / tv-bro

Simple web browser for android optimized to use with TV remote
https://play.google.com/store/apps/details?id=com.phlox.tvwebbrowser
Other
931 stars 105 forks source link

gTV: cannot save startpage #192

Open My1 opened 6 months ago

My1 commented 6 months ago

Describe the bug when trying to set a custom start page, the text field gets emptied once you leave settings.

To Reproduce Steps to reproduce the behavior: 1) Click Back to show the UI 2) click gear for settings 3) set start page type to Custom 4) enter something as the startpage 5) click back to exit settings 6) click gear again to open settings yet again

Expected behavior startpage gets preserved

Screenshots No idea how to screenshot gTV

Environment (please complete the following information):

MirrgieRiana commented 5 months ago

Hello,

I noticed that there is no code to initialize the text box (etCustomHomePageUrl) that represents the URL of the startpage in the settings UI. Adding the following line inside the initHomePageAndSearchEngineConfigUI function may resolve this issue:

vb.etCustomHomePageUrl.setText(settingsModel.homePage)

https://github.com/truefedex/tv-bro/blob/2bfd76b033253d5be0210b4e1107b2a1cbaf0da0/app/src/main/java/com/phlox/tvwebbrowser/activity/main/dialogs/settings/MainSettingsView.kt#L229

My1 commented 5 months ago

so it does properly save the home page but does not load the text into the textbox when you open settings?

MirrgieRiana commented 5 months ago

It looks like that. Just opening and closing the settings UI might erase the home page setting.