mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
use worker-timers
This commit is contained in:
@@ -91,7 +91,7 @@ export const useGameLogStore = defineStore('GameLog', () => {
|
||||
gameLogTableData.length = 0;
|
||||
if (isLoggedIn) {
|
||||
// wait for friends to load, silly but works
|
||||
setTimeout(() => {
|
||||
workerTimers.setTimeout(() => {
|
||||
initGameLogTable();
|
||||
}, 800);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import { formatDateFilter, openExternalLink } from '../shared/utils';
|
||||
|
||||
import webApiService from '../service/webapi';
|
||||
|
||||
import * as workerTimers from 'worker-timers';
|
||||
|
||||
export const useVrcStatusStore = defineStore('VrcStatus', () => {
|
||||
const vrcStatusApiUrl = 'https://status.vrchat.com/api/v2';
|
||||
|
||||
@@ -137,7 +139,7 @@ export const useVrcStatusStore = defineStore('VrcStatus', () => {
|
||||
|
||||
function init() {
|
||||
getVrcStatus();
|
||||
setInterval(() => {
|
||||
workerTimers.setInterval(() => {
|
||||
if (Date.now() - lastTimeFetched.value > pollingInterval.value) {
|
||||
getVrcStatus();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user