1 parent
648556f762
commit
99ee3385ac
69 files changed
+1423
-1365
No files matched your search
@@ -409,9 +409,7 @@ function calendarReminderStorageKey(event, minutes) {
|
||||
return `rustbox.calendarReminder.${state.accountId || "account"}.${event.id}.${event.start_time}.${minutes}`;
|
||||
}
|
||||
|
||||
// Timed events: start minus the reminder. All-day events: the reminder counts
|
||||
// from the start of the working day (calendar settings, default 09:00) of the
|
||||
// event's date, so "1 day before" fires the previous morning, not at midnight.
|
||||
// All-day events are reminded relative to the start of the working day.
|
||||
function calendarReminderTrigger(event, minutes) {
|
||||
const offset = Math.max(0, Number(minutes) || 0) * 60000;
|
||||
if (event.all_day) {
|
||||
@@ -476,10 +474,7 @@ function isDuplicateRealtimeEvent(payload) {
|
||||
const now = Date.now();
|
||||
for (const [key, seenAt] of state.realtimeSeenEvents) if (now - seenAt > 10000) state.realtimeSeenEvents.delete(key);
|
||||
|
||||
// Server websocket envelopes carry a unique eventId. When present it is the
|
||||
// only safe deduplication key: state can legitimately cycle A -> B -> A in
|
||||
// under a second (for example unread 1 -> 0 -> 1). Fingerprint-based
|
||||
// deduplication would incorrectly drop the second A and leave stale UI.
|
||||
// Deduplicate by eventId when present: the same state can legitimately repeat.
|
||||
if (payload.eventId) {
|
||||
const idKey = `id:${payload.eventId}`;
|
||||
const duplicate = state.realtimeSeenEvents.has(idKey);
|
||||
|
||||
Reference in new issue
Block a user