0.3.03
This commit is contained in:
@@ -56,8 +56,9 @@ type RemoteConfigFeatures struct {
|
||||
}
|
||||
|
||||
type RemoteConfigPresentation struct {
|
||||
NavigationRailExpandedWidthDp int `json:"navigationRailExpandedWidthDp"`
|
||||
NavigationContentShiftDp int `json:"navigationContentShiftDp"`
|
||||
NavigationRailExpandedWidthDp int `json:"navigationRailExpandedWidthDp"`
|
||||
NavigationContentShiftDp int `json:"navigationContentShiftDp"`
|
||||
FontFamily string `json:"fontFamily"`
|
||||
}
|
||||
|
||||
// The remainder of the document is deliberately declarative. A new server-side row or
|
||||
@@ -160,6 +161,7 @@ func DefaultRemoteConfig() RemoteConfig {
|
||||
Presentation: RemoteConfigPresentation{
|
||||
NavigationRailExpandedWidthDp: 184,
|
||||
NavigationContentShiftDp: 112,
|
||||
FontFamily: "system",
|
||||
},
|
||||
Home: RemoteHomeConfig{
|
||||
Sections: []string{"continue", "for-you", "favorites", "latest-movies"},
|
||||
@@ -262,6 +264,9 @@ func validateRemoteConfig(document RemoteConfig) error {
|
||||
if shift < 80 || shift > 160 || shift >= width {
|
||||
return fmt.Errorf("navigationContentShiftDp must be between 80 and 160 and less than the rail width")
|
||||
}
|
||||
if document.Presentation.FontFamily != "system" && document.Presentation.FontFamily != "inter" {
|
||||
return fmt.Errorf("fontFamily must be system or inter")
|
||||
}
|
||||
if err := validateRemoteConfigSections(document); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user