aboutsummaryrefslogtreecommitdiff
path: root/src/components/user_profile/user_profile.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/user_profile/user_profile.js')
-rw-r--r--src/components/user_profile/user_profile.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js
index 2ca09817..245d55ca 100644
--- a/src/components/user_profile/user_profile.js
+++ b/src/components/user_profile/user_profile.js
@@ -1,6 +1,7 @@
import UserCardContent from '../user_card_content/user_card_content.vue'
import UserCard from '../user_card/user_card.vue'
import Timeline from '../timeline/timeline.vue'
+import { emptyTl } from '../../modules/statuses.js'
const UserProfile = {
created () {
@@ -13,6 +14,11 @@ const UserProfile = {
destroyed () {
this.$store.dispatch('stopFetching', 'user')
},
+ data () {
+ return {
+ favorites: emptyTl({ type: 'favorites', userId: this.userId })
+ }
+ },
computed: {
timeline () {
return this.$store.state.statuses.timelines.user
@@ -21,7 +27,7 @@ const UserProfile = {
return this.$route.params.id || this.user.id
},
userName () {
- return this.$route.params.name
+ return this.$route.params.name || this.user.screen_name
},
friends () {
return this.user.friends
@@ -68,7 +74,7 @@ const UserProfile = {
}
this.$store.dispatch('stopFetching', 'user')
this.$store.commit('clearTimeline', { timeline: 'user' })
- this.$store.dispatch('startFetching', ['user', this.userName])
+ this.$store.dispatch('startFetching', ['user', this.fetchBy])
},
userId () {
if (!this.isExternal) {
@@ -76,7 +82,7 @@ const UserProfile = {
}
this.$store.dispatch('stopFetching', 'user')
this.$store.commit('clearTimeline', { timeline: 'user' })
- this.$store.dispatch('startFetching', ['user', this.userId])
+ this.$store.dispatch('startFetching', ['user', this.fetchBy])
},
user () {
if (this.user.id && !this.user.followers) {