Skip to content

Commit

Permalink
Merge pull request #326 from guardian/gl/move-suppress-images-prop
Browse files Browse the repository at this point in the history
Remove suppress images prop from fronts tool settings
  • Loading branch information
Georges-GNM authored Oct 3, 2024
2 parents 6261e94 + 1b3d50f commit dde9e2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ object FrontsToolSettings {
}

case class FrontsToolSettings (
displayEditWarning: Option[Boolean],
suppressImages: Option[Boolean])
displayEditWarning: Option[Boolean]
)

object DisplayHintsJson {
implicit val jsonFormat: OFormat[DisplayHintsJson] = Json.format[DisplayHintsJson]
Expand Down Expand Up @@ -226,7 +226,8 @@ object CollectionConfigJson {
userVisibility: Option[String] = None,
targetedTerritory: Option[TargetedTerritory] = None,
platform: Option[CollectionPlatform] = None,
frontsToolSettings: Option[FrontsToolSettings] = None
frontsToolSettings: Option[FrontsToolSettings] = None,
suppressImages: Option[Boolean] = None
): CollectionConfigJson
= CollectionConfigJson(
displayName,
Expand All @@ -249,7 +250,8 @@ object CollectionConfigJson {
userVisibility,
targetedTerritory,
platform,
frontsToolSettings
frontsToolSettings,
suppressImages
)
}

Expand All @@ -275,7 +277,7 @@ case class CollectionConfigJson(
targetedTerritory: Option[TargetedTerritory],
platform: Option[CollectionPlatform],
frontsToolSettings: Option[FrontsToolSettings],

suppressImages: Option[Boolean]
) {
val collectionType = `type`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ case class CollectionConfig(
userVisibility: Option[String],
targetedTerritory: Option[TargetedTerritory],
platform: CollectionPlatform = AnyPlatform,
frontsToolSettings: Option[FrontsToolSettings])
frontsToolSettings: Option[FrontsToolSettings],
suppressImages: Boolean)

object CollectionConfig {
val DefaultCollectionType = "fixed/small/slow-IV"
Expand All @@ -60,7 +61,8 @@ object CollectionConfig {
userVisibility = None,
targetedTerritory = None,
platform = AnyPlatform,
frontsToolSettings = None)
frontsToolSettings = None,
suppressImages = false)

def fromCollectionJson(collectionJson: CollectionConfigJson): CollectionConfig =
CollectionConfig(
Expand All @@ -84,5 +86,6 @@ object CollectionConfig {
collectionJson.userVisibility,
collectionJson.targetedTerritory,
collectionJson.platform.getOrElse(AnyPlatform),
collectionJson.frontsToolSettings)
collectionJson.frontsToolSettings,
collectionJson.suppressImages.exists(identity))
}

0 comments on commit dde9e2f

Please sign in to comment.