OpenTails / CRUMPET-Android

The Brains For Your Tail Company Gear!
GNU General Public License v3.0
31 stars 7 forks source link

Fixed validation in the NamePicker component #116

Closed evgenibir closed 4 years ago

evgenibir commented 4 years ago

Fixed validation in the NamePicker component

Before these changes, we had to confirm the text entry twice or first enter a space

leinir commented 4 years ago

This feels oddly like a hackaround... That isn't to say the problem isn't there and solved by this, but the way it's solved here feels... really strange. Had a little brainwave, though, is this perhaps a misunderstanding, the cause of which being that it isn't clear that this dialog can be dismissed if you don't want to set a name? (in short, you can either tap the background outside the dlg, or swipe it away)

evgenibir commented 4 years ago

This feels oddly like a hackaround... That isn't to say the problem isn't there and solved by this, but the way it's solved here feels... really strange. Had a little brainwave, though, is this perhaps a misunderstanding, the cause of which being that it isn't clear that this dialog can be dismissed if you don't want to set a name? (in short, you can either tap the background outside the dlg, or swipe it away)

@leinir Before these changes, we had to confirm the text entry twice(confirm button and then press the create button ) or enter a space and then press the create button.

I fixed checking so that it checks both input text from IME and already entered text. Previously, only the previously entered was checked - This was the wrong approach.

I can also say that these changes did not affect the operation of the window. It can also be hidden as before. I tested it. Thanks!

leinir commented 4 years ago

Aah, yes, the IME problem... i'll do a little suggestion for a comment to go with this, because i feel like i'm going to come across this at some point in the future and get confused about it, so a reminder is good :)