summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Stellwag <burned@zerties.org>2017-10-18 19:51:40 +0200
committerBernd Stellwag <burned@zerties.org>2017-10-27 15:23:39 +0200
commit3e3e4899fa2ae5a35ea4db9e526c49b93d02d613 (patch)
tree2c8925240f1e95fed1efa31242f546613b88fbe9
parentbea04d12d5a9ae8653277fc6379468d990f397ea (diff)
downloadnextcloud-server-3e3e4899fa2ae5a35ea4db9e526c49b93d02d613.tar.gz
nextcloud-server-3e3e4899fa2ae5a35ea4db9e526c49b93d02d613.zip
bugfix: set/change page title when switching to filelist
Signed-off-by: Bernd Stellwag <burned@zerties.org>
-rw-r--r--apps/files/js/filelist.js1
-rw-r--r--apps/files/tests/js/filelistSpec.js4
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index cc23ac73979..395490d3553 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1673,6 +1673,7 @@
// close sidebar
this._updateDetailsView(null);
}
+ this._setCurrentDir(this.getCurrentDirectory(), false);
var callBack = this.reloadCallback.bind(this);
return this._reloadCall.then(callBack, callBack);
},
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 836a5e5ce71..8154ffaa7c2 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -1621,7 +1621,9 @@ describe('OCA.Files.FileList tests', function() {
var setDirSpy = sinon.spy(fileList.breadcrumb, 'setDirectory');
fileList.changeDirectory('/anothersubdir');
deferredList.resolve(200, [testRoot].concat(testFiles));
- expect(fileList.breadcrumb.setDirectory.calledOnce).toEqual(true);
+ // twice because setDirectory gets called by _setCurrentDir which
+ // gets called directly by changeDirectory and via reload()
+ expect(fileList.breadcrumb.setDirectory.calledTwice).toEqual(true);
expect(fileList.breadcrumb.setDirectory.calledWith('/anothersubdir')).toEqual(true);
setDirSpy.restore();
getFolderContentsStub.restore();