ashfurrow / FunctionalReactivePixels

A demonstration of how to use FRP with ReactiveCocoa in an iOS context using the 500px API.
https://leanpub.com/iosfrp
MIT License
700 stars 92 forks source link

Vote button disabled after cancelled login in FRPPhotoDetailViewController #29

Open andrask opened 10 years ago

andrask commented 10 years ago

When the vote button is pushed and the user is not logged in, the login screen is shown. If this is cancelled, the Vote button stays disabled and the FRPPhotoDetailViewController can only be dismissed with Done. Failed login should be handled correctly.

ashfurrow commented 10 years ago

Good catch – I'll take a look.

andrask commented 10 years ago

I'm not actually sure why but after Cancel the signal returned by voteForPhoto: is not executed.

andrask commented 10 years ago

Something sneaky is going on inside. The request for voting seems to be started but it never finishes and nothing happens. I went down to PXRequest, I see this line firing, and then nothing happens, none of the delegate methods are called.

I know that NSURLConnection is being deprecated in favor of NSURLSession but this should not mean that it stops working. Do you have any insight?

On the other hand, the login sends a synchronous request which seems to work fine.