Skip to content

fix: todo state in notifications #1005

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Maltimore
Copy link
Contributor

@Maltimore Maltimore commented Jun 30, 2025

Summary

If the TODO state of a note was nothing, it showed as nil in the notification.

edit: the notificaionts-popup notifications don't work for me, so I only tested the cron notifications via notify-send.

Checklist

I confirm that I have:

  • Followed the
    Conventional Commits
    specification
    (e.g., feat: add new feature, fix: correct bug,
    docs: update documentation).
  • My PR title also follows the conventional commits specification.
  • Updated relevant documentation, if necessary.
  • Thoroughly tested my changes.
  • [n/a] Added tests (if applicable) and verified existing tests pass with
    make test.
  • Checked for breaking changes and documented them, if any.

utils.concat(result, {
string.format('# %s (%s)', task.category, task.humanized_duration),
string.format('%s %s %s', string.rep('*', task.level), task.todo, task.title),
string.format('%s %s %s', string.rep('*', task.level), todo, task.title),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for if else above. This is enough.
Same thing for below.

Suggested change
string.format('%s %s %s', string.rep('*', task.level), todo, task.title),
string.format('%s %s %s', string.rep('*', task.level), task.todo or '', task.title),

@Maltimore Maltimore force-pushed the notifications_fix_nil_todo_state branch from 97ffdeb to 32e4d0e Compare June 30, 2025 12:47
@Maltimore
Copy link
Contributor Author

Thanks for your guidance! I've updated the PR accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants