mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2025-12-06 00:20:05 +01:00
This commit is contained in:
parent
a304b8d0a1
commit
c6c2edc261
|
|
@ -134,6 +134,7 @@ const FileManager: FC<FileManagerProps> = ({
|
||||||
);
|
);
|
||||||
const [permission, setPermission] = useState<PermissionState>("prompt");
|
const [permission, setPermission] = useState<PermissionState>("prompt");
|
||||||
const requestingPermissions = useRef(false);
|
const requestingPermissions = useRef(false);
|
||||||
|
const focusedOnLoad = useRef(false);
|
||||||
const onKeyDown = useMemo(
|
const onKeyDown = useMemo(
|
||||||
() => (renaming === "" ? keyShortcuts() : undefined),
|
() => (renaming === "" ? keyShortcuts() : undefined),
|
||||||
[keyShortcuts, renaming]
|
[keyShortcuts, renaming]
|
||||||
|
|
@ -207,8 +208,9 @@ const FileManager: FC<FileManagerProps> = ({
|
||||||
}, [currentUrl, folderActions, url]);
|
}, [currentUrl, folderActions, url]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!loading && !isDesktop && !isStartMenu) {
|
if (!focusedOnLoad.current && !loading && !isDesktop && !isStartMenu) {
|
||||||
fileManagerRef.current?.focus(PREVENT_SCROLL);
|
fileManagerRef.current?.focus(PREVENT_SCROLL);
|
||||||
|
focusedOnLoad.current = true;
|
||||||
}
|
}
|
||||||
}, [isDesktop, isStartMenu, loading]);
|
}, [isDesktop, isStartMenu, loading]);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ export const useSnapshots = (): Snapshot => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Update icon but don't focus
|
|
||||||
updateFolder(dirname(savePath));
|
updateFolder(dirname(savePath));
|
||||||
updateFolder(savePath, saveName);
|
updateFolder(savePath, saveName);
|
||||||
} catch {
|
} catch {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user