diff options
| author | shpuld <shp@cock.li> | 2019-01-26 17:50:41 +0200 |
|---|---|---|
| committer | shpuld <shp@cock.li> | 2019-01-26 17:50:41 +0200 |
| commit | 0ab828bb30e70e190c1b26eda658ea1d14cc129f (patch) | |
| tree | 5b6816dbc839a0cf821a6b4945fb0a81c109b0f2 /src/components/status/status.js | |
| parent | 3978aaef84cc023908155343af76983f2715cf90 (diff) | |
| parent | 8197c77f75929aad557c98a5f698159b1a6d0c90 (diff) | |
Merge develop and fix conflict
Diffstat (limited to 'src/components/status/status.js')
| -rw-r--r-- | src/components/status/status.js | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js index 1db074e2..2d485616 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -76,6 +76,14 @@ const Status = { return (this.$store.state.config.hideAttachments && !this.inConversation) || (this.$store.state.config.hideAttachmentsInConv && this.inConversation) }, + userProfileLink () { + return this.generateUserProfileLink(this.status.user.id, this.status.user.screen_name) + }, + replyProfileLink () { + if (this.isReply) { + return this.generateUserProfileLink(this.status.in_reply_to_status_id, this.replyToName) + } + }, retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name }, retweeterHtml () { return this.statusoid.user.name_html }, @@ -122,6 +130,14 @@ const Status = { isReply () { return !!this.status.in_reply_to_status_id }, + replyToName () { + const user = this.$store.state.users.usersObject[this.status.in_reply_to_user_id] + if (user) { + return user.screen_name + } else { + return this.status.in_reply_to_screen_name + } + }, hideReply () { if (this.$store.state.config.replyVisibility === 'all') { return false @@ -132,7 +148,7 @@ const Status = { if (this.status.user.id === this.$store.state.users.currentUser.id) { return false } - if (this.status.activity_type === 'repeat') { + if (this.status.type === 'retweet') { return false } var checkFollowing = this.$store.state.config.replyVisibility === 'following' @@ -281,7 +297,7 @@ const Status = { }, replyEnter (id, event) { this.showPreview = true - const targetId = Number(id) + const targetId = id const statuses = this.$store.state.statuses.allStatuses if (!this.preview) { @@ -300,7 +316,7 @@ const Status = { replyLeave () { this.showPreview = false }, - userProfileLink (id, name) { + generateUserProfileLink (id, name) { return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames) }, setMedia () { @@ -310,7 +326,6 @@ const Status = { }, watch: { 'highlight': function (id) { - id = Number(id) if (this.status.id === id) { let rect = this.$el.getBoundingClientRect() if (rect.top < 100) { |
