From 06078c7a85c687ff1098103fbaa688967b7b50a3 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 22 Aug 2019 21:49:20 -0600 Subject: [PATCH] Update SearchResults --- resources/assets/js/components/SearchResults.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/resources/assets/js/components/SearchResults.vue b/resources/assets/js/components/SearchResults.vue index 2d54ec93b..13b0e1421 100644 --- a/resources/assets/js/components/SearchResults.vue +++ b/resources/assets/js/components/SearchResults.vue @@ -58,8 +58,8 @@

- - + +

@@ -140,12 +140,19 @@ export default { }) }, - followProfile(profile) { + followProfile(profile, index) { this.loading = true; axios.post('/i/follow', { item: profile.entity.id }).then(res => { - this.fetchSearchResults(); + if(profile.entity.local == true) { + this.fetchSearchResults(); + return; + } else { + this.loading = false; + this.results.profiles[index].entity.follow_request = true; + return; + } }).catch(err => { if(err.response.data.message) { swal('Error', err.response.data.message, 'error');