mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
no more error messages on page load
This commit is contained in:
parent
7562af227e
commit
2544edcb29
@ -144,13 +144,13 @@ export default {
|
|||||||
return this.hashtagsOffset > 0
|
return this.hashtagsOffset > 0
|
||||||
},
|
},
|
||||||
hasMorePosts() {
|
hasMorePosts() {
|
||||||
return (this.postPage + 1) * this.pageSize <= this.postCount
|
return (this.postPage + 1) * this.pageSize < this.postCount
|
||||||
},
|
},
|
||||||
hasMoreUsers() {
|
hasMoreUsers() {
|
||||||
return (this.userPage + 1) * this.pageSize <= this.userCount
|
return (this.userPage + 1) * this.pageSize < this.userCount
|
||||||
},
|
},
|
||||||
hasMoreHashtags() {
|
hasMoreHashtags() {
|
||||||
return (this.hashtagPage + 1) * this.pageSize <= this.hashtagCount
|
return (this.hashtagPage + 1) * this.pageSize < this.hashtagCount
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -201,7 +201,7 @@ export default {
|
|||||||
update({ searchPosts }) {
|
update({ searchPosts }) {
|
||||||
this.posts = searchPosts.posts
|
this.posts = searchPosts.posts
|
||||||
this.postCount = searchPosts.postCount
|
this.postCount = searchPosts.postCount
|
||||||
if (searchPosts.posts.length) this.activeTab = 'Post'
|
if (this.postCount > 0) this.activeTab = 'Post'
|
||||||
},
|
},
|
||||||
fetchPolicy: 'cache-and-network',
|
fetchPolicy: 'cache-and-network',
|
||||||
},
|
},
|
||||||
@ -223,7 +223,7 @@ export default {
|
|||||||
update({ searchUsers }) {
|
update({ searchUsers }) {
|
||||||
this.users = searchUsers.users
|
this.users = searchUsers.users
|
||||||
this.userCount = searchUsers.userCount
|
this.userCount = searchUsers.userCount
|
||||||
if (!searchPosts.posts.length && searchUsers.users.length) this.activeTab = 'User'
|
if (this.postCount === 0 && this.userCount > 0) this.activeTab = 'User'
|
||||||
},
|
},
|
||||||
fetchPolicy: 'cache-and-network',
|
fetchPolicy: 'cache-and-network',
|
||||||
},
|
},
|
||||||
@ -245,11 +245,7 @@ export default {
|
|||||||
update({ searchHashtags }) {
|
update({ searchHashtags }) {
|
||||||
this.hashtags = searchHashtags.hashtags
|
this.hashtags = searchHashtags.hashtags
|
||||||
this.hashtagCount = searchHashtags.hashtagCount
|
this.hashtagCount = searchHashtags.hashtagCount
|
||||||
if (
|
if (this.postCount === 0 && this.userCount === 0 && this.hashtagCount > 0)
|
||||||
!searchPosts.posts.length &&
|
|
||||||
!searchUsers.users.length &&
|
|
||||||
searchHashtags.hashtags.length
|
|
||||||
)
|
|
||||||
this.activeTab = 'Hashtag'
|
this.activeTab = 'Hashtag'
|
||||||
},
|
},
|
||||||
fetchPolicy: 'cache-and-network',
|
fetchPolicy: 'cache-and-network',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user