This commit is contained in:
roschaefer 2019-09-03 21:37:19 +02:00
parent 2a544376a3
commit 5f14b4c45f
4 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ export default {
notifications: { notifications: {
query() { query() {
return notificationQuery(this.$i18n) return notificationQuery(this.$i18n)
} },
}, },
}, },
} }

View File

@ -1,5 +1,5 @@
import gql from 'graphql-tag' import gql from 'graphql-tag'
import { postFragment, commentFragment, postCountsFragment, userFragment } from './Fragments' import { postFragment, commentFragment, postCountsFragment } from './Fragments'
export default i18n => { export default i18n => {
const lang = i18n.locale().toUpperCase() const lang = i18n.locale().toUpperCase()

View File

@ -77,7 +77,7 @@ export default i18n => {
` `
} }
export const notificationQuery = (i18n) => { export const notificationQuery = i18n => {
const lang = i18n.locale().toUpperCase() const lang = i18n.locale().toUpperCase()
return gql` return gql`
${commentFragment(lang)} ${commentFragment(lang)}
@ -105,7 +105,7 @@ export const notificationQuery = (i18n) => {
` `
} }
export const markAsReadMutation = (i18n) => { export const markAsReadMutation = i18n => {
const lang = i18n.locale().toUpperCase() const lang = i18n.locale().toUpperCase()
return gql` return gql`
${commentFragment(lang)} ${commentFragment(lang)}

View File

@ -186,7 +186,7 @@ export default {
}, },
update({ Post }) { update({ Post }) {
this.hasMore = Post && Post.length >= this.pageSize this.hasMore = Post && Post.length >= this.pageSize
if(!Post) return if (!Post) return
const posts = uniqBy([...this.posts, ...Post], 'id') const posts = uniqBy([...this.posts, ...Post], 'id')
this.posts = posts this.posts = posts
}, },