Resolve the exhaustive-deps findings and attach cause to the rethrown errors. [skip build]
This commit is contained in:
@@ -176,7 +176,7 @@ export function IncomingCallNotification() {
|
||||
checkForIncomingCalls();
|
||||
}
|
||||
},
|
||||
[checkForIncomingCalls, declinedRooms, mx],
|
||||
[checkForIncomingCalls, mx],
|
||||
);
|
||||
|
||||
// Set up event listeners
|
||||
|
||||
@@ -1187,7 +1187,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
||||
return () => {
|
||||
persistTimelineScroll(roomId);
|
||||
};
|
||||
}, [room.roomId, persistTimelineScroll]);
|
||||
}, [room, persistTimelineScroll]);
|
||||
|
||||
// Keep scroll cache updated while reading (useEffect cleanup runs after DOM teardown).
|
||||
useEffect(() => {
|
||||
@@ -1216,7 +1216,7 @@ export function RoomTimeline({ room, eventId, roomInputRef, editor }: RoomTimeli
|
||||
window.cancelAnimationFrame(raf);
|
||||
scrollEl.removeEventListener('scroll', onScroll);
|
||||
};
|
||||
}, [room.roomId, eventId, persistTimelineScroll]);
|
||||
}, [room, eventId, persistTimelineScroll]);
|
||||
|
||||
// Restore saved scroll or default to bottom on first open.
|
||||
useLayoutEffect(() => {
|
||||
|
||||
@@ -726,13 +726,7 @@ export function Audio({ requestClose }: AudioProps) {
|
||||
console.error('Microphone monitoring failed:', e);
|
||||
}
|
||||
}
|
||||
}, [
|
||||
micMonitoring,
|
||||
settings.microphoneId,
|
||||
settings.noiseSuppression,
|
||||
settings.echoCancellation,
|
||||
settings.autoGainControl,
|
||||
]);
|
||||
}, [micMonitoring, settings]);
|
||||
|
||||
// Cleanup monitoring on unmount
|
||||
useEffect(
|
||||
|
||||
@@ -52,11 +52,9 @@ export function Permissions({ requestClose }: PermissionsProps) {
|
||||
useRecursiveChildScopeFactory(mx, roomToParents),
|
||||
);
|
||||
|
||||
// Combine both spaces and rooms for syncing
|
||||
const allChildren = [...childSpaces, ...childRooms];
|
||||
|
||||
// Calculate which children we can sync to
|
||||
const { syncableChildren, nonSyncableChildren } = useMemo(() => {
|
||||
const allChildren = [...childSpaces, ...childRooms];
|
||||
const syncable: string[] = [];
|
||||
const nonSyncable: { roomId: string; name: string }[] = [];
|
||||
|
||||
@@ -97,7 +95,7 @@ export function Permissions({ requestClose }: PermissionsProps) {
|
||||
});
|
||||
|
||||
return { syncableChildren: syncable, nonSyncableChildren: nonSyncable };
|
||||
}, [allChildren, mx]);
|
||||
}, [childSpaces, childRooms, mx]);
|
||||
|
||||
const [syncState, syncPermissions] = useAsyncCallback(
|
||||
useCallback(async () => {
|
||||
|
||||
Reference in New Issue
Block a user