From 110c9d3b26e3871c8fc8157458be201ed4316d49 Mon Sep 17 00:00:00 2001 From: taehoon Date: Tue, 30 Apr 2019 08:20:19 -0400 Subject: improve performance by caching pinned status ids into user object --- src/components/user_profile/user_profile.js | 3 --- src/components/user_profile/user_profile.vue | 16 +++++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/components/user_profile') diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 176ec228..8d660780 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -42,9 +42,6 @@ const UserProfile = { timeline () { return this.$store.state.statuses.timelines.user }, - pinnedStatuses () { - return filter(this.timeline.statuses, { pinned: true }) - }, favorites () { return this.$store.state.statuses.timelines.favorites }, diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 1e104403..36d75b9e 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -5,13 +5,15 @@
- +