From e70d06dff88675e4e7d88ff8b798b4090dd4d0ae Mon Sep 17 00:00:00 2001
From: Tim Zallmann <tzallmann@gitlab.com>
Date: Tue, 7 Aug 2018 11:14:00 +0200
Subject: Incremental Rendering of the MR

---
 app/assets/javascripts/diffs/components/app.vue | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'app/assets/javascripts/diffs/components/app.vue')

diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 7cc4e6a2c3a..51d86dc661f 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -114,11 +114,16 @@ export default {
     this.adjustView();
   },
   methods: {
-    ...mapActions('diffs', ['setBaseConfig', 'fetchDiffFiles']),
+    ...mapActions('diffs', ['setBaseConfig', 'fetchDiffFiles', 'startRenderDiffsQueue']),
     fetchData() {
-      this.fetchDiffFiles().catch(() => {
-        createFlash(__('Something went wrong on our end. Please try again!'));
-      });
+      this.fetchDiffFiles()
+        .then(() => {
+          console.log('Done');
+          requestIdleCallback(this.startRenderDiffsQueue, { timeout: 1000 });
+        })
+        .catch(() => {
+          createFlash(__('Something went wrong on our end. Please try again!'));
+        });
 
       if (!this.isNotesFetched) {
         eventHub.$emit('fetchNotesData');
-- 
cgit v1.2.1


From 259e54402af87a41bc72a3b1035e435d302144ca Mon Sep 17 00:00:00 2001
From: Tim Zallmann <tzallmann@gitlab.com>
Date: Tue, 7 Aug 2018 11:38:52 +0200
Subject: ESLint Fixes

---
 app/assets/javascripts/diffs/components/app.vue | 1 -
 1 file changed, 1 deletion(-)

(limited to 'app/assets/javascripts/diffs/components/app.vue')

diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue
index 51d86dc661f..b5b05df4d34 100644
--- a/app/assets/javascripts/diffs/components/app.vue
+++ b/app/assets/javascripts/diffs/components/app.vue
@@ -118,7 +118,6 @@ export default {
     fetchData() {
       this.fetchDiffFiles()
         .then(() => {
-          console.log('Done');
           requestIdleCallback(this.startRenderDiffsQueue, { timeout: 1000 });
         })
         .catch(() => {
-- 
cgit v1.2.1

