feat: use better counts
This commit is contained in:
@@ -238,13 +238,17 @@ export default {
|
||||
return this.currentChat.unread_count || 0;
|
||||
},
|
||||
unreadMessageLabel() {
|
||||
const count =
|
||||
this.unreadMessageCount > 9 ? '9+' : this.unreadMessageCount;
|
||||
const label =
|
||||
this.unreadMessageCount > 1
|
||||
? this.$t('CONVERSATION.UNREAD_MESSAGES')
|
||||
: this.$t('CONVERSATION.UNREAD_MESSAGE');
|
||||
return `${count} ${label}`;
|
||||
if (this.unreadMessageCount <= 1) {
|
||||
return this.$t('CONVERSATION.SINGLE_UNREAD_MESSAGE');
|
||||
}
|
||||
|
||||
if (this.unreadMessageCount > 9) {
|
||||
return this.$t('CONVERSATION.UNREAD_COUNT_OVERFLOW');
|
||||
}
|
||||
|
||||
return this.$t('CONVERSATION.UNREAD_COUNT', {
|
||||
count: this.unreadMessageCount,
|
||||
});
|
||||
},
|
||||
isInstagramDM() {
|
||||
return this.conversationType === 'instagram_direct_message';
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
"PLACEHOLDER": "Type any text to search messages",
|
||||
"NO_MATCHING_RESULTS": "No results found."
|
||||
},
|
||||
"UNREAD_COUNT": "{count} Unread Messages",
|
||||
"UNREAD_COUNT_OVERFLOW": "9+ Unread Messages",
|
||||
"SINGLE_UNREAD_MESSAGE": "1 Unread Message",
|
||||
"UNREAD_MESSAGES": "Unread Messages",
|
||||
"UNREAD_MESSAGE": "Unread Message",
|
||||
"CLICK_HERE": "Click here",
|
||||
|
||||
Reference in New Issue
Block a user