Migrate to private class properties/methods

This commit is contained in:
Jamie Kyle
2025-01-14 11:11:52 -08:00
committed by GitHub
parent 7dbe57084b
commit aa9f53df57
100 changed files with 3795 additions and 3944 deletions

View File

@@ -41,16 +41,16 @@ export class UpdateKeysListener {
}
clearTimeoutIfNecessary(this.timeout);
this.timeout = setTimeout(() => this.runWhenOnline(), waitTime);
this.timeout = setTimeout(() => this.#runWhenOnline(), waitTime);
}
private scheduleNextUpdate(): void {
#scheduleNextUpdate(): void {
const now = Date.now();
const nextTime = now + UPDATE_INTERVAL;
void window.textsecure.storage.put(UPDATE_TIME_STORAGE_KEY, nextTime);
}
private async run(): Promise<void> {
async #run(): Promise<void> {
log.info('UpdateKeysListener: Updating keys...');
try {
const accountManager = window.getAccountManager();
@@ -79,7 +79,7 @@ export class UpdateKeysListener {
}
}
this.scheduleNextUpdate();
this.#scheduleNextUpdate();
this.setTimeoutForNextRun();
} catch (error) {
const errorString =
@@ -93,9 +93,9 @@ export class UpdateKeysListener {
}
}
private runWhenOnline() {
#runWhenOnline() {
if (window.textsecure.server?.isOnline()) {
void this.run();
void this.#run();
} else {
log.info(
'UpdateKeysListener: We are offline; will update keys when we are next online'