Fixed lint 2

auto_join_3.3
Astagor 2020-05-14 14:27:03 +02:00
parent ceebea6a40
commit daf958d627
2 changed files with 12 additions and 4 deletions

View File

@ -304,13 +304,17 @@ export default class RoomClient
{
case String.fromCharCode(37):
{
const newPeerId = this._spotlights.getPrevAsSelected(store.getState().room.selectedPeerId);
const newPeerId = this._spotlights.getPrevAsSelected(
store.getState().room.selectedPeerId);
if (newPeerId) this.setSelectedPeer(newPeerId);
break;
}
case String.fromCharCode(39):
{
const newPeerId = this._spotlights.getNextAsSelected(store.getState().room.selectedPeerId);
const newPeerId = this._spotlights.getNextAsSelected(
store.getState().room.selectedPeerId);
if (newPeerId) this.setSelectedPeer(newPeerId);
break;
}

View File

@ -64,7 +64,8 @@ export default class Spotlights extends EventEmitter
index++;
for (let i = 0; i < this._unmutablePeerList.length; i++)
{
if (index >= this._unmutablePeerList.length) {
if (index >= this._unmutablePeerList.length)
{
index = 0;
}
newSelectedPeer = this._unmutablePeerList[index];
@ -75,6 +76,7 @@ export default class Spotlights extends EventEmitter
index++;
}
}
return newSelectedPeer;
}
@ -96,7 +98,8 @@ export default class Spotlights extends EventEmitter
index--;
for (let i = 0; i < this._unmutablePeerList.length; i++)
{
if (index < 0) {
if (index < 0)
{
index = this._unmutablePeerList.length - 1;
}
newSelectedPeer = this._unmutablePeerList[index];
@ -107,6 +110,7 @@ export default class Spotlights extends EventEmitter
index--;
}
}
return newSelectedPeer;
}