diffs: toggle race condition on sticky vs wide-diff-mode that caused some display artifacts

This commit is contained in:
Marcin Kuzminski 2019-11-05 09:30:03 +01:00
parent 491d84ca22
commit a5dd4ceb99

View file

@ -1106,12 +1106,6 @@ def get_comments_for(diff_type, comments, filename, line_version, line_number):
]
};
// get stored diff mode and pre-enable it
if (templateContext.session_attrs.wide_diff_mode === "true") {
Rhodecode.comments.toggleWideMode(null);
$('.toggle-wide-diff').addClass('btn-active');
}
var diffMenuId = "#diff_menu_" + "${diffset_container_id}";
$(diffMenuId).select2({
minimumResultsForSearch: -1,
@ -1144,6 +1138,13 @@ def get_comments_for(diff_type, comments, filename, line_version, line_number):
_gettext('Expand all files'));
}
updateSticky()
};
// get stored diff mode and pre-enable it
if (templateContext.session_attrs.wide_diff_mode === "true") {
Rhodecode.comments.toggleWideMode(null);
$('.toggle-wide-diff').addClass('btn-active');
updateSticky();
}
});
</script>