mirror of
https://github.com/open-webui/open-webui
synced 2025-01-01 08:42:14 +00:00
refac
This commit is contained in:
parent
688f11e1c5
commit
f91e56d6df
@ -19,7 +19,8 @@
|
|||||||
chatId,
|
chatId,
|
||||||
chats,
|
chats,
|
||||||
currentChatPage,
|
currentChatPage,
|
||||||
tags
|
tags,
|
||||||
|
temporaryChatEnabled
|
||||||
} from '$lib/stores';
|
} from '$lib/stores';
|
||||||
import { goto } from '$app/navigation';
|
import { goto } from '$app/navigation';
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
@ -94,7 +95,10 @@
|
|||||||
const chatEventHandler = async (event) => {
|
const chatEventHandler = async (event) => {
|
||||||
const chat = $page.url.pathname.includes(`/c/${event.chat_id}`);
|
const chat = $page.url.pathname.includes(`/c/${event.chat_id}`);
|
||||||
|
|
||||||
if (!chat || document.visibilityState !== 'visible') {
|
if (
|
||||||
|
(!(chat || event.chat_id === $chatId) && !$temporaryChatEnabled) ||
|
||||||
|
document.visibilityState !== 'visible'
|
||||||
|
) {
|
||||||
await tick();
|
await tick();
|
||||||
const type = event?.data?.type ?? null;
|
const type = event?.data?.type ?? null;
|
||||||
const data = event?.data?.data ?? null;
|
const data = event?.data?.data ?? null;
|
||||||
|
Loading…
Reference in New Issue
Block a user