Fix closing details view when viewing file in folder

The Files app active view is set to "files" in silent mode to avoid an
unneeded load of the "/" directory. However, this also prevents the
details view from being automatically closed, so it has to be explicitly
closed by the Goto plugin; the approach used is the same that would have
been used by OCA.Files.App._onNavigationChanged if not silenced.

Fixes #1448

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
Daniel Calviño Sánchez 2017-04-22 18:22:13 +02:00
parent 16b4eecb05
commit 18f46bd47f

View file

@ -40,6 +40,7 @@
type: OCA.Files.FileActions.TYPE_DROPDOWN,
actionHandler: function (fileName, context) {
var fileModel = context.fileInfoModel;
OC.Apps.hideAppSidebar($('.detailsView'));
OCA.Files.App.setActiveView('files', {silent: true});
OCA.Files.App.fileList.changeDirectory(fileModel.get('path'), true, true).then(function() {
OCA.Files.App.fileList.scrollTo(fileModel.get('name'));