Skip to content

Commit 88adc6c

Browse files
committed
Scoreboard tweaks.
1 parent 264611c commit 88adc6c

File tree

2 files changed

+145
-161
lines changed

2 files changed

+145
-161
lines changed

Moblin/RemoteControl/RemoteControl.swift

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -687,14 +687,6 @@ struct RemoteControlScoreboardGlobalStats: Codable {
687687
func minutesAndSeconds() -> (Int, Int) {
688688
return clockAsMinutesAndSeconds(clock: timer)
689689
}
690-
691-
func periodFull() -> String {
692-
return "\(periodLabel) \(period)"
693-
}
694-
695-
func infoBoxStats() -> [String] {
696-
return [timer, periodFull(), subPeriod].filter { !$0.isEmpty }
697-
}
698690
}
699691

700692
struct RemoteControlScoreboardMatchConfig: Codable {
@@ -705,6 +697,20 @@ struct RemoteControlScoreboardMatchConfig: Codable {
705697
var global: RemoteControlScoreboardGlobalStats
706698
// periphery: ignore
707699
var controls: [String: RemoteControlScoreboardControl]
700+
701+
func periodFull() -> String {
702+
switch sportId {
703+
case "football":
704+
return ""
705+
default:
706+
break
707+
}
708+
return "\(global.periodLabel) \(global.period)".trim()
709+
}
710+
711+
func infoBoxStats() -> [String] {
712+
return [global.timer, periodFull(), global.subPeriod].filter { !$0.isEmpty }
713+
}
708714
}
709715

710716
struct RemoteControlAuthentication: Codable {

0 commit comments

Comments
 (0)