diff --git a/src/components/LeftSidebar/ConversationsList/ConversationTagHeader.vue b/src/components/LeftSidebar/ConversationsList/ConversationTagHeader.vue
index 0c8f063a1e6..a62ebdbffdc 100644
--- a/src/components/LeftSidebar/ConversationsList/ConversationTagHeader.vue
+++ b/src/components/LeftSidebar/ConversationsList/ConversationTagHeader.vue
@@ -13,7 +13,6 @@ import { useStore } from 'vuex'
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
import NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'
import NcAppNavigationItem from '@nextcloud/vue/components/NcAppNavigationItem'
-import NcCounterBubble from '@nextcloud/vue/components/NcCounterBubble'
import NcIconSvgWrapper from '@nextcloud/vue/components/NcIconSvgWrapper'
import IconArrowDown from 'vue-material-design-icons/ArrowDown.vue'
import IconArrowUp from 'vue-material-design-icons/ArrowUp.vue'
@@ -26,8 +25,6 @@ import { useConversationTagsStore } from '../../../stores/conversationTags.ts'
export type TagHeaderItem = ConversationTag & {
_type: 'tag-header'
unreadCount: number
- unreadMention: boolean
- unreadMentionDirect: boolean
isFirst?: boolean
isLast?: boolean
}
@@ -40,15 +37,6 @@ const vuexStore = useStore()
const tagsStore = useConversationTagsStore()
const isCustomTag = computed(() => props.item.type === 'custom')
-const counterType = computed(() => {
- if (props.item.unreadMentionDirect) {
- return 'highlighted'
- } else if (props.item.unreadMention) {
- return 'outlined'
- } else {
- return ''
- }
-})
/**
* Assign a new name to the tag via dialog
@@ -139,9 +127,6 @@ async function handleMarkReadTag() {
@update:open="tagsStore.toggleCollapsed(item.id)">
-
-
-
(() => {
hasTagged: boolean
favorites: Conversation[]
favoritesUnreadCount: number
- favoritesUnreadMention: boolean
- favoritesUnreadMentionDirect: boolean
tagged: Record
taggedUnreadCount: Record
- taggedUnreadMention: Record
- taggedUnreadMentionDirect: Record
other: Conversation[]
otherUnreadCount: number
- otherUnreadMention: boolean
- otherUnreadMentionDirect: boolean
}>((acc, conversation) => {
- // Count amount of unread conversations, highlight if any has a direct or group mention
+ // Count amount of unread conversations
const unreadCount = conversation.unreadMessages ? 1 : 0
- const unreadMention = conversation.unreadMention
- const unreadMentionDirect = conversation.unreadMentionDirect
- || (!!unreadCount && [CONVERSATION.TYPE.ONE_TO_ONE, CONVERSATION.TYPE.ONE_TO_ONE_FORMER].includes(conversation.type))
const isTagged = !!conversation.tagIds?.length
if (conversation.isFavorite) {
acc.favorites.push(conversation)
acc.favoritesUnreadCount += unreadCount
- acc.favoritesUnreadMention ||= unreadMention
- acc.favoritesUnreadMentionDirect ||= unreadMentionDirect
} else if (!isTagged) {
acc.other.push(conversation)
acc.otherUnreadCount += unreadCount
- acc.otherUnreadMention ||= unreadMention
- acc.otherUnreadMentionDirect ||= unreadMentionDirect
}
if (isTagged) {
@@ -96,24 +83,16 @@ const listItems = computed(() => {
acc.tagged[tagId] ??= []
acc.tagged[tagId].push(conversation)
acc.taggedUnreadCount[tagId] = (acc.taggedUnreadCount[tagId] || 0) + unreadCount
- acc.taggedUnreadMention[tagId] = acc.taggedUnreadMention[tagId] || unreadMention
- acc.taggedUnreadMentionDirect[tagId] = acc.taggedUnreadMentionDirect[tagId] || unreadMentionDirect
}
return acc
}, {
hasTagged: false,
favorites: [],
favoritesUnreadCount: 0,
- favoritesUnreadMention: false,
- favoritesUnreadMentionDirect: false,
tagged: {},
taggedUnreadCount: {},
- taggedUnreadMention: {},
- taggedUnreadMentionDirect: {},
other: [],
otherUnreadCount: 0,
- otherUnreadMention: false,
- otherUnreadMentionDirect: false,
})
if (!groupedConversations.hasTagged) {
@@ -124,8 +103,6 @@ const listItems = computed(() => {
tag: ConversationTag
conversations: Conversation[]
unreadCount: number
- unreadMention: boolean
- unreadMentionDirect: boolean
}>>((acc, tag) => {
const conversations = tag.type === 'favorites'
? groupedConversations.favorites
@@ -142,23 +119,11 @@ const listItems = computed(() => {
: tag.type === 'other'
? groupedConversations.otherUnreadCount
: (groupedConversations.taggedUnreadCount[tag.id] ?? 0)
- const unreadMention = tag.type === 'favorites'
- ? groupedConversations.favoritesUnreadMention
- : tag.type === 'other'
- ? groupedConversations.otherUnreadMention
- : (groupedConversations.taggedUnreadMention[tag.id] ?? false)
- const unreadMentionDirect = tag.type === 'favorites'
- ? groupedConversations.favoritesUnreadMentionDirect
- : tag.type === 'other'
- ? groupedConversations.otherUnreadMentionDirect
- : (groupedConversations.taggedUnreadMentionDirect[tag.id] ?? false)
acc.push({
tag,
conversations,
unreadCount,
- unreadMention,
- unreadMentionDirect,
})
return acc
}, [])
@@ -168,8 +133,6 @@ const listItems = computed(() => {
...section.tag,
_type: 'tag-header',
unreadCount: section.unreadCount,
- unreadMention: section.unreadMention,
- unreadMentionDirect: section.unreadMentionDirect,
isFirst: index === 0,
isLast: index === renderedSections.length - 1,
}