From 9b76f5bb43f8d2271ec1f8769979e2eb39d7a9ec Mon Sep 17 00:00:00 2001 From: Z Date: Tue, 5 Nov 2019 20:48:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E9=97=AD=E7=A4=BE?= =?UTF-8?q?=E6=A0=91=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/features/status/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/status/index.js b/app/javascript/mastodon/features/status/index.js index 8c23b68ac..f9ba665e8 100644 --- a/app/javascript/mastodon/features/status/index.js +++ b/app/javascript/mastodon/features/status/index.js @@ -126,10 +126,10 @@ const makeMapStateToProps = () => { const getMore = (id, notRoot) => { const replies = contextReplies.get(id); const cur_status = statuses.get(id); - const text = cur_status.get('search_index'); + const text = cur_status.get('search_index').replace(/@\S+?\s/,'@..'); return { statusId: id, - name: ((notRoot && text.length > 13) ? text.slice(0,10) + "..." : text) + (cur_status.get('media_attachments').size > 0 ? " [图片]" : ""), + name: (text.length > 16 ? text.slice(0,13) + "..." : text) + (cur_status.get('media_attachments').size > 0 ? " [图片]" : ""), children: replies ? Array.from(replies.map( i => getMore(i, true) )) : [], } } @@ -545,7 +545,7 @@ class Status extends ImmutablePureComponent {