Skip to content

notifications: show notifications for all active dates #505

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lua/orgmode/notifications/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function Notifications:get_tasks(time)
local tasks = {}
for _, orgfile in ipairs(self.files:all()) do
for _, headline in ipairs(orgfile:get_opened_unfinished_headlines()) do
for _, date in ipairs(headline:get_deadline_and_scheduled_dates()) do
for _, date in ipairs(headline:get_valid_dates_for_agenda()) do
local reminders = self:_check_reminders(date, time)
for _, reminder in ipairs(reminders) do
table.insert(tasks, {
Expand Down Expand Up @@ -140,6 +140,9 @@ function Notifications:_check_reminders(date, time)
if date:is_scheduled() and not notifications.scheduled_reminder then
return result
end
if date.is_date_range_end then
return result
end

if notifications.repeater_reminder_time and date:get_repeater() then
local repeater_time = date:apply_repeater_until(time)
Expand Down