Always call render to replace the app-sidebar if the detail view is updated

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-08-03 11:47:53 +02:00
parent bcdbc4e19e
commit 16f6c07173
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 6 additions and 3 deletions

View File

@ -118,10 +118,13 @@
*/
render: function() {
// remove old instances
if ($('#app-sidebar').length === 0) {
var $appSidebar = $('#app-sidebar');
if ($appSidebar.length === 0) {
this.$el.insertAfter($('#app-content'));
} else {
$('#app-sidebar').replaceWith(this.$el)
if ($appSidebar[0] !== this.el) {
$appSidebar.replaceWith(this.$el)
}
}
var templateVars = {

View File

@ -564,7 +564,7 @@
}
this._currentFileModel = model;
this._detailsView.render();
this._detailsView.setFileInfo(model);
this._detailsView.$el.scrollTop(0);
},