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 John Molakvoæ (skjnldsv)
parent 0f238623f6
commit f7b267a61b
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
1 changed files with 8 additions and 0 deletions

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('//', '/'))
},