Skip to content

Commit

Permalink
Add missing atom types (#27169)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxdvl authored May 21, 2024
1 parent aeb19f7 commit fd217d8
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions common/app/model/content/Atoms.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
}

Expand Down

0 comments on commit fd217d8

Please sign in to comment.