EmmaTellblom / Mensinator

MIT License
21 stars 5 forks source link

Symptoms Not Updating in Calendar View When Activated/Deactivated #27

Closed EmmaTellblom closed 1 month ago

EmmaTellblom commented 1 month ago

Description

When a symptom is applied to a date in the current month view of the calendar and is then directly inactivated, it continues to show in the calendar view. The symptoms only update correctly when switching to another month and then returning to the original month.

Steps to Reproduce

  1. Open the calendar view for the current month.
  2. Apply a symptom to a date.
  3. Immediately inactivate the symptom.
  4. Observe that the symptom still appears in the calendar view for the current month.
  5. Switch to another month and then return to the original month.

Expected Behavior

The calendar view should reflect the updated status of the symptoms immediately after a symptom is activated or deactivated, without needing to navigate away and back.

Actual Behavior

The symptom remains visible in the calendar view even after being deactivated until another month is viewed and then returned to the original month.

Proposed Solution

Implement a mechanism to re-render or refresh the symptoms in the current month view whenever a symptom is activated or deactivated. This will ensure that the calendar view is always up-to-date with the latest symptom statuses.

Additional Information

This issue affects the visibility of symptoms in the calendar view and can lead to inconsistencies in user experience.

EmmaTellblom commented 1 month ago

Really low priority

EmmaTellblom commented 1 month ago

Fixed. Added logic for handling onSave() from ManageSymptomsDialog and CalendarScreen. When pressing save in ManageSymptomDialog we re-render the calendar using refreshSymptomDates()