[#475] fixed calendars selection persistence (#479)

This commit is contained in:
Camille Moussu
2026-01-26 11:14:42 +01:00
committed by GitHub
parent 7058f1c2d6
commit 1fc85e141e
5 changed files with 60 additions and 23 deletions
+4 -1
View File
@@ -17,6 +17,7 @@ export function WebSocketGate() {
);
const [isSocketOpen, setIsSocketOpen] = useState(false);
const isPending = useAppSelector((state) => state.calendars.pending);
const calendarList = useSelectedCalendars();
const tempCalendarList = Object.keys(
@@ -73,13 +74,15 @@ export function WebSocketGate() {
// Register using a diff with previous calendars
useEffect(() => {
if (isPending) return;
syncCalendarRegistrations(
isSocketOpen,
socketRef,
calendarList,
previousCalendarListRef
);
}, [isSocketOpen, calendarList]);
}, [isSocketOpen, calendarList, isPending]);
useEffect(() => {
syncCalendarRegistrations(