Skip to content

Commit 16f6c07

Browse files
committed
Always call render to replace the app-sidebar if the detail view is updated
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent bcdbc4e commit 16f6c07

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

apps/files/js/detailsview.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,13 @@
118118
*/
119119
render: function() {
120120
// remove old instances
121-
if ($('#app-sidebar').length === 0) {
121+
var $appSidebar = $('#app-sidebar');
122+
if ($appSidebar.length === 0) {
122123
this.$el.insertAfter($('#app-content'));
123124
} else {
124-
$('#app-sidebar').replaceWith(this.$el)
125+
if ($appSidebar[0] !== this.el) {
126+
$appSidebar.replaceWith(this.$el)
127+
}
125128
}
126129

127130
var templateVars = {

apps/files/js/filelist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@
564564
}
565565

566566
this._currentFileModel = model;
567-
567+
this._detailsView.render();
568568
this._detailsView.setFileInfo(model);
569569
this._detailsView.$el.scrollTop(0);
570570
},

0 commit comments

Comments
 (0)