Migrate to private class properties/methods

This commit is contained in:
Jamie Kyle 2025-01-14 11:11:52 -08:00 committed by GitHub
commit aa9f53df57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
100 changed files with 3795 additions and 3944 deletions

View file

@ -12,7 +12,7 @@ const ringtoneEventQueue = new PQueue({
});
class CallingTones {
private ringtone?: Sound;
#ringtone?: Sound;
async handRaised() {
const canPlayTone = window.Events.getCallRingtoneNotification();
@ -41,9 +41,9 @@ class CallingTones {
async playRingtone() {
await ringtoneEventQueue.add(async () => {
if (this.ringtone) {
this.ringtone.stop();
this.ringtone = undefined;
if (this.#ringtone) {
this.#ringtone.stop();
this.#ringtone = undefined;
}
const canPlayTone = window.Events.getCallRingtoneNotification();
@ -51,20 +51,20 @@ class CallingTones {
return;
}
this.ringtone = new Sound({
this.#ringtone = new Sound({
loop: true,
soundType: SoundType.Ringtone,
});
await this.ringtone.play();
await this.#ringtone.play();
});
}
async stopRingtone() {
await ringtoneEventQueue.add(async () => {
if (this.ringtone) {
this.ringtone.stop();
this.ringtone = undefined;
if (this.#ringtone) {
this.#ringtone.stop();
this.#ringtone = undefined;
}
});
}