diff --git a/src/components/Main/NavigationBar/NavigationContent/HomeTab.vue b/src/components/Main/NavigationBar/NavigationContent/HomeTab.vue
index 515d2eff6..676ab1dfd 100644
--- a/src/components/Main/NavigationBar/NavigationContent/HomeTab.vue
+++ b/src/components/Main/NavigationBar/NavigationContent/HomeTab.vue
@@ -7,16 +7,26 @@
>
+
+
+
-
+
{
return filterTrees(trees, channel => !channel.archived)
})
-const { channelsWithNotification, dmChannelsWithNotification } =
+const { notStarredChannelsWithNotification, starredChannelsWithNotification, dmChannelsWithNotification } =
useChannelsWithNotification()
const topLevelChannels = computed(() =>
diff --git a/src/composables/subscription/useChannelsWithNotification.ts b/src/composables/subscription/useChannelsWithNotification.ts
index 59ef1be6c..c98bdcacb 100644
--- a/src/composables/subscription/useChannelsWithNotification.ts
+++ b/src/composables/subscription/useChannelsWithNotification.ts
@@ -2,10 +2,12 @@ import { computed } from 'vue'
import { isDefined } from '/@/lib/basic/array'
import { useSubscriptionStore } from '/@/store/domain/subscription'
import { useChannelsStore } from '/@/store/entities/channels'
+import {useStaredChannels} from "/@/store/domain/staredChannels";
const useChannelsWithNotification = () => {
const { unreadChannelsMap } = useSubscriptionStore()
const { channelsMap, dmChannelsMap } = useChannelsStore()
+ const starredChannelStore = useStaredChannels();
const sortedUnreadChannels = computed(() =>
[...unreadChannelsMap.value.values()].sort((a, b) => {
@@ -16,10 +18,18 @@ const useChannelsWithNotification = () => {
})
)
- const channelsWithNotification = computed(() =>
+ const notStarredChannelsWithNotification = computed(() =>
sortedUnreadChannels.value
.map(unread => channelsMap.value.get(unread.channelId))
.filter(isDefined)
+ .filter(channel => !starredChannelStore.staredChannelSet.value.has(channel.id))
+ )
+
+ const starredChannelsWithNotification = computed(() =>
+ sortedUnreadChannels.value
+ .map(unread => channelsMap.value.get(unread.channelId))
+ .filter(isDefined)
+ .filter(channel => starredChannelStore.staredChannelSet.value.has(channel.id))
)
const dmChannelsWithNotification = computed(() =>
@@ -28,7 +38,7 @@ const useChannelsWithNotification = () => {
.filter(isDefined)
)
- return { channelsWithNotification, dmChannelsWithNotification }
+ return { notStarredChannelsWithNotification, starredChannelsWithNotification, dmChannelsWithNotification }
}
export default useChannelsWithNotification