Respect sync enabled on load
This commit is contained in:
parent
6906bc4f5e
commit
3501394de5
1 changed files with 3 additions and 1 deletions
|
|
@ -5,7 +5,7 @@ import { sleep } from "../utils/sleep";
|
||||||
|
|
||||||
export class ConnectionStatus {
|
export class ConnectionStatus {
|
||||||
private static readonly UNTIL_RESOLUTION = Symbol();
|
private static readonly UNTIL_RESOLUTION = Symbol();
|
||||||
private canFetch = true;
|
private canFetch: boolean;
|
||||||
private until: Promise<symbol>;
|
private until: Promise<symbol>;
|
||||||
private resolveUntil: (result: symbol) => void;
|
private resolveUntil: (result: symbol) => void;
|
||||||
private rejectUntil: (reason: unknown) => void;
|
private rejectUntil: (reason: unknown) => void;
|
||||||
|
|
@ -14,6 +14,8 @@ export class ConnectionStatus {
|
||||||
settings: Settings,
|
settings: Settings,
|
||||||
private readonly logger: Logger
|
private readonly logger: Logger
|
||||||
) {
|
) {
|
||||||
|
this.canFetch = settings.getSettings().isSyncEnabled;
|
||||||
|
|
||||||
[this.until, this.resolveUntil, this.rejectUntil] =
|
[this.until, this.resolveUntil, this.rejectUntil] =
|
||||||
createPromise<symbol>();
|
createPromise<symbol>();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue