mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
refac
This commit is contained in:
parent
99a7823e01
commit
32c888c280
1 changed files with 20 additions and 1 deletions
|
|
@ -5,7 +5,14 @@
|
|||
import { onDestroy, onMount, tick } from 'svelte';
|
||||
import { goto } from '$app/navigation';
|
||||
|
||||
import { chatId, channelId as _channelId, showSidebar, socket, user } from '$lib/stores';
|
||||
import {
|
||||
chatId,
|
||||
channels,
|
||||
channelId as _channelId,
|
||||
showSidebar,
|
||||
socket,
|
||||
user
|
||||
} from '$lib/stores';
|
||||
import { getChannelById, getChannelMessages, sendMessage } from '$lib/apis/channels';
|
||||
|
||||
import Messages from './Messages.svelte';
|
||||
|
|
@ -53,6 +60,18 @@
|
|||
type: 'last_read_at'
|
||||
}
|
||||
});
|
||||
|
||||
channels.set(
|
||||
$channels.map((channel) => {
|
||||
if (channel.id === channelId) {
|
||||
return {
|
||||
...channel,
|
||||
unread_count: 0
|
||||
};
|
||||
}
|
||||
return channel;
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const initHandler = async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue