Properly set current file info when switching the details view

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-01-08 09:09:31 +01:00 committed by Roeland Jago Douma
parent 6a60a01e4f
commit 940b73280d
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -650,6 +650,14 @@
var model = this.getModelForFile(tr)
var path = model.attributes.path + '/' + model.attributes.name
// make sure the file list has the correct context available
if (this._currentFileModel) {
this._currentFileModel.off();
}
this.$fileList.children().removeClass('highlighted');
tr.addClass('highlighted');
this._currentFileModel = model;
// open sidebar and set file
OCA.Files.Sidebar.open(path.replace('//', '/'))
},