From 55fc31ea4d3ecde4693a346de51d6cf27e6d9e49 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Sun, 3 Feb 2019 12:39:49 -0500
Subject: Hide followers and followees tabs when they are disabled

---
 src/components/user_profile/user_profile.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/user_profile/user_profile.vue')

diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 6d5b00d1..e981f208 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,13 +15,13 @@
         :timeline-name="'user'"
         :user-id="fetchBy"
       />
-      <div :label="$t('user_card.followees')">
+      <div :label="$t('user_card.followees')" v-if="!user.hide_followings">
         <FollowList v-if="user.friends_count > 0" :userId="userId" :showFollowers="false" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
         </div>
       </div>
-      <div :label="$t('user_card.followers')">
+      <div :label="$t('user_card.followers')" v-if="!user.hide_followers">
         <FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
-- 
cgit v1.2.3-70-g09d2


From ea1d7f46b5743a1493a8cfaf7b64dcc240fc3769 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Sun, 3 Feb 2019 12:52:04 -0500
Subject: Always show my own followees/followers

---
 src/components/user_card_content/user_card_content.js  | 6 ++++++
 src/components/user_card_content/user_card_content.vue | 4 ++--
 src/components/user_profile/user_profile.js            | 6 ++++++
 src/components/user_profile/user_profile.vue           | 4 ++--
 4 files changed, 16 insertions(+), 4 deletions(-)

(limited to 'src/components/user_profile/user_profile.vue')

diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js
index 6f6d04a7..d256fc5d 100644
--- a/src/components/user_card_content/user_card_content.js
+++ b/src/components/user_card_content/user_card_content.js
@@ -79,6 +79,12 @@ export default {
       set (color) {
         this.$store.dispatch('setHighlight', { user: this.user.screen_name, color })
       }
+    },
+    followeesCountVisible () {
+      return !this.isOtherUser || !this.user.hide_followings
+    },
+    followersCountVisible () {
+      return !this.isOtherUser || !this.user.hide_followers
     }
   },
   components: {
diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue
index e80dc72b..7a087bdf 100644
--- a/src/components/user_card_content/user_card_content.vue
+++ b/src/components/user_card_content/user_card_content.vue
@@ -112,11 +112,11 @@
         <h5>{{ $t('user_card.statuses') }}</h5>
         <span>{{user.statuses_count}} <br></span>
       </div>
-      <div class="user-count" v-on:click.prevent="setProfileView('friends')" v-if="!user.hide_followings">
+      <div class="user-count" v-on:click.prevent="setProfileView('friends')" v-if="followeesCountVisible">
         <h5>{{ $t('user_card.followees') }}</h5>
         <span>{{user.friends_count}}</span>
       </div>
-      <div class="user-count" v-on:click.prevent="setProfileView('followers')" v-if="!user.hide_followers">
+      <div class="user-count" v-on:click.prevent="setProfileView('followers')" v-if="followersCountVisible">
         <h5>{{ $t('user_card.followers') }}</h5>
         <span>{{user.followers_count}}</span>
       </div>
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 7b0ab705..4039fd35 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -58,6 +58,12 @@ const UserProfile = {
     },
     isExternal () {
       return this.$route.name === 'external-user-profile'
+    },
+    followeesTabVisible () {
+      return this.isUs || !this.user.hide_followings
+    },
+    followersTabVisible () {
+      return this.isUs || !this.user.hide_followers
     }
   },
   methods: {
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index e981f208..11943660 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,13 +15,13 @@
         :timeline-name="'user'"
         :user-id="fetchBy"
       />
-      <div :label="$t('user_card.followees')" v-if="!user.hide_followings">
+      <div :label="$t('user_card.followees')" v-if="followeesTabVisible">
         <FollowList v-if="user.friends_count > 0" :userId="userId" :showFollowers="false" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
         </div>
       </div>
-      <div :label="$t('user_card.followers')" v-if="!user.hide_followers">
+      <div :label="$t('user_card.followers')" v-if="followersTabVisible">
         <FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
-- 
cgit v1.2.3-70-g09d2


From 55da7dbfde84aa78ab54efe51b41d9f09646ed03 Mon Sep 17 00:00:00 2001
From: taehoon <th.dev91@gmail.com>
Date: Thu, 7 Feb 2019 10:53:36 -0500
Subject: Fix naming

---
 src/components/user_profile/user_profile.js  | 4 ++--
 src/components/user_profile/user_profile.vue | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/components/user_profile/user_profile.vue')

diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 4039fd35..e50048fa 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -59,8 +59,8 @@ const UserProfile = {
     isExternal () {
       return this.$route.name === 'external-user-profile'
     },
-    followeesTabVisible () {
-      return this.isUs || !this.user.hide_followings
+    followsTabVisible () {
+      return this.isUs || !this.user.hide_follows
     },
     followersTabVisible () {
       return this.isUs || !this.user.hide_followers
diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue
index 11943660..9001ed00 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -15,7 +15,7 @@
         :timeline-name="'user'"
         :user-id="fetchBy"
       />
-      <div :label="$t('user_card.followees')" v-if="followeesTabVisible">
+      <div :label="$t('user_card.followees')" v-if="followsTabVisible">
         <FollowList v-if="user.friends_count > 0" :userId="userId" :showFollowers="false" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
-- 
cgit v1.2.3-70-g09d2

