fix: force sync after all calendar event operations
All create, update, and delete operations now trigger an immediate forced refresh from providers instead of relying on stale cache. Previously, deleting recurring events left ghost instances visible until the next background sync cycle. v1.74.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8d8ba73d17
commit
3b1deb80e1
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "my-weekly-todo-list",
|
||||
"version": "1.74.1",
|
||||
"version": "1.74.2",
|
||||
"description": "A web-based weekly task management application that organizes to-dos and calendar events in a single, intuitive weekly view",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -2689,9 +2689,8 @@ export default function WeeklyView() {
|
||||
return [...prev, frontendEvent];
|
||||
});
|
||||
}
|
||||
// Re-read events - force refresh for recurring events so all instances expand
|
||||
const isRecurring = !!(eventData.recurrence && eventData.recurrence !== 'none');
|
||||
await fetchCalendarEvents(isRecurring);
|
||||
// Force refresh to get canonical state from providers
|
||||
await fetchCalendarEvents(true);
|
||||
} catch (error: any) {
|
||||
console.error("Error saving event:", error);
|
||||
if (error.name === "AbortError") {
|
||||
@ -2757,7 +2756,8 @@ export default function WeeklyView() {
|
||||
e.id !== eventId && e.recurringEventId !== seriesId && e.id !== seriesId
|
||||
));
|
||||
}
|
||||
setTimeout(() => fetchCalendarEvents(false), 2000);
|
||||
// Force refresh to get canonical state from providers
|
||||
await fetchCalendarEvents(true);
|
||||
} catch (error) {
|
||||
console.error("Error deleting event:", error);
|
||||
throw error;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user