Prevent from crashing when pasting into Last.fm key/secret textboxes
fixes #611
I wouldn't know of a reason why lastfm_api_key_input and lastfm_api_secret_input shouldn't be checked for sameness. As far as I understand, if they are marked as ignore, pasting some larger text won't update the input field's inner data model properly, hence the panic.
Hmm, I wasn't able to reproduce this issue before but the #[data(ignore)] was intentional because the input of these fields shouldn't be driving any comparison, we shouldn't be saving their content at all until we press the "Connect" button.
I think this is a Druid bug perhaps... and maybe we need to limit the length of this field (which is good anyway given that the API secret and key have well-know lengths).
we shouldn't be saving their content at all until we press the "Connect" button
By saving you mean holding it in memory? I can hardly imagine that the Authentication struct is saved to disk as soon as it is updated. If it is, by that logic, access_token should also be flagged as ignore, no?
I mean that the partial data saved within the field shouldn't be saved, these fields should only pass data in the attempt to authenticate with Last.fm. I think the solution can simply be to make sure the api and secret are the exact length needed by Last.fm. Would you be willing to make that edit?
I mean that the partial data saved within the field shouldn't be saved, these fields should only pass data in the attempt to authenticate with Last.fm. I think the solution can simply be to make sure the api and secret are the exact length needed by Last.fm. Would you be willing to make that edit?
Hmm, I am unsure how to implement a length limiter for the TextBox in Druid. Can you maybe give me some pointers where I should look and what to consider?