Skip to content

Commit

Permalink
Fetch classroom ID from topic ID
Browse files Browse the repository at this point in the history
  • Loading branch information
theMr17 committed Jun 20, 2024
1 parent 8296e2e commit 8c5a77b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class TopicListController @Inject constructor(
title = topicRecord.translatableTitle
totalChapterCount = storyRecords.map { it.chaptersList.size }.sum()
topicThumbnail = topicRecord.topicThumbnail
classroomId = getClassroomIdByTopicId(topicId)
topicPlayAvailability = if (topicRecord.isPublished) {
TopicPlayAvailability.newBuilder().setAvailableToPlayNow(true).build()
} else {
Expand Down Expand Up @@ -262,7 +263,7 @@ class TopicListController @Inject constructor(
contentId = "title"
html = jsonObject.getStringFromObject("topic_name")
}.build()
val classroomId = jsonObject.getStringFromObject("classroom_id")
val classroomId = getClassroomIdByTopicId(topicId)
// No written translations are included since none are retrieved from JSON.
return TopicSummary.newBuilder()
.setTopicId(topicId)
Expand Down

0 comments on commit 8c5a77b

Please sign in to comment.