Skip to content

TagSpaces is an offline, open source, document manager with tagging support

update fullWidth dimensions on open file

sytolk4724e2c40208
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsx
index b95b9c286..9886364a5 100644
--- a/app/containers/MainPage.tsx
+++ b/app/containers/MainPage.tsx
@@ -326,6 +326,10 @@ const MainPage = (props: Props) => {
setDrawerOpened(!props.isEntryInFullWidth);
}, [props.isEntryInFullWidth]);
+ useEffect(() => {
+ updateDimensions();
+ }, [props.openedFiles]);
+
useEventListener('resize', () => {
if (!AppConfig.isCordova) {
updateDimensions();