In MainActivity.java, a collapsing toolbar was added via pull request #1, the toolbar shows a welcome prompt to the user and the no. of healings they have done today and yesterday (separately) for all patients. However, deleting a patient record with existing healing in the mentioned timeframe causes the counters to go wrong.
Expected Behaviour
When a patient record is deleted, the counter should decrement by the no. of healings for that patient in the respective timeframes.
Observed Behaviour
When a patient record is deleted with healings in the specific timeframe (yesterday or today), the counter is subtracting the no. of healings multiple times which makes it inaccurate.
Known temporary fix
On restarting the activity, the counters are restored correctly.
Brief Summary
In MainActivity.java, a collapsing toolbar was added via pull request #1, the toolbar shows a welcome prompt to the user and the no. of healings they have done today and yesterday (separately) for all patients. However, deleting a patient record with existing healing in the mentioned timeframe causes the counters to go wrong.
Expected Behaviour
When a patient record is deleted, the counter should decrement by the no. of healings for that patient in the respective timeframes.
Observed Behaviour
When a patient record is deleted with healings in the specific timeframe (yesterday or today), the counter is subtracting the no. of healings multiple times which makes it inaccurate.
Known temporary fix
On restarting the activity, the counters are restored correctly.
Reference files
MainActivity.java
activity_main.xml