fix: widget error
This commit is contained in:
@@ -46,7 +46,6 @@ import {
|
||||
import { getLocalAuthData, isElectronContext } from "@/utils";
|
||||
import chatMessageHandler from "./chat.handler";
|
||||
import { shallowEqual } from "react-redux";
|
||||
import { useLocation } from "react-router-dom";
|
||||
|
||||
const getQueryString = (params: { [key: string]: string }) => {
|
||||
const sp = new URLSearchParams();
|
||||
@@ -69,7 +68,6 @@ export default function useStreaming() {
|
||||
const readUsers = useAppSelector((store) => store.footprint.readUsers, shallowEqual);
|
||||
const readChannels = useAppSelector((store) => store.footprint.readChannels, shallowEqual);
|
||||
const dispatch = useAppDispatch();
|
||||
const { pathname } = useLocation();
|
||||
const loginUid = user?.uid || 0;
|
||||
|
||||
const keepAlive = (timeout?: number) => {
|
||||
@@ -454,12 +452,11 @@ export default function useStreaming() {
|
||||
// const timeSpan = 60;
|
||||
const timeSpan = 24 * 60 * 60;
|
||||
// const timeSpan = 5;
|
||||
const canReconnect = !guest && (elapsedTime > timeSpan || !SSE) && pathname !== "/login";
|
||||
const canReconnect = !guest && (elapsedTime > timeSpan || !SSE);
|
||||
// const canReconnect = (elapsedTime > timeSpan || !SSE) && pathname !== "/login";
|
||||
console.info(
|
||||
"debug SSE: visibility changed elapsedTime",
|
||||
elapsedTime,
|
||||
pathname,
|
||||
hiddenTime,
|
||||
canReconnect,
|
||||
!SSE,
|
||||
|
||||
Reference in New Issue
Block a user