From fd217d80570acdcd82048d7c498cf527067137c0 Mon Sep 17 00:00:00 2001 From: Max Duval Date: Tue, 21 May 2024 17:36:42 +0100 Subject: [PATCH] Add missing atom types (#27169) --- common/app/model/content/Atoms.scala | 30 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/common/app/model/content/Atoms.scala b/common/app/model/content/Atoms.scala index 28db08f25c4..64ddfb21e16 100644 --- a/common/app/model/content/Atoms.scala +++ b/common/app/model/content/Atoms.scala @@ -7,32 +7,36 @@ import conf.Configuration import model.{ImageAsset, ImageMedia, ShareLinkMeta} final case class Atoms( - quizzes: Seq[QuizAtom], - media: Seq[MediaAtom], - interactives: Seq[InteractiveAtom], - reviews: Seq[ReviewAtom], + audios: Seq[AudioAtom], + charts: Seq[ChartAtom], + commonsdivisions: Seq[CommonsDivisionAtom], explainers: Seq[ExplainerAtom], - qandas: Seq[QandaAtom], guides: Seq[GuideAtom], + interactives: Seq[InteractiveAtom], + media: Seq[MediaAtom], profiles: Seq[ProfileAtom], + qandas: Seq[QandaAtom], + quizzes: Seq[QuizAtom], + reviews: Seq[ReviewAtom], timelines: Seq[TimelineAtom], - commonsdivisions: Seq[CommonsDivisionAtom], - audios: Seq[AudioAtom], - charts: Seq[ChartAtom], ) { val all: Seq[Atom] = quizzes ++ media ++ interactives ++ reviews ++ explainers ++ qandas ++ guides ++ profiles ++ timelines ++ commonsdivisions ++ audios ++ charts def atomTypes: Map[String, Boolean] = Map( + "audio" -> !audios.isEmpty, + "chart" -> !charts.isEmpty, + "commonsdivision" -> !commonsdivisions.isEmpty, + "explainer" -> !explainers.isEmpty, "guide" -> !guides.isEmpty, - "qanda" -> !qandas.isEmpty, + "interactive" -> !interactives.isEmpty, + "media" -> !media.isEmpty, "profile" -> !profiles.isEmpty, + "qanda" -> !qandas.isEmpty, + "quizz" -> !quizzes.isEmpty, + "review" -> !reviews.isEmpty, "timeline" -> !timelines.isEmpty, - "explainer" -> !explainers.isEmpty, - "commonsdivision" -> !commonsdivisions.isEmpty, - "audio" -> !audios.isEmpty, - "chart" -> !charts.isEmpty, ) }