Skip to content

Commit

Permalink
Merge branch 'ryg-git-issue-1740'
Browse files Browse the repository at this point in the history
  • Loading branch information
veloce committed Apr 7, 2022
2 parents 753408c + b3bd7ad commit a329d58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/ui/home/homeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { emptyFen } from '../../utils/fen'
import { gameIcon, hasNetwork } from '../../utils'
import i18n, { plural, formatNumber, distanceToNowStrict } from '../../i18n'
import session from '../../session'
import settings from '../../settings'
import { PongMessage, CorrespondenceSeek } from '../../lichess/interfaces'
import spinner from '../../spinner'
import * as helper from '../helper'
Expand Down Expand Up @@ -277,7 +278,8 @@ function renderFeaturedGame(ctrl: HomeCtrl) {
orientation: featured.orientation,
lastMove: featured.lastMove,
link: () => {
router.set('/tv?channel=best')
settings.tv.channel('best')
router.set('/tv')
},
gameObj: featured,
} : {
Expand Down
5 changes: 0 additions & 5 deletions src/ui/tv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ interface TVAttrs {
id: string
color: Color
flip: boolean
channel?: string
}

interface State {
Expand All @@ -24,10 +23,6 @@ const TV: Mithril.Component<TVAttrs, State> = {
oninit(vnode) {
sleepUtils.keepAwake()

if (vnode.attrs.channel) {
settings.tv.channel(vnode.attrs.channel)
}

xhr.featured(settings.tv.channel(), vnode.attrs.flip)
.then(d => {
d.tv = settings.tv.channel()
Expand Down

0 comments on commit a329d58

Please sign in to comment.