From ef2585e32b546722f2157bd6203701deb495d2e9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 11 Jan 2019 02:40:17 +0300 Subject: Remove all explicit and implicit conversions of statusId to number, changed explicit ones so that they convert them to string --- src/components/status/status.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 73d53694..7e1e7dab 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -270,7 +270,7 @@ const Status = { }, replyEnter (id, event) { this.showPreview = true - const targetId = Number(id) + const targetId = String(id) const statuses = this.$store.state.statuses.allStatuses if (!this.preview) { @@ -295,7 +295,7 @@ const Status = { }, watch: { 'highlight': function (id) { - id = Number(id) + id = String(id) if (this.status.id === id) { let rect = this.$el.getBoundingClientRect() if (rect.top < 100) { -- cgit v1.2.3-70-g09d2 From 6c70e9950c34eaffff79368a9e89ee1e58964296 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Thu, 17 Jan 2019 23:44:31 +0300 Subject: some more post fields --- src/components/status/status.js | 2 +- src/services/entity_normalizer/entity_normalizer.service.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index b648ab70..27f7bafa 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -141,7 +141,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' diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js index 9b4905a7..7321a1b3 100644 --- a/src/services/entity_normalizer/entity_normalizer.service.js +++ b/src/services/entity_normalizer/entity_normalizer.service.js @@ -127,6 +127,7 @@ export const parseStatus = (data) => { output.in_reply_to_status_id = data.in_reply_to_id output.in_reply_to_user_id = data.in_reply_to_account_id + output.in_reply_to_screen_name = data.in_reply_to_screen_name // Not exactly the same but works output.statusnet_conversation_id = data.id @@ -136,6 +137,10 @@ export const parseStatus = (data) => { } output.summary = data.spoiler_text + output.external_url = data.url + + // FIXME missing!! + output.is_local = false } else { output.favorited = data.favorited output.fave_num = data.fave_num @@ -163,6 +168,9 @@ export const parseStatus = (data) => { output.in_reply_to_status_id = data.in_reply_to_status_id output.in_reply_to_user_id = data.in_reply_to_user_id + // Missing!! fix in UI? + output.in_reply_to_screen_name = null + output.statusnet_conversation_id = data.statusnet_conversation_id if (output.type === 'retweet') { @@ -170,6 +178,8 @@ export const parseStatus = (data) => { } output.summary = data.summary + output.external_url = data.external_url + output.is_local = data.is_local } output.id = String(data.id) -- cgit v1.2.3-70-g09d2 From 66dc72deb2b4b518ba09b984d792be57451c4bfc Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 22 Jan 2019 23:57:51 +0300 Subject: fix reply-to tooltip being somewhat unreliable --- src/components/status/status.js | 20 +++++++++++++++++++- src/components/status/status.vue | 12 ++++++------ .../entity_normalizer/entity_normalizer.service.js | 8 ++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) (limited to 'src/components/status/status.js') diff --git a/src/components/status/status.js b/src/components/status/status.js index 105a736b..44a6d5c5 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -73,6 +73,16 @@ 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) + } else { + return '' + } + }, retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name }, retweeterHtml () { return this.statusoid.user.name_html }, @@ -119,6 +129,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 @@ -277,7 +295,7 @@ const Status = { replyLeave () { this.showPreview = false }, - userProfileLink (id, name) { + generateUserProfileLink (id, name) { return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames) } }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 4a1aef8f..5c956467 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -3,7 +3,7 @@