@ -21,7 +21,7 @@ struct MatchSummaryView: View {
var color : Color {
return Color ( white : 0.9 )
matchViewStyle = = . plainStyle ? Color ( uiColor : . tertiaryLabel ) : Color ( uiColor : . secondaryLabel )
// m a t c h V i e w S t y l e = = . p l a i n S t y l e ? C o l o r ( u i C o l o r : . t e r t i a r y L a b e l ) : C o l o r ( u i C o l o r : . s e c o n d a r y L a b e l )
}
var width : CGFloat {
@ -58,34 +58,27 @@ struct MatchSummaryView: View {
var matchSummaryView : some View {
VStack ( alignment : . leading ) {
if matchViewStyle != . plainStyle {
if matchViewStyle = = . feedStyle , let tournament = match . currentTournament ( ) {
tournamentHeaderView ( tournament )
}
HStack {
if match . isGroupStage ( ) && matchViewStyle != . feedStyle {
if let groupStage = match . groupStageObject , matchViewStyle = = . standardStyle {
if match . isGroupStage ( ) {
if let groupStage = match . groupStageObject {
Text ( groupStage . groupStageTitle ( ) )
} else if let round = match . roundObject {
Text ( round . roundTitle ( ) )
}
Text ( match . matchTitle ( ) )
} else if let currentTournament = match . currentTournament ( ) {
if matchViewStyle = = . feedStyle {
// t o u r n a m e n t H e a d e r V i e w ( c u r r e n t T o u r n a m e n t )
} else if matchViewStyle != . sectionedStandardStyle {
Text ( match . matchTitle ( . short ) )
}
}
if matchViewStyle = = . standardStyle || matchViewStyle = = . sectionedStandardStyle
{
Spacer ( )
if let court = match . courtName ( ) , match . hasEnded ( ) = = false {
Spacer ( )
Text ( court )
}
}
}
. lineLimit ( 1 )
}
if matchViewStyle != . feedStyle {
HStack ( spacing : 0 ) {
VStack ( alignment : . leading , spacing : matchViewStyle = = . plainStyle ? 8 : 0 ) {
PlayerBlockView ( match : match , teamPosition : . one , color : color , width : width )
@ -109,8 +102,7 @@ struct MatchSummaryView: View {
if matchViewStyle != . plainStyle {
HStack {
Spacer ( )
MatchDateView ( match : match , showPrefix : matchViewStyle = = . tournamentResultStyle ? true : false )
}
MatchDateView ( match : match , showPrefix : matchViewStyle = = . tournamentResultStyle )
}
}
}
@ -120,6 +112,7 @@ struct MatchSummaryView: View {
@ ViewBuilder
func tournamentHeaderView ( _ currentTournament : Tournament ) -> some View {
return Text ( currentTournament . tournamentTitle ( ) )
VStack ( alignment : . leading ) {
// H S t a c k {
// Z S t a c k ( a l i g n m e n t : . l e a d i n g ) {