Skip to content

Commit

Permalink
Merge pull request #2326 from nextcloud/backport/2322/stable29
Browse files Browse the repository at this point in the history
[stable29] Properly save old route when opening the viewer
  • Loading branch information
artonge authored Jun 6, 2024
2 parents 9efeaba + 43bf44e commit 667001f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions css/viewer-index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/viewer-main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ var b4=Object.defineProperty;var y4=(e,r,a)=>r in e?b4(e,r,{enumerable:!0,config
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/function Pj(e,r,a){const n="".concat(e.dirname,"/").concat(e.basename).replace(/^\/\//,"/"),i=[window.OCP.Files.Router.name,window.OCP.Files.Router.params,window.OCP.Files.Router.query,!0],s=()=>window.OCP.Files.Router.goToRoute(...i);ah(e,r,a),OCA.Viewer.open({path:n,onPrev:ah,onNext:ah,onClose:s})}function ah(e,r,a){window.OCP.Files.Router.goToRoute(null,{view:r.id,fileid:e.fileid},{dir:a,openfile:!0},!0)}/**
*/function Pj(e,r,a){const n="".concat(e.dirname,"/").concat(e.basename).replace(/^\/\//,"/"),i=[window.OCP.Files.Router.name,{...window.OCP.Files.Router.params},{...window.OCP.Files.Router.query},!0],s=()=>window.OCP.Files.Router.goToRoute(...i);ah(e,r,a),OCA.Viewer.open({path:n,onPrev:ah,onNext:ah,onClose:s})}function ah(e,r,a){window.OCP.Files.Router.goToRoute(null,{view:r.id,fileid:e.fileid},{dir:a,openfile:!0},!0)}/**
* @copyright Copyright (c) 2020 Azul <azul@riseup.net>
*
* @author Azul <azul@riseup.net>
Expand Down
2 changes: 1 addition & 1 deletion js/viewer-main.mjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/services/FilesActionHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export default function(node, view, dir) {
const path = `${node.dirname}/${node.basename}`.replace(/^\/\//, '/')
const oldRoute = [
window.OCP.Files.Router.name,
window.OCP.Files.Router.params,
window.OCP.Files.Router.query,
{ ...window.OCP.Files.Router.params },
{ ...window.OCP.Files.Router.query },
true,
]
const onClose = () => window.OCP.Files.Router.goToRoute(...oldRoute)
Expand Down

0 comments on commit 667001f

Please sign in to comment.