Skip to content

Commit

Permalink
bug fix showing of direct chat
Browse files Browse the repository at this point in the history
  • Loading branch information
Ro0t-set committed Sep 21, 2023
1 parent 51dfe06 commit a7301f2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ const title = computed(() => {
return userStore.selectedDirect
} else if (userStore.inContentArea == ContentArea.Channel) {
const server = serverStore.servers.filter(
(server) => server._id == userStore.selectedChannel[0]
(server) => server.id == userStore.selectedChannel[0]
)[0]
if (server) {
const channel = server.channels.filter(
(channel) => channel._id == userStore.selectedChannel[1]
(channel) => channel.id == userStore.selectedChannel[1]
)
if (channel.length > 0) {
return channel[0].name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, onMounted, ref, watch } from 'vue'
import { computed, ref } from 'vue'
import { useMessageStore } from '@/stores/messages'
import { ContentArea, useUserStore } from '@/stores/user'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function setActiveDirect(directUsarname: string) {
}
onMounted(() => {
friendStore.fetchFriends()
userStore.selectedDirect = ''
})
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const serverStore = useServerStore()
onMounted(() => {
serverStore.getServers()
userStore.selectedTab = SelectedTab.Directs
userStore.selectedDirect = ''
})
</script>

Expand Down

0 comments on commit a7301f2

Please sign in to comment.