From ea1d7f46b5743a1493a8cfaf7b64dcc240fc3769 Mon Sep 17 00:00:00 2001 From: taehoon Date: Sun, 3 Feb 2019 12:52:04 -0500 Subject: [PATCH] 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(-) diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index 6f6d04a794..d256fc5dfa 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 e80dc72b21..7a087bdf15 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 @@
{{ $t('user_card.statuses') }}
{{user.statuses_count}}
-
+
{{ $t('user_card.followees') }}
{{user.friends_count}}
-
+
{{ $t('user_card.followers') }}
{{user.followers_count}}
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 7b0ab705a3..4039fd354e 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 e981f2085b..11943660e6 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" /> -
+
-
+