Stabilize sidebar workspace press handler

This commit is contained in:
Mohamed Boudra
2026-04-22 14:14:34 +07:00
parent f422dabf1e
commit 3c5bfd6e3d
+5 -1
View File
@@ -379,6 +379,10 @@ function MobileSidebar({
windowWidth, windowWidth,
]); ]);
const handleWorkspacePress = useCallback(() => {
closeToAgent();
}, [closeToAgent]);
const closeGesture = useMemo( const closeGesture = useMemo(
() => () =>
Gesture.Pan() Gesture.Pan()
@@ -513,7 +517,7 @@ function MobileSidebar({
projects={projects} projects={projects}
isRefreshing={isManualRefresh && isRevalidating} isRefreshing={isManualRefresh && isRevalidating}
onRefresh={handleRefresh} onRefresh={handleRefresh}
onWorkspacePress={() => closeToAgent()} onWorkspacePress={handleWorkspacePress}
onAddProject={handleOpenProject} onAddProject={handleOpenProject}
parentGestureRef={closeGestureRef} parentGestureRef={closeGestureRef}
/> />