File tree 1 file changed +14
-6
lines changed
1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -96,21 +96,29 @@ export default {
96
96
97
97
computed: {
98
98
getTotalUnreadMessages() {
99
- return this.$store.getters.conversationsList.reduce((total, conversation) => {
100
- return total + (conversation.unreadMessages || 0);
101
- }, 0);
99
+ return this.$store.getters.conversationsList
100
+ .filter(conversation => !conversation.isArchived)
101
+ .reduce((total, conversation) => {
102
+ return total + (conversation.unreadMessages || 0);
103
+ }, 0);
102
104
},
103
105
104
106
getTotalUnreadMentions() {
105
- return this.$store.getters.conversationsList.filter(conversation => conversation.unreadMention).length;
107
+ return this.$store.getters.conversationsList
108
+ .filter(conversation => !conversation.isArchived && conversation.unreadMention)
109
+ .length;
106
110
},
107
111
108
112
getTotalUnreadMentionsDirect() {
109
- return this.$store.getters.conversationsList.filter(conversation => conversation.unreadMentionDirect).length;
113
+ return this.$store.getters.conversationsList
114
+ .filter(conversation => !conversation.isArchived && conversation.unreadMentionDirect)
115
+ .length;
110
116
},
111
117
112
118
getUnreadConversationCount() {
113
- return this.$store.getters.conversationsList.filter(conversation => (conversation.unreadMessages || 0) > 0).length;
119
+ return this.$store.getters.conversationsList
120
+ .filter(conversation => !conversation.isArchived && (conversation.unreadMessages || 0) > 0)
121
+ .length;
114
122
},
115
123
116
124
getUserId() {
You can’t perform that action at this time.
0 commit comments