diff --git a/src/front/static/ts/views/Friends.ts b/src/front/static/ts/views/Friends.ts index 1819f95..9b8db85 100644 --- a/src/front/static/ts/views/Friends.ts +++ b/src/front/static/ts/views/Friends.ts @@ -68,11 +68,7 @@ export default class extends Aview { console.log("could not remove friend"); } list_friends(); - list_friends(); - list_friends(); - list_friends(); - list_friends(); - list_friends(); + requestAnimationFrame(list_friends); } async function isFriendLogged(name: string): Promise { @@ -132,7 +128,7 @@ export default class extends Aview { const span = document.createElement('span'); span.className = "px-3"; - span.textContent = list[i].friendName; + span.textContent = list[i].friendDisplayName; const but = document.createElement('button'); but.textContent = "-"; diff --git a/src/front/static/ts/views/Tetris.ts b/src/front/static/ts/views/Tetris.ts index 29c347a..4790482 100644 --- a/src/front/static/ts/views/Tetris.ts +++ b/src/front/static/ts/views/Tetris.ts @@ -558,7 +558,7 @@ export default class extends Aview { } async loop(timestamp: number) { - if (!view.running) return this.removeListeners(); + if (!view.running) return; if (!this.lastDrop) this.lastDrop = timestamp; if (!this.isPaused) {