CorruptedArk / did-i-take-my-meds

A Kotlin Android app to manage medications
GNU General Public License v3.0
172 stars 14 forks source link

Remaining doses off by 1 after history remove or edit. #63

Closed jmichael2497 closed 11 months ago

jmichael2497 commented 2 years ago

Describe the bug Remaining doses off by 1 after history remove or edit.

To Reproduce Steps to reproduce the behavior:

  1. Go to dose taken history.
  2. Click to remove entry or hold to edit time taken.
  3. See remaining doses count not what expected.

Expected behavior Removing only the last taken history entry should restore the dose count automatically (for fixing accidental taken taps) otherwise remind user to do that manually if needed. Editing entry time taken (for example moving a few hours earlier) should not deduct 2nd dose.

Smartphone (please complete the following information):

Additional context I noticed remainder was off by 3 within a month, and I might forget a dose, but certainly would not take more than 1 in a day. At least once I accidentally marked taken on the wrong thing. Sometimes I get distracted and forgot to mark taken for a few hours, but wanting more precise data I will mark taken and then edit the time.

Thanks for a useful app making it easier to avoid missing days.