diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-20 17:53:55 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-20 17:53:55 +0100 |
commit | a6ddf230ce32c13cf8ffbddeaaf47cac2350a7b4 (patch) | |
tree | 60835852173b5c3d9ce50ea9f6d023cab2617774 /app/assets/javascripts/ide/components/repo_file.vue | |
parent | 1e9b57a242a122fae642f88c995a2c411c4213f8 (diff) | |
download | gitlab-ce-a6ddf230ce32c13cf8ffbddeaaf47cac2350a7b4.tar.gz |
removed horrible getter & instead prefer the state
the state now gets updated whenever a file is changed/discard
Diffstat (limited to 'app/assets/javascripts/ide/components/repo_file.vue')
-rw-r--r-- | app/assets/javascripts/ide/components/repo_file.vue | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/assets/javascripts/ide/components/repo_file.vue b/app/assets/javascripts/ide/components/repo_file.vue index 4199fcd7a95..36ffc1b1b78 100644 --- a/app/assets/javascripts/ide/components/repo_file.vue +++ b/app/assets/javascripts/ide/components/repo_file.vue @@ -1,5 +1,5 @@ <script> -import { mapActions, mapGetters } from 'vuex'; +import { mapActions } from 'vuex'; import SkeletonLoadingContainer from '~/vue_shared/components/skeleton_loading_container.vue'; import Icon from '~/vue_shared/components/icon.vue'; import FileIcon from '~/vue_shared/components/file_icon.vue'; @@ -31,10 +31,6 @@ export default { }, }, computed: { - ...mapGetters(['getChangesInFolder']), - folderChangedCount() { - return this.getChangesInFolder(this.file.path); - }, isTree() { return this.file.type === 'tree'; }, @@ -108,10 +104,10 @@ export default { v-if="file.mrChange" /> <span - v-if="isTree && folderChangedCount > 0" + v-if="isTree && file.changesCount > 0" class="ide-tree-changes" > - {{ folderChangedCount }} + {{ file.changesCount }} <icon name="file-modified" :size="12" |