diff options
| author | Henry Jameson <me@hjkos.com> | 2021-06-12 19:54:03 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-06-12 19:54:34 +0300 |
| commit | 90a188f2c3c16b926c75bf4aa749633e6967e5a0 (patch) | |
| tree | 5683f45402f6f48570e214a1df8c9e9c6bfe1d68 /src/components | |
| parent | cd4455675024a3dfc8930184114d5f92438d0466 (diff) | |
cleanup
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/chat_list_item/chat_list_item.js | 3 | ||||
| -rw-r--r-- | src/components/chat_message/chat_message.js | 3 | ||||
| -rw-r--r-- | src/components/status_body/status_body.js | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/components/chat_list_item/chat_list_item.js b/src/components/chat_list_item/chat_list_item.js index e01b9bd4..e5032176 100644 --- a/src/components/chat_list_item/chat_list_item.js +++ b/src/components/chat_list_item/chat_list_item.js @@ -40,12 +40,11 @@ const ChatListItem = { const message = this.chat.lastMessage const messageEmojis = message ? message.emojis : [] const isYou = message && message.account_id === this.currentUser.id - const content = message ? (this.attachmentInfo || message.content_raw) : '' + const content = message ? (this.attachmentInfo || message.content) : '' const messagePreview = isYou ? `<i>${this.$t('chats.you')}</i> ${content}` : content return { summary: '', emojis: messageEmojis, - statusnet_html: messagePreview, raw_html: messagePreview, text: messagePreview, attachments: [] diff --git a/src/components/chat_message/chat_message.js b/src/components/chat_message/chat_message.js index d126d453..9a2d1e7d 100644 --- a/src/components/chat_message/chat_message.js +++ b/src/components/chat_message/chat_message.js @@ -58,8 +58,7 @@ const ChatMessage = { return { summary: '', emojis: this.message.emojis, - raw_html: this.message.content_raw, - statusnet_html: this.message.content, + raw_html: this.message.content, text: this.message.content, attachments: this.message.attachments } diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index 14558aca..26491e1b 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -53,7 +53,7 @@ const StatusContent = { // Using max-height + overflow: auto for status components resulted in false positives // very often with japanese characters, and it was very annoying. tallStatus () { - const lengthScore = this.status.statusnet_html.split(/<p|<br/).length + this.status.text.length / 80 + const lengthScore = this.status.raw_html.split(/<p|<br/).length + this.status.text.length / 80 return lengthScore > 20 }, longSubject () { |
