'Ta nå' + 'Angre' on a not-yet-due dose leaves a PENDING log with a future scheduledAt; armAll() (every app start/update) then resumed 'escalation' for it as if it were overdue — nagging hours early. Three layers: armAll only resumes escalation for past-due logs, the escalation receiver drops anything scheduled in the future (defense in depth), and undo resets nagCount + cancels any escalation so stale counts can't eat the real quota when the dose actually falls due. Emulator-verified with both cases side by side: past-due PENDING nags within the minute, future PENDING stays silent. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| schemas/no.naiv.meddetsamme.data.MedDatabase | ||
| src | ||
| build.gradle.kts | ||