bugfixing websocket
This commit is contained in:
parent
e166bb7d19
commit
1af24ec844
@ -409,12 +409,12 @@
|
||||
|
||||
$: stockList = [...stockList];
|
||||
|
||||
$: if ($isOpen) {
|
||||
websocketRealtimeData();
|
||||
console.log("WebSocket restarted");
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
// Initialize the download worker if not already done
|
||||
if ($isOpen) {
|
||||
await websocketRealtimeData();
|
||||
console.log("WebSocket restarted due to watchlist changes");
|
||||
}
|
||||
try {
|
||||
const savedRules = localStorage?.getItem(pagePathName);
|
||||
|
||||
|
||||
@ -580,6 +580,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
$: if ($isOpen) {
|
||||
websocketRealtimeData();
|
||||
console.log("WebSocket restarted");
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
try {
|
||||
const savedRules = localStorage?.getItem("watchlist-ruleOfList");
|
||||
@ -648,10 +653,6 @@
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
if ($isOpen) {
|
||||
await websocketRealtimeData();
|
||||
}
|
||||
|
||||
window.addEventListener("scroll", handleScroll);
|
||||
return () => {
|
||||
window.removeEventListener("scroll", handleScroll);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user