Commit 09bc99a3 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch 'maintenance/mr-diffs-perf-marks/less-waiting' into 'master'

Remove unnecessary waiting in the diff file component

See merge request gitlab-org/gitlab!47350
parents 68675b05 42ec57cd
...@@ -172,9 +172,9 @@ export default { ...@@ -172,9 +172,9 @@ export default {
notesEventHub.$on(`loadCollapsedDiff/${this.file.file_hash}`, this.requestDiff); notesEventHub.$on(`loadCollapsedDiff/${this.file.file_hash}`, this.requestDiff);
eventHub.$on(EVT_EXPAND_ALL_FILES, this.expandAllListener); eventHub.$on(EVT_EXPAND_ALL_FILES, this.expandAllListener);
}, },
async mounted() { mounted() {
if (this.hasDiff) { if (this.hasDiff) {
await this.postRender(); this.postRender();
} }
}, },
beforeDestroy() { beforeDestroy() {
...@@ -231,8 +231,8 @@ export default { ...@@ -231,8 +231,8 @@ export default {
}) })
.then(() => { .then(() => {
requestIdleCallback( requestIdleCallback(
async () => { () => {
await this.postRender(); this.postRender();
this.assignDiscussionsToDiff(this.getDiffFileDiscussions(this.file)); this.assignDiscussionsToDiff(this.getDiffFileDiscussions(this.file));
}, },
{ timeout: 1000 }, { timeout: 1000 },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment