diff options
author | bobzel <zzzman@gmail.com> | 2024-05-03 10:55:33 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-05-03 10:55:33 -0400 |
commit | f927a585c75a20629379bcb34d1483c0ca9d8db9 (patch) | |
tree | f070e9e64ecaf251e6708b8ce4d722f121a6d039 /src/client/util/PingManager.ts | |
parent | 723c8b33ade753764d1d02b130c189fb65e20425 (diff) | |
parent | 9b424c94d7a89950e9cf3f72e684bd15a61e87ae (diff) |
merged with new version of master
Diffstat (limited to 'src/client/util/PingManager.ts')
-rw-r--r-- | src/client/util/PingManager.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/util/PingManager.ts b/src/client/util/PingManager.ts index 7638e2ce0..255e9cee0 100644 --- a/src/client/util/PingManager.ts +++ b/src/client/util/PingManager.ts @@ -1,8 +1,10 @@ import { action, makeObservable, observable, runInAction } from 'mobx'; import { Networking } from '../Network'; -import { CurrentUserUtils } from './CurrentUserUtils'; +import { SnappingManager } from './SnappingManager'; + export class PingManager { // create static instance and getter for global use + // eslint-disable-next-line no-use-before-define @observable static _instance: PingManager; @observable IsBeating = true; static get Instance(): PingManager { @@ -29,7 +31,9 @@ export class PingManager { sendPing = async (): Promise<void> => { try { const res = await Networking.PostToServer('/ping', { date: new Date() }); - runInAction(() => (CurrentUserUtils.ServerVersion = res.message)); + runInAction(() => { + SnappingManager.SetServerVersion(res.message); + }); !this.IsBeating && this.setIsBeating(true); } catch { if (this.IsBeating) { |