From 2e46e27490b08a5da66e8e3b64e3c7251f2a5e09 Mon Sep 17 00:00:00 2001 From: David Luzar Date: Fri, 14 Jul 2023 20:21:02 +0200 Subject: [PATCH] fix: use actual dock state to not close docked library on insert (#6766) --- src/components/App.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/App.tsx b/src/components/App.tsx index 611ff47b..7f747dbd 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -330,6 +330,7 @@ import { activeConfirmDialogAtom } from "./ActiveConfirmDialog"; import { actionWrapTextInContainer } from "../actions/actionBoundText"; import BraveMeasureTextError from "./BraveMeasureTextError"; import { activeEyeDropperAtom } from "./EyeDropper"; +import { isSidebarDockedAtom } from "./Sidebar/Sidebar"; const AppContext = React.createContext(null!); const AppPropsContext = React.createContext(null!); @@ -473,8 +474,6 @@ class App extends React.Component { name, width: window.innerWidth, height: window.innerHeight, - showHyperlinkPopup: false, - defaultSidebarDockedPreference: false, }; this.id = nanoid(); @@ -2031,7 +2030,7 @@ class App extends React.Component { openSidebar: this.state.openSidebar && this.device.canDeviceFitSidebar && - this.state.defaultSidebarDockedPreference + jotaiStore.get(isSidebarDockedAtom) ? this.state.openSidebar : null, selectedElementIds: nextElementsToSelect.reduce(