fix: Update tweet character count logic (#2709)
This commit is contained in:
@@ -14,13 +14,13 @@
|
||||
@mouseleave="isHovered = false"
|
||||
/>
|
||||
<i
|
||||
v-if="isATweet && isIncoming"
|
||||
v-if="isATweet && (isIncoming || isOutgoing) && sourceId"
|
||||
v-tooltip.top-start="$t('CHAT_LIST.REPLY_TO_TWEET')"
|
||||
class="icon ion-reply cursor-pointer"
|
||||
@click="onTweetReply"
|
||||
/>
|
||||
<a
|
||||
v-if="isATweet && isIncoming"
|
||||
v-if="isATweet && (isOutgoing || isIncoming) && linkToTweet"
|
||||
:href="linkToTweet"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer nofollow"
|
||||
@@ -71,19 +71,33 @@ export default {
|
||||
type: [String, Number],
|
||||
default: '',
|
||||
},
|
||||
inboxId: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
inbox() {
|
||||
return this.$store.getters['inboxes/getInbox'](this.inboxId);
|
||||
},
|
||||
isIncoming() {
|
||||
return MESSAGE_TYPE.INCOMING === this.messageType;
|
||||
},
|
||||
isOutgoing() {
|
||||
return MESSAGE_TYPE.OUTGOING === this.messageType;
|
||||
},
|
||||
screenName() {
|
||||
const { additional_attributes: additionalAttributes = {} } =
|
||||
this.sender || {};
|
||||
return additionalAttributes?.screen_name || '';
|
||||
},
|
||||
linkToTweet() {
|
||||
if (!this.sourceId || !this.inbox.name) {
|
||||
return '';
|
||||
}
|
||||
const { screenName, sourceId } = this;
|
||||
return `https://twitter.com/${screenName}/status/${sourceId}`;
|
||||
return `https://twitter.com/${screenName ||
|
||||
this.inbox.name}/status/${sourceId}`;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -113,6 +127,13 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
.ion-reply,
|
||||
.ion-android-open {
|
||||
color: var(--white);
|
||||
}
|
||||
}
|
||||
|
||||
.message-text--metadata {
|
||||
align-items: flex-end;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user