From 424b6bad1687bb122596123e8f797be795fb013b Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Mon, 27 Jan 2020 19:21:37 -0700 Subject: [PATCH] Update Profile.vue component --- resources/assets/js/components/Profile.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index 7ef2d0582..8ad489d16 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -76,7 +76,7 @@ -
+
@@ -641,6 +641,12 @@ if(document.querySelectorAll('body')[0].classList.contains('loggedIn') == true) { axios.get('/api/pixelfed/v1/accounts/verify_credentials').then(res => { this.user = res.data; + if(res.data.id == this.profileId || this.relationship.following == true) { + axios.get('/api/stories/v1/exists/' + this.profileId) + .then(res => { + this.hasStory = res.data == true; + }) + } }); } if(window.outerWidth < 576) { @@ -659,10 +665,7 @@ this.profile = res.data; }).then(res => { this.fetchPosts(); - axios.get('/api/stories/v1/exists/' + this.profileId) - .then(res => { - this.hasStory = res.data == true; - }) + }); },