bugfix: set/change page title when switching to filelist

Signed-off-by: Bernd Stellwag <burned@zerties.org>
This commit is contained in:
Bernd Stellwag 2017-10-18 19:51:40 +02:00
parent 85f612c819
commit bf3f86f1ff
2 changed files with 4 additions and 1 deletions

View File

@ -1635,6 +1635,7 @@
// close sidebar
this._updateDetailsView(null);
}
this._setCurrentDir(this.getCurrentDirectory(), false);
var callBack = this.reloadCallback.bind(this);
return this._reloadCall.then(callBack, callBack);
},

View File

@ -1523,7 +1523,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();