Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/diffs/components/diff_file.vue')
-rw-r--r--app/assets/javascripts/diffs/components/diff_file.vue14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue
index f77c8d7406b..ca4543f7002 100644
--- a/app/assets/javascripts/diffs/components/diff_file.vue
+++ b/app/assets/javascripts/diffs/components/diff_file.vue
@@ -150,6 +150,11 @@ export default {
},
},
watch: {
+ 'file.id': {
+ handler: function fileIdHandler() {
+ this.manageViewedEffects();
+ },
+ },
'file.file_hash': {
handler: function hashChangeWatch(newHash, oldHash) {
this.isCollapsed = isCollapsed(this.file);
@@ -186,9 +191,7 @@ export default {
this.postRender();
}
- if (this.reviewed && !this.isCollapsed && this.showLocalFileReviews) {
- this.handleToggle();
- }
+ this.manageViewedEffects();
},
beforeDestroy() {
eventHub.$off(EVT_EXPAND_ALL_FILES, this.expandAllListener);
@@ -200,6 +203,11 @@ export default {
'setRenderIt',
'setFileCollapsedByUser',
]),
+ manageViewedEffects() {
+ if (this.reviewed && !this.isCollapsed && this.showLocalFileReviews) {
+ this.handleToggle();
+ }
+ },
expandAllListener() {
if (this.isCollapsed) {
this.handleToggle();