Skip to content
Snippets Groups Projects

Fix broken "Show whitespace changes" button on MR "Changes" tab

Merged Jacques Erasmus requested to merge 52122-fix-broken-whitespace-button into master
All threads resolved!
Compare and Show latest version
195 files
+ 4205
2361
Compare changes
  • Side-by-side
  • Inline
Files
195
@@ -41,6 +41,11 @@ export default {
required: true,
},
},
data() {
return {
assignedDiscussions: false,
};
},
computed: {
...mapState({
isLoading: state => state.diffs.isLoading,
@@ -58,9 +63,9 @@ export default {
plainDiffPath: state => state.diffs.plainDiffPath,
emailPatchPath: state => state.diffs.emailPatchPath,
}),
...mapState('diffs', ['showTreeList']),
...mapState('diffs', ['showTreeList', 'isLoading']),
...mapGetters('diffs', ['isParallelView']),
...mapGetters(['isNotesFetched', 'discussionsStructuredByLineCode']),
...mapGetters(['isNotesFetched', 'getNoteableData']),
targetBranch() {
return {
branchName: this.targetBranchName,
@@ -147,11 +152,12 @@ export default {
}
},
setDiscussions() {
if (this.isNotesFetched) {
if (this.isNotesFetched && !this.assignedDiscussions && !this.isLoading) {
requestIdleCallback(
() => {
this.assignDiscussionsToDiff(this.discussionsStructuredByLineCode);
},
() =>
this.assignDiscussionsToDiff().then(() => {
this.assignedDiscussions = true;
}),
{ timeout: 1000 },
);
}
Loading