Jman012 / Toxicity

An iOS Tox client for the iPhone.
Apache License 2.0
58 stars 14 forks source link

Crash when pressing "Paste & Go" button if field is not empty. #33

Closed wiruzx closed 10 years ago

wiruzx commented 10 years ago

In requests viewController, when you trying add friend, in alertView if input field isn't empty and you tap on "past & go" button app will crash. Also i think we need "Cancel" button.

Jman012 commented 10 years ago

Someone else reported that, I couldn't reproduce it, and I tried adding error checking. @wiruzx Do you know what was on your pasteboard?

Only thing with 3 buttons is they become vertical, and Apple's alertView doesn't like 3 buttons + input field.

wiruzx commented 10 years ago

Sorry, that's mistake. It always crash. vxmihaylenko fixing this now

Jman012 commented 10 years ago

Oh, odd.

wiruzx commented 10 years ago

Speaking about cancel button - I know. I trying add cancel button and it's a little ugly. So maybe we should use something instead UIAlertView? What do you think?

Jman012 commented 10 years ago

@wiruzx Can we dynamically rename buttons? If the field is empty, have the left button be "Cancel" and once text is inputted have it be "Okay"

That, or just have a "Paste & Go" button and a "Cancel" as the user will not likely manually type in the 76-char ID's.

wiruzx commented 10 years ago

I think it will be a little confusing for user. But we can automatically paste ID from clipboard, if it match regexp. And there will be just "Ok" and "Cancel" buttons

wiruzx commented 10 years ago

if the user wants to type ID himself, we can select all the text, so when he started typing, all text will be replaced.

Jman012 commented 10 years ago

Or we could consolidate the two buttons, Camera and Add button into one which brings up a UIActionSheet, with QR Code, ID from Clipboard, and Manual.

wiruzx commented 10 years ago

Sounds good.

Jman012 commented 10 years ago

I'll work on that then, @wiruzx