-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Course Level Error Handling for Empty States #12
feat: Course Level Error Handling for Empty States #12
Conversation
- Empty state for Home, Videos, Dates, and Discussion tabs. - Empty state for handouts, and Announcements screen. fixes: LEARNER-10039
d8566c3
to
766abbd
Compare
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.
Just one question
@@ -224,6 +227,10 @@ private fun CourseOutlineUI( | |||
Box { | |||
when (uiState) { | |||
is CourseOutlineUIState.CourseData -> { | |||
if (uiState.courseStructure.blockData.isEmpty()) { | |||
NoContentScreen(noContentScreenType = NoContentScreenType.COURSE_OUTLINE) | |||
return@Surface |
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.
Strange to se return inside compose
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.
NoContentScreen
is a fullscreen error, so we don't want to show other content, so if the dates are empty return the flow, after showing the No content screen.
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.
I'm afraid that return will broke a compose tree, can you please use else in the CourseOutlineUIState.CourseData
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.
Please remove return from compose
Description
Course Level Error Handling for Empty States
Tickets