Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
fix: Hide components with student_view_multi_device set to false
Browse files Browse the repository at this point in the history
Fixes: LEARNER-9671
  • Loading branch information
HamzaIsrar12 committed Nov 8, 2023
1 parent 2f85d15 commit 8333e8f
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,20 @@ class CourseUnitPagerAdapter(
CourseUnitDiscussionFragment.newInstance(minifiedUnit, courseData)
}

minifiedUnit is HtmlBlockModel -> {
minifiedUnit.setCourseId(courseData.course.id)
CourseUnitWebViewFragment.newInstance(minifiedUnit, courseData)
minifiedUnit.isMultiDevice.not() -> {
CourseUnitMobileNotSupportedFragment.newInstance(minifiedUnit, courseData)
}

minifiedUnit.isEmptyComponent -> {
CourseUnitEmptyFragment.newInstance(minifiedUnit)
}

minifiedUnit is HtmlBlockModel -> {
minifiedUnit.setCourseId(courseData.course.id)
CourseUnitWebViewFragment.newInstance(minifiedUnit, courseData)
}

else -> {
// in case of !minifiedUnit.isMultiDevice else executed
CourseUnitMobileNotSupportedFragment.newInstance(minifiedUnit, courseData)
}
}
Expand Down

0 comments on commit 8333e8f

Please sign in to comment.