-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix part of #137: Topic-play-tab low-fi (part-1) (Without expandable list) #260
Conversation
@BenHenning This PR includes Topic-Play-Tab. In this I am stuck on one thing, their is progress associated with each story, but I am not able to find any function that I can use from For now I have directly kept progress value as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @rt4914, this LGTM as a start. Two things:
-
Please don't block on Fixes #166: Story activity UI structure #195. Feel free to check in a skeleton empty StoryActivity (in the place @hareshkh is implementing it so that it conflicts/his replaces it in-place) to unblock UI Structure: Topic activity/fragment #135 work
-
I believe you can compute progress using the chapter summaries within the story summary since they have reported completion statuses. Something like the following should work:
val storySummary = ...
val totalChapterCount = storySummary.chapterCount
val chapterSummaries = storySummary.chapterList
val completedChapterCount =
chapterSummaries.map(ChapterSummary::getPlayability)
.filter { it == ChapterSummary.Playability.COMPLETED }
.size
I suggest making this in a subsequent PR to keep this PR unblocked.
app/src/main/java/org/oppia/app/topic/play/StorySummaryAdapter.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/org/oppia/app/topic/play/TopicPlayViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/play/TopicPlayFragmentTest.kt
Outdated
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/play/TopicPlayFragmentTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/play/TopicPlayFragmentTest.kt
Show resolved
Hide resolved
app/src/sharedTest/java/org/oppia/app/topic/play/TopicPlayFragmentTest.kt
Outdated
Show resolved
Hide resolved
Introduced
Will finish this in a separate PR. |
All comments have been addressed and solved accordingly. Merging this PR now. |
Explanation
This PR corresponds to the Topic-Play-Tab in Topic.
PENDING
Checklist