up
This commit is contained in:
+4
-5
@@ -90,7 +90,7 @@ export class Online {
|
||||
private previous: RemoteState | null = null
|
||||
private pollBusy = false
|
||||
private pollSession = ''
|
||||
private initialSound = true
|
||||
private lastSound: boolean | null = null
|
||||
private lastResults = -Infinity
|
||||
private resultsBusy = false
|
||||
private advanceBusy = false
|
||||
@@ -179,7 +179,6 @@ export class Online {
|
||||
this.screen = c.screen
|
||||
this.state.screenId = c.screen.id
|
||||
this.state.connection = 'waiting'
|
||||
this.initialSound = true
|
||||
}
|
||||
} catch (error) {
|
||||
if ((error as NodeJS.ErrnoException).code !== 'ENOENT')
|
||||
@@ -221,6 +220,7 @@ export class Online {
|
||||
this.generation++
|
||||
this.screen = null
|
||||
this.previous = null
|
||||
this.lastSound = null
|
||||
this.state.soundEnabled = null
|
||||
this.state.screenId = null
|
||||
this.state.connection = 'disabled'
|
||||
@@ -483,7 +483,6 @@ export class Online {
|
||||
this.screen = s
|
||||
this.state.screenId = s.id
|
||||
this.state.connection = 'waiting'
|
||||
this.initialSound = true
|
||||
await this.persistSecrets()
|
||||
return
|
||||
}
|
||||
@@ -624,10 +623,10 @@ export class Online {
|
||||
this.state.soundEnabled = next.sound
|
||||
if (this.state.connection === 'offline') this.state.error = ''
|
||||
this.state.connection = 'connected'
|
||||
if (!previous && this.initialSound) {
|
||||
this.initialSound = false
|
||||
if (!previous && this.lastSound !== next.sound) {
|
||||
send(this.controller, { action: 'mute', enabled: !next.sound })
|
||||
}
|
||||
this.lastSound = next.sound
|
||||
if (previous) {
|
||||
try {
|
||||
applyRemote(this.controller, previous, next)
|
||||
|
||||
Reference in New Issue
Block a user