Fix 'calendar no longer available' for invited events
The shared-calendar removal guard checks allCalendarIds, which only contains the user's own + shared calendars. Invited events belong to the inviter's calendar, triggering a false positive. Skip the check for invited events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bafda61958
commit
496666ec5a
@ -242,9 +242,10 @@ export default function CalendarPage() {
|
||||
const selectedEventPermission = selectedEvent ? permissionMap.get(selectedEvent.calendar_id) ?? null : null;
|
||||
const selectedEventIsShared = selectedEvent ? sharedCalendarIds.has(selectedEvent.calendar_id) : false;
|
||||
|
||||
// Close panel if shared calendar was removed while viewing
|
||||
// Close panel if shared calendar was removed while viewing (skip for invited events)
|
||||
useEffect(() => {
|
||||
if (!selectedEvent || allCalendarIds.size === 0) return;
|
||||
if (selectedEvent.is_invited) return;
|
||||
if (!allCalendarIds.has(selectedEvent.calendar_id)) {
|
||||
handlePanelClose();
|
||||
toast.info('This calendar is no longer available');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user