Reminders: Compute updated target time when snoozing in RemindersViewModel

Open Beginner friendly
#41 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
kotlin
Domain
backend, mobile

Research direction

Start in feature/reminders/src/commonMain/kotlin/com/yaan/feature/reminders/RemindersViewModel.kt at the RemindersIntent.SnoozeReminder handling, then check how ReminderRepository.updateReminder persists changes and where its unit tests live. Update the target time using the stated snooze offset and add a test asserting it is in the future; done when the snoozed reminder is persisted with the new timestamp.

Written by the indexing model from the issue text.

Description

enhancement
Summary

In feature/reminders/src/commonMain/kotlin/com/yaan/feature/reminders/RemindersViewModel.kt, RemindersIntent.SnoozeReminder updates the AlarmAckState to SNOOZED but leaves targetTimeEpochMs unchanged in the past.

Scope
  • When snoozing, compute updated targetTimeEpochMs = Clock.System.now().toEpochMilliseconds() + snoozeOffsetMs (default 10 minutes / 600,000ms).
  • Persist the rescheduled reminder through ReminderRepository.updateReminder.
  • Add unit test asserting new target timestamp is in the future.
Dominant language
Kotlin
Stars
1
Forks
0
Avg merge
4m
Merged PRs (30d)
12

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from developmentwithyash/yaan

All issues in developmentwithyash/yaan

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.