summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-10-27 17:12:47 +0200
committerGitHub <noreply@github.com>2017-10-27 17:12:47 +0200
commit1f19a45a8815460b5c1e0c50c017e2671e87c58f (patch)
tree634143c01580893f260c6f5fb5afeb89234bd27b /apps/files
parent7a4c0c668baef6fe86b6131444cab122a4b3b374 (diff)
parent844db3c891c10d575728742eef69945c807c9472 (diff)
downloadnextcloud-server-1f19a45a8815460b5c1e0c50c017e2671e87c58f.tar.gz
nextcloud-server-1f19a45a8815460b5c1e0c50c017e2671e87c58f.zip
Merge pull request #6869 from burned42/6307-fix_page_title_not_changed
#6307 fix page title not changed
Diffstat (limited to 'apps/files')
-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 0d45c29b25a..4790afcf4d0 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1685,6 +1685,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 1f8d38c59ce..8bb188e3602 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -1627,7 +1627,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();