mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
mobile: fix selection in sidebar on app launch
This commit is contained in:
committed by
Abdullah Atta
parent
4e897dde47
commit
aba79c11d3
@@ -69,7 +69,6 @@ export const SelectionHeader = React.memo(
|
||||
const allSelected =
|
||||
items?.placeholders?.length === selectedItemsList.length;
|
||||
const focusedRouteId = useNavigationStore((state) => state.focusedRouteId);
|
||||
console.log(focusedRouteId, "focusedRouteId");
|
||||
useEffect(() => {
|
||||
if (selectionMode) {
|
||||
fluidTabsRef.current?.lock();
|
||||
|
||||
@@ -28,7 +28,7 @@ import useNavigationStore, {
|
||||
} from "../stores/use-navigation-store";
|
||||
import { useSelectionStore } from "../stores/use-selection-store";
|
||||
import { useSettingStore } from "../stores/use-setting-store";
|
||||
import { fluidTabsRef, rootNavigatorRef } from "../utils/global-refs";
|
||||
import { rootNavigatorRef } from "../utils/global-refs";
|
||||
|
||||
const RootStack = createNativeStackNavigator();
|
||||
const AppStack = createNativeStackNavigator();
|
||||
@@ -50,7 +50,8 @@ const AppNavigation = React.memo(
|
||||
React.useEffect(() => {
|
||||
setTimeout(() => {
|
||||
useNavigationStore.getState().update(homepage as keyof RouteParams);
|
||||
}, 1000);
|
||||
useNavigationStore.getState().setFocusedRouteId(homepage);
|
||||
}, 300);
|
||||
}, [homepage]);
|
||||
|
||||
return (
|
||||
@@ -171,15 +172,6 @@ export const RootNavigation = () => {
|
||||
screenOptions={{
|
||||
headerShown: false
|
||||
}}
|
||||
screenListeners={{
|
||||
focus: (props) => {
|
||||
if (props.target?.startsWith("FluidPanelsView")) {
|
||||
fluidTabsRef.current?.unlock();
|
||||
} else {
|
||||
fluidTabsRef.current?.lock();
|
||||
}
|
||||
}
|
||||
}}
|
||||
initialRouteName={introCompleted ? "FluidPanelsView" : "Welcome"}
|
||||
>
|
||||
<RootStack.Screen
|
||||
|
||||
Reference in New Issue
Block a user