diff options
| author | bobzel <zzzman@gmail.com> | 2024-05-19 02:08:43 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-05-19 02:08:43 -0400 |
| commit | 6841dc0fd2aecf31eda2102e660c58905d1e6f44 (patch) | |
| tree | 821b79178aa07001274759c716badb2a8a170056 /src/client/util/PingManager.ts | |
| parent | 2fc1fb7d322ab0950afb0d334c17aa93bd16f6c0 (diff) | |
| parent | 13dc6de0e0099f699ad0d2bb54401e6a0aa25018 (diff) | |
merged with soon-to-be-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) { |
