Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: Enforce unsetting openfile when the viewer is closed
Signed-off-by: Louis Chemineau <[email protected]>
  • Loading branch information
artonge authored and backportbot[bot] committed Jul 17, 2024
commit 35ca6a78aa22dfccb9115d5824d815f795c8dec4
6 changes: 5 additions & 1 deletion src/services/FilesActionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export default function(node, view, dir) {
{ ...window.OCP.Files.Router.query },
true,
]
const onClose = () => window.OCP.Files.Router.goToRoute(...oldRoute)
const onClose = () => {
// This can sometime be called with the openfile set to true already. But we don't want to keep openfile when closing the viewer.
delete oldRoute[2].openfile
window.OCP.Files.Router.goToRoute(...oldRoute)
}
pushToHistory(node, view, dir)
OCA.Viewer.open({ path, onPrev: pushToHistory, onNext: pushToHistory, onClose })
}
Expand Down