Commit 5940d353 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Remove player from known players list when it disappears

When a player item is removed and then added again later we would ignore it since we already know it.

Differential Revision: https://phabricator.kde.org/D20227
parent c3611dc9
......@@ -304,6 +304,11 @@ function setPlayerActive(player) {
}
function sendPlayerGone() {
var playerIdx = players.indexOf(activePlayer);
if (playerIdx > -1) {
players.splice(playerIdx, 1);
}
activePlayer = undefined;
pendingActivePlayer = undefined;
playerMetadata = {};
......@@ -409,7 +414,6 @@ function registerPlayer(player) {
});
});
// TODO remove it again when it goes away
players.push(player);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment