MediaViewer: Fixed navigate
This commit is contained in:
parent
b3558f0f66
commit
0fef451f28
@ -95,7 +95,8 @@ const useFiles = ({
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isAccountsPage || isSettingsPage) return;
|
||||
if (isAccountsPage || isSettingsPage || location.state?.fromMediaViewer)
|
||||
return;
|
||||
|
||||
if (location.pathname === "/") setIsLoading(true, true, true);
|
||||
else setIsLoading(true, false, false);
|
||||
|
@ -205,7 +205,13 @@ const FilesMediaViewer = (props) => {
|
||||
setScrollToItem({ id: targetFile.id, type: "file" });
|
||||
}
|
||||
|
||||
window.history.replaceState(null, "", url);
|
||||
navigate(url, {
|
||||
replace: true,
|
||||
state: {
|
||||
...location.state,
|
||||
fromMediaViewer: true,
|
||||
},
|
||||
});
|
||||
},
|
||||
[
|
||||
files,
|
||||
|
Loading…
Reference in New Issue
Block a user