feat: Allow users to mark a conversation as unread (#5924)
Allow users to mark conversations as unread. Loom video: https://www.loom.com/share/ab70552d3c9c48b685da7dfa64be8bb3 fixes: #5552 Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
parent
e593e516b8
commit
606fc9046a
20 changed files with 190 additions and 48 deletions
|
@ -44,11 +44,11 @@
|
|||
"
|
||||
:is-web-widget-inbox="isAWebWidgetInbox"
|
||||
/>
|
||||
<li v-show="getUnreadCount != 0" class="unread--toast">
|
||||
<li v-show="unreadMessageCount != 0" class="unread--toast">
|
||||
<span class="text-uppercase">
|
||||
{{ getUnreadCount }}
|
||||
{{ unreadMessageCount }}
|
||||
{{
|
||||
getUnreadCount > 1
|
||||
unreadMessageCount > 1
|
||||
? $t('CONVERSATION.UNREAD_MESSAGES')
|
||||
: $t('CONVERSATION.UNREAD_MESSAGE')
|
||||
}}
|
||||
|
@ -137,7 +137,6 @@ export default {
|
|||
allConversations: 'getAllConversations',
|
||||
inboxesList: 'inboxes/getInboxes',
|
||||
listLoadingStatus: 'getAllMessagesLoaded',
|
||||
getUnreadCount: 'getUnreadCount',
|
||||
loadingChatList: 'getChatListLoadingStatus',
|
||||
}),
|
||||
inboxId() {
|
||||
|
@ -271,6 +270,9 @@ export default {
|
|||
}
|
||||
return '';
|
||||
},
|
||||
unreadMessageCount() {
|
||||
return this.currentChat.unread_count;
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
@ -331,7 +333,7 @@ export default {
|
|||
},
|
||||
scrollToBottom() {
|
||||
let relevantMessages = [];
|
||||
if (this.getUnreadCount > 0) {
|
||||
if (this.unreadMessageCount > 0) {
|
||||
// capturing only the unread messages
|
||||
relevantMessages = this.conversationPanel.querySelectorAll(
|
||||
'.message--unread'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue