Skip to content

Commit

Permalink
Merge pull request #2370 from nextcloud/backport/2368/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
skjnldsv authored Jul 26, 2024
2 parents 4bac777 + 4c445f7 commit 0be2f87
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/viewer-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/viewer-main.js.map

Large diffs are not rendered by default.

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

0 comments on commit 0be2f87

Please sign in to comment.