Skip to content

Commit 8433730

Browse files
author
Camille Moussu
committed
[#520] fix event order flicker
1 parent d6e464a commit 8433730

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/components/Calendar/utils/calendarUtils.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ export const eventToFullCalendarFormat = (
8585
const isOrganiser = e.organizer
8686
? e.organizer.cal_address?.toLowerCase() === userAddress?.toLowerCase()
8787
: true; // if there are no organizer in the event we assume it was organized by the owner
88-
const isPersonnalEvent =
89-
extractEventBaseUuid(e.calId) === userId && isOrganiser;
88+
const isPersonnalEvent = extractEventBaseUuid(e.calId) === userId;
9089
const convertedEvent: CalendarEvent & {
9190
colors: Record<string, string> | undefined;
9291
editable: boolean;
@@ -95,8 +94,8 @@ export const eventToFullCalendarFormat = (
9594
...e,
9695
title: formatEventChipTitle(e, t),
9796
colors: e.color,
98-
editable: isPersonnalEvent,
99-
priority: isPersonnalEvent && !pending ? 1 : 0,
97+
editable: isPersonnalEvent && isOrganiser && !pending,
98+
priority: isPersonnalEvent ? 1 : 0,
10099
};
101100

102101
if (!isAllDay && e.start && eventTimezone) {

0 commit comments

Comments
 (0)