Skip to content

fix: cancel reminders when note is moved to deleted or archived folder in edit screen#950

Merged
Crustack merged 8 commits intoCrustack:mainfrom
ulibte:deleted-in-edit-note
Apr 3, 2026
Merged

fix: cancel reminders when note is moved to deleted or archived folder in edit screen#950
Crustack merged 8 commits intoCrustack:mainfrom
ulibte:deleted-in-edit-note

Conversation

@ulibte
Copy link
Copy Markdown
Contributor

@ulibte ulibte commented Mar 25, 2026

The bug is that the reminder still notify even after I delete a note in the edit screen.
This doesn't happen when I delete notes in the action mode (when selecting multiple notes to delete).

I notice that in the BaseNoteModel.kt has this code:

when (folder) {
    Folder.NOTES -> app.scheduleNoteReminders(notes)
    else -> app.cancelNoteReminders(notes)
}

But in the edit note screen, the code only moves the note to the deleted folder without cancelling the reminders.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed reminder behavior when moving notes to different folders—reminders are now automatically cancelled when moving a note outside the main notes folder.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 11f5a210-6d74-4898-aa0f-100fc9a11b47

📥 Commits

Reviewing files that changed from the base of the PR and between 6c931aa and 61ab7c2.

📒 Files selected for processing (1)
  • app/src/main/java/com/philkes/notallyx/presentation/activity/note/NoteActionHandler.kt

📝 Walkthrough

Walkthrough

The moveNote() function in NoteActionHandler.kt now conditionally cancels note reminders when moving notes to folders other than Folder.NOTES. Reminder cancellation logic executes before updating the note's folder state and finishing the activity.

Changes

Cohort / File(s) Summary
Reminder Cancellation on Note Move
app/src/main/java/com/philkes/notallyx/presentation/activity/note/NoteActionHandler.kt
Added conditional reminder cancellation in moveNote() when destination folder is not Folder.NOTES. Constructs NoteIdReminder and invokes reminder cancellation before folder state update. Added imports for NoteIdReminder and cancelNoteReminders.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 When notes take flight to distant places,
Their reminders must know all the traces,
We cancel with care before they roam,
To keep each reminder safe at home! 📬

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: canceling reminders when notes are moved to deleted or archived folders from the edit screen.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crustack
Copy link
Copy Markdown
Owner

Crustack commented Apr 3, 2026

Thanks, looks like I overlooked that scenario :)

@Crustack Crustack merged commit 606e242 into Crustack:main Apr 3, 2026
1 check passed
@Crustack Crustack added bug Something isn't working v7.11.0 labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working v7.11.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants