From aaab373d506f753c05c52a823c69a38a1e1c218f Mon Sep 17 00:00:00 2001 From: Vincent Velociter Date: Tue, 28 Dec 2021 10:40:36 +0100 Subject: [PATCH] Fix tournament featured game clock --- src/lichess/interfaces/tournament.ts | 4 ++-- src/ui/tournament/detail/TournamentCtrl.ts | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lichess/interfaces/tournament.ts b/src/lichess/interfaces/tournament.ts index 0340eb667d..0e93a549a3 100644 --- a/src/lichess/interfaces/tournament.ts +++ b/src/lichess/interfaces/tournament.ts @@ -1,4 +1,4 @@ -import { FeaturedGame } from '.' +import { FeaturedGame2 } from '.' import { ChatData } from './chat' import { Opening } from './game' @@ -6,7 +6,7 @@ export interface Tournament { readonly chat?: ChatData readonly clock: TournamentClock readonly createdBy: string - featured?: FeaturedGame + featured?: FeaturedGame2 readonly fullName: string readonly id: string readonly isFinished: boolean diff --git a/src/ui/tournament/detail/TournamentCtrl.ts b/src/ui/tournament/detail/TournamentCtrl.ts index 874fb28ad8..ae17a538bc 100644 --- a/src/ui/tournament/detail/TournamentCtrl.ts +++ b/src/ui/tournament/detail/TournamentCtrl.ts @@ -216,9 +216,6 @@ export default class TournamentCtrl { if (data.featured && (!oldData || !oldData.featured || (data.featured.id !== oldData.featured.id))) { this.socketIface.send('startWatching', data.featured.id) } - else if (data.featured && (!oldData || !oldData.featured || (data.featured.id === oldData.featured.id))) { - data.featured = oldData.featured - } this.tournament = { ...this.tournament, ...data, ...{ me: data.me } } // to account for removal on withdraw this.setPageCache(data.standing) if (this.pagesCache[this.page] !== undefined) {