diff --git a/src/components/status/status.js b/src/components/status/status.js index 0498f28ae7..e9a5ec0d52 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -142,7 +142,8 @@ const Status = { replyProfileLink () { if (this.isReply) { const user = this.$store.getters.findUser(this.status.in_reply_to_user_id) - return user && user.statusnet_profile_url + // FIXME Why user not found sometimes??? + return user ? user.statusnet_profile_url : 'NOT_FOUND' } }, retweet () { return !!this.statusoid.retweeted_status }, diff --git a/src/components/status/status.scss b/src/components/status/status.scss index 8744fa16a7..8f7fb71ab9 100644 --- a/src/components/status/status.scss +++ b/src/components/status/status.scss @@ -217,21 +217,23 @@ $status-margin: 0.75em; } } - .reply-to { + & .mentions, + & .reply-to { position: relative; } - .reply-to-text { + & .reply-to-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } - .replies-separator { + .mentions-separator { margin-left: 0.4em; } .replies { + margin-top: 0.25em; line-height: 18px; font-size: 12px; display: flex; diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 62ad0eacc5..e4c3a755fa 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -267,8 +267,8 @@ :first-mention="false" /> - @@ -276,7 +276,7 @@ v-if="hasMentionsLine" > @@ -285,7 +285,7 @@ icon="at" /> {{ $t('status.mentions') }} @@ -304,6 +304,8 @@ :no-heading="noHeading" :highlight="highlight" :focused="isFocused" + :hide-first-mentions="mentionsOwnLine" + :head-tail-links="headTailLinks" @mediaplay="addMediaPlaying($event)" @mediapause="removeMediaPlaying($event)" /> diff --git a/src/components/status_body/status_body.js b/src/components/status_body/status_body.js index dbabd208ce..c2edb60156 100644 --- a/src/components/status_body/status_body.js +++ b/src/components/status_body/status_body.js @@ -29,14 +29,18 @@ const StatusContent = { 'singleLine', // if this was computed at upper level it can be passed here, otherwise // it will be in this component - 'headTailLinks' + 'headTailLinks', + 'hideFirstMentions' ], data () { return { showingTall: this.fullContent || (this.inConversation && this.focused), showingLongSubject: false, // not as computed because it sets the initial state which will be changed later - expandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject + expandingSubject: !this.$store.getters.mergedConfig.collapseMessageWithSubject, + headTailLinksComputed: this.headTailLinks + ? this.headTailLinks + : getHeadTailLinks(this.status.raw_html) } }, computed: { @@ -76,13 +80,6 @@ const StatusContent = { attachmentTypes () { return this.status.attachments.map(file => fileType.fileType(file.mimetype)) }, - mentionsOwnLine () { - return this.mergedConfig.mentionsOwnLine - }, - headTailLinksComputed () { - if (this.headTailLinks) return this.headTailLinks - return getHeadTailLinks(this.status.raw_html) - }, mentions () { return this.headTailLinksComputed.firstMentions }, diff --git a/src/components/status_body/status_body.vue b/src/components/status_body/status_body.vue index ff91921154..3c291cf686 100644 --- a/src/components/status_body/status_body.vue +++ b/src/components/status_body/status_body.vue @@ -52,7 +52,7 @@ >