bugfix: set/change page title when switching to filelist
Signed-off-by: Bernd Stellwag <burned@zerties.org>
This commit is contained in:
parent
bea04d12d5
commit
3e3e4899fa
|
@ -1673,6 +1673,7 @@
|
||||||
// close sidebar
|
// close sidebar
|
||||||
this._updateDetailsView(null);
|
this._updateDetailsView(null);
|
||||||
}
|
}
|
||||||
|
this._setCurrentDir(this.getCurrentDirectory(), false);
|
||||||
var callBack = this.reloadCallback.bind(this);
|
var callBack = this.reloadCallback.bind(this);
|
||||||
return this._reloadCall.then(callBack, callBack);
|
return this._reloadCall.then(callBack, callBack);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1621,7 +1621,9 @@ describe('OCA.Files.FileList tests', function() {
|
||||||
var setDirSpy = sinon.spy(fileList.breadcrumb, 'setDirectory');
|
var setDirSpy = sinon.spy(fileList.breadcrumb, 'setDirectory');
|
||||||
fileList.changeDirectory('/anothersubdir');
|
fileList.changeDirectory('/anothersubdir');
|
||||||
deferredList.resolve(200, [testRoot].concat(testFiles));
|
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);
|
expect(fileList.breadcrumb.setDirectory.calledWith('/anothersubdir')).toEqual(true);
|
||||||
setDirSpy.restore();
|
setDirSpy.restore();
|
||||||
getFolderContentsStub.restore();
|
getFolderContentsStub.restore();
|
||||||
|
|
Loading…
Reference in New Issue