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:
padreug 2025-10-23 03:56:03 +02:00
parent 706ceea84b
commit a27a8232f2

View file

@ -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()