Jasonette / JASONETTE-iOS

📡 Native App over HTTP, on iOS
https://www.jasonette.com
MIT License
5.27k stars 352 forks source link

alert should call error when the user cancels #305

Closed cpg closed 6 years ago

cpg commented 6 years ago

i am trying to make a simple switch that turns on a feature in the app. however, i need the user to confirm (in one case of switching it in one direction). i am doing that with a basic alert.

this is proving to be remarkably hard to do it both 1) a reliable way (where the switch does not fall out of sync) and 2) with a decent UX (e.g. asking the user if they are sure of applying the switch, as it's a major feature)

if the user cancels the switch needs to be reversed by the cancellation, but i have no way to hoon on the Cancel action from the user. i think alert should call an error (or cancel) if the user tapped on Cancel. this is kind of independent of the above, it's just that it would help for my case.

alternatively, please provide direction on how to do the above with 1 and 2 elements being met.

gliechtenstein commented 6 years ago

Fixed https://github.com/Jasonette/JASONETTE-iOS/commit/6b09cd91af321f622fa7739aab005ec9bdee30d3

And here's the Android counterpart: https://github.com/Jasonette/JASONETTE-Android/commit/30d066f8e176e87dd7bb46c9981470d15b95c352