mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-01-25 21:38:30 -06:00
Should properly defer when disabling recurrence
This commit is contained in:
@@ -46,7 +46,7 @@ class EventCommand(
|
||||
.map(EventRecurrence.Frequency::valueOf)
|
||||
.orElse(EventRecurrence.Frequency.WEEKLY)
|
||||
|
||||
shouldRecur && (frequency != EventRecurrence.Frequency.WEEKLY)
|
||||
!shouldRecur && (frequency != EventRecurrence.Frequency.WEEKLY)
|
||||
}
|
||||
else -> true
|
||||
}
|
||||
@@ -581,8 +581,7 @@ class EventCommand(
|
||||
return
|
||||
}
|
||||
|
||||
val modifiedWizard = if (shouldRecur)
|
||||
existingWizard.copy(entity = existingWizard.entity.copy(recur = true, recurrence = EventRecurrence(frequency, interval, count)))
|
||||
val modifiedWizard = if (shouldRecur) existingWizard.copy(entity = existingWizard.entity.copy(recur = true, recurrence = EventRecurrence(frequency, interval, count)))
|
||||
else existingWizard.copy(entity = existingWizard.entity.copy(recur = false, recurrence = null))
|
||||
calendarService.putEventWizard(modifiedWizard)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user