Filters one-time events to avoid duplicates
Ensures that one-time events exclude recurring events, preventing duplicate entries. This resolves an issue where recurring events were incorrectly included in the list of one-time events, leading to events being displayed multiple times.
This commit is contained in:
parent
706ceea84b
commit
a27a8232f2
1 changed files with 2 additions and 2 deletions
|
|
@ -256,8 +256,8 @@ export class ScheduledEventService extends BaseService {
|
|||
getTodaysEvents(userPubkey?: string): ScheduledEvent[] {
|
||||
const today = new Date().toISOString().split('T')[0]
|
||||
|
||||
// Get one-time events for today
|
||||
const oneTimeEvents = this.getEventsForDate(today)
|
||||
// Get one-time events for today (exclude recurring events to avoid duplicates)
|
||||
const oneTimeEvents = this.getEventsForDate(today).filter(event => !event.recurrence)
|
||||
|
||||
// Get all events and check for recurring events that occur today
|
||||
const allEvents = this.getScheduledEvents()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue