fix chat quote reader (#4125)
This commit is contained in:
@@ -90,6 +90,14 @@ const OutLink = (props: Props) => {
|
||||
const totalRecordsCount = useContextSelector(ChatRecordContext, (v) => v.totalRecordsCount);
|
||||
const isChatRecordsLoaded = useContextSelector(ChatRecordContext, (v) => v.isChatRecordsLoaded);
|
||||
|
||||
const [sidebarFolded, setSidebarFolded] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
if (quoteData) {
|
||||
setSidebarFolded(true);
|
||||
}
|
||||
}, [quoteData]);
|
||||
|
||||
const initSign = useRef(false);
|
||||
const { data, loading } = useRequest2(
|
||||
async () => {
|
||||
@@ -221,7 +229,9 @@ const OutLink = (props: Props) => {
|
||||
if (showHistory !== '1') return null;
|
||||
|
||||
return isPc ? (
|
||||
<SideBar externalTrigger={!!quoteData}>{Children}</SideBar>
|
||||
<SideBar isFolded={sidebarFolded} onFoldChange={setSidebarFolded}>
|
||||
{Children}
|
||||
</SideBar>
|
||||
) : (
|
||||
<Drawer
|
||||
isOpen={isOpenSlider}
|
||||
@@ -236,7 +246,7 @@ const OutLink = (props: Props) => {
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
);
|
||||
}, [isOpenSlider, isPc, onCloseSlider, quoteData, showHistory, t]);
|
||||
}, [isOpenSlider, isPc, onCloseSlider, showHistory, t, sidebarFolded]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user