From b57b4c6e45ca612a890e594942e86faab5a946e0 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Fri, 8 Feb 2019 05:31:06 -0500
Subject: #291 - disable empty tabs in user profile panel

---
 src/components/user_profile/user_profile.vue | 7 +++++--
 1 file changed, 5 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 9001ed00..7a1e6a18 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -9,19 +9,20 @@
     <tab-switcher :renderOnlyFocused="true">
       <Timeline
         :label="$t('user_card.statuses')"
+        :diabled="!user.statuses_count"
         :embedded="true"
         :title="$t('user_profile.timeline_title')"
         :timeline="timeline"
         :timeline-name="'user'"
         :user-id="fetchBy"
       />
-      <div :label="$t('user_card.followees')" v-if="followsTabVisible">
+      <div :label="$t('user_card.followees')" v-if="followsTabVisible" :disabled="!user.friends_count">
         <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="followersTabVisible">
+      <div :label="$t('user_card.followers')" v-if="followersTabVisible" :disabled="!user.followers_count">
         <FollowList v-if="user.followers_count > 0" :userId="userId" :showFollowers="true" />
         <div class="userlist-placeholder" v-else>
           <i class="icon-spin3 animate-spin"></i>
@@ -29,6 +30,7 @@
       </div>
       <Timeline
         :label="$t('user_card.media')"
+        :disabled="!user.media_count"
         :embedded="true" :title="$t('user_card.media')"
         timeline-name="media"
         :timeline="media"
@@ -37,6 +39,7 @@
       <Timeline
         v-if="isUs"
         :label="$t('user_card.favorites')"
+        :disabled="!user.favourites_count"
         :embedded="true"
         :title="$t('user_card.favorites')"
         timeline-name="favorites"
-- 
cgit v1.2.3-70-g09d2


From 34169e692f9d42104413b816b3f096d808360ce4 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Fri, 8 Feb 2019 09:56:45 -0500
Subject: #291 - enable media/favorite tabs with prefetched data

---
 src/components/user_profile/user_profile.vue                | 6 +++---
 src/services/entity_normalizer/entity_normalizer.service.js | 2 --
 2 files changed, 3 insertions(+), 5 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 7a1e6a18..cfb4fa95 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -30,7 +30,7 @@
       </div>
       <Timeline
         :label="$t('user_card.media')"
-        :disabled="!user.media_count"
+        :disabled="!media.visibleStatuses.length"
         :embedded="true" :title="$t('user_card.media')"
         timeline-name="media"
         :timeline="media"
@@ -39,13 +39,13 @@
       <Timeline
         v-if="isUs"
         :label="$t('user_card.favorites')"
-        :disabled="!user.favourites_count"
+        :disabled="!favorites.visibleStatuses.length"
         :embedded="true"
         :title="$t('user_card.favorites')"
         timeline-name="favorites"
         :timeline="favorites"
       />
-    </tab-switcher>
+    </tab-switcher> 
   </div>
   <div v-else class="panel user-profile-placeholder">
     <div class="panel-heading">
diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js
index 71744f39..828c48f9 100644
--- a/src/services/entity_normalizer/entity_normalizer.service.js
+++ b/src/services/entity_normalizer/entity_normalizer.service.js
@@ -115,8 +115,6 @@ export const parseUser = (data) => {
   output.locked = data.locked
   output.followers_count = data.followers_count
   output.statuses_count = data.statuses_count
-  output.favourites_count = data.favourites_count
-  output.media_count = data.media_count
   output.friends = []
   output.followers = []
 
-- 
cgit v1.2.3-70-g09d2


From d112d5b3331cd1805319c9641d489eee2ca01311 Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Fri, 8 Feb 2019 10:02:00 -0500
Subject: #291 - remove whitespace

---
 src/components/user_profile/user_profile.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 cfb4fa95..9a8faf4b 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -45,7 +45,7 @@
         timeline-name="favorites"
         :timeline="favorites"
       />
-    </tab-switcher> 
+    </tab-switcher>
   </div>
   <div v-else class="panel user-profile-placeholder">
     <div class="panel-heading">
-- 
cgit v1.2.3-70-g09d2


From 910b63624b75bdbdc7e4bf80cfe42c7a8092260e Mon Sep 17 00:00:00 2001
From: dave <starpumadev@gmail.com>
Date: Fri, 8 Feb 2019 10:40:03 -0500
Subject: #291 - fixed typo

---
 src/components/user_profile/user_profile.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 9a8faf4b..79461291 100644
--- a/src/components/user_profile/user_profile.vue
+++ b/src/components/user_profile/user_profile.vue
@@ -9,7 +9,7 @@
     <tab-switcher :renderOnlyFocused="true">
       <Timeline
         :label="$t('user_card.statuses')"
-        :diabled="!user.statuses_count"
+        :disabled="!user.statuses_count"
         :embedded="true"
         :title="$t('user_profile.timeline_title')"
         :timeline="timeline"
-- 
cgit v1.2.3-70-g09d2

