Skip to content

Commit 03863e9

Browse files
fix(notifications): ignore repeater dates that are same as original date
1 parent c1005a0 commit 03863e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/orgmode/notifications/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ end
133133
---@returns table|nil
134134
function Notifications:_check_reminders(date, time)
135135
local result = {}
136-
local notifications = config.notifications
136+
local notifications = config.notifications or {}
137137
if date:is_deadline() and not notifications.deadline_reminder then
138138
return result
139139
end
@@ -145,7 +145,7 @@ function Notifications:_check_reminders(date, time)
145145
local repeater_time = date:apply_repeater_until(time)
146146
local times = utils.ensure_array(notifications.repeater_reminder_time)
147147
local minutes = repeater_time:diff(time, 'minute')
148-
if vim.tbl_contains(times, minutes) then
148+
if not date:is_same(repeater_time) and vim.tbl_contains(times, minutes) then
149149
table.insert(result, {
150150
reminder_type = 'repeater',
151151
time = repeater_time:without_adjustments(),

0 commit comments

Comments
 (0)