Merge branch 'master' into deployment-secrets

This commit is contained in:
Ulf Gebhardt 2023-03-14 13:05:38 +01:00 committed by GitHub
commit 14b79c9aaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -74,7 +74,9 @@ describe('FollowList.vue', () => {
expect(wrapper.vm.allConnectionsCount).toBe(user.followingCount)
expect(wrapper.findAll('.user-teaser')).toHaveLength(user.following.length)
expect(wrapper.emitted('fetchAllConnections')).toEqual([['following']])
expect(wrapper.emitted('fetchAllConnections')).toEqual([
['following', user.followingCount],
])
})
})
@ -85,7 +87,9 @@ describe('FollowList.vue', () => {
expect(wrapper.vm.allConnectionsCount).toBe(user.followedByCount)
expect(wrapper.findAll('.user-teaser')).toHaveLength(user.followedBy.length)
expect(wrapper.emitted('fetchAllConnections')).toEqual([['followedBy']])
expect(wrapper.emitted('fetchAllConnections')).toEqual([
['followedBy', user.followedByCount],
])
})
})
})

View File

@ -6,7 +6,7 @@
:allProfilesCount="allConnectionsCount"
:profiles="connections"
:loading="loading"
@fetchAllProfiles="$emit('fetchAllConnections', type)"
@fetchAllProfiles="$emit('fetchAllConnections', type, allConnectionsCount)"
/>
</template>

View File

@ -384,9 +384,9 @@ export default {
this.user.followedByCurrentUser = followedByCurrentUser
this.user.followedBy = followedBy
},
fetchAllConnections(type) {
if (type === 'following') this.followingCount = Infinity
if (type === 'followedBy') this.followedByCount = Infinity
fetchAllConnections(type, count) {
if (type === 'following') this.followingCount = count
if (type === 'followedBy') this.followedByCount = count
},
},
apollo: {