lazerwalker / cortado

Caffeine tracking for everyone
MIT License
170 stars 29 forks source link

Correcting Date crashing #16

Open alesnehapriya opened 5 years ago

alesnehapriya commented 5 years ago

Resolved the date crashing issue when updating the List AddConsumptionViewController class.

lazerwalker commented 5 years ago

Hi! First of all, thanks for this!

Can you give me some info on how you were able to reproduce and test this? From looking at your patch, I'm not sure how this would actually fix a date crashing issue, but I'd be curious to hear what I might be missing.

alesnehapriya commented 5 years ago

Hi @lazerwalker ,

Steps to reproduce-

  1. Add one event of the caffine in the main page of cortado.
  2. Click on the cell where it has recorded the event already.
  3. Click on Time field and Change/ Alter the date.
  4. Click on Done.

App crashes.

Resolution- This fix is more of incorrect implementation of switch case. Probably when the delegate of displaying cell is called, which in turn goes to switch case and the code breaks due to break statement missing.