diff --git a/config.php b/config.php index 1b11696..537e89e 100644 --- a/config.php +++ b/config.php @@ -1,7 +1,7 @@ " suffix (which denotes an appointment). if (newLocalIds.size) { for (const id of newLocalIds) state.recentlyCreatedIds.delete(id); - pulseCards(newLocalIds, 'card-pulse-local'); + const toPulse = new Set(); + for (const id of newLocalIds) { + const card = state.cards.find(c => String(c.id) === id); + if (!card) continue; + const isJournal = /^\d{4}-\d{2}-\d{2}$/.test((card.title || '').trim()) + && !/^\d{4}-\d{2}-\d{2}\s*[—-]\s*.+/.test(card.title || '') + && !card.caldav_uid + && !(card.tags || '').split(',').some(t => t === 'termin' || t === 'geburtstag'); + if (!isJournal) toPulse.add(id); + } + if (toPulse.size) pulseCards(toPulse, 'card-pulse-local'); } // Remote (relay-synced) cards: pulse 3× only when the user is on // the all view. On other views, the unseen ids accumulate and