File tree Expand file tree Collapse file tree 8 files changed +45
-18
lines changed
app/src/main/java/org/openedx/app/deeplink
dashboard/src/main/java/org/openedx
dates/src/main/java/org/openedx/dates/presentation Expand file tree Collapse file tree 8 files changed +45
-18
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,9 @@ class DeepLinkRouter(
212212 fm = fm,
213213 courseId = courseId,
214214 courseTitle = " " ,
215- openTab = " VIDEOS"
215+ openTab = " VIDEOS" ,
216+ resumeBlockId = " " ,
217+
216218 )
217219 }
218220 }
@@ -223,7 +225,8 @@ class DeepLinkRouter(
223225 fm = fm,
224226 courseId = courseId,
225227 courseTitle = " " ,
226- openTab = " DATES"
228+ openTab = " DATES" ,
229+ resumeBlockId = " " ,
227230 )
228231 }
229232 }
@@ -234,7 +237,8 @@ class DeepLinkRouter(
234237 fm = fm,
235238 courseId = courseId,
236239 courseTitle = " " ,
237- openTab = " DISCUSSIONS"
240+ openTab = " DISCUSSIONS" ,
241+ resumeBlockId = " " ,
238242 )
239243 }
240244 }
@@ -245,7 +249,8 @@ class DeepLinkRouter(
245249 fm = fm,
246250 courseId = courseId,
247251 courseTitle = " " ,
248- openTab = " MORE"
252+ openTab = " MORE" ,
253+ resumeBlockId = " " ,
249254 )
250255 }
251256 }
Original file line number Diff line number Diff line change @@ -190,7 +190,9 @@ class AllEnrolledCoursesViewModel(
190190 dashboardRouter.navigateToCourseOutline(
191191 fm = fragmentManager,
192192 courseId = courseId,
193- courseTitle = courseName
193+ courseTitle = courseName,
194+ openTab = " " ,
195+ resumeBlockId = " "
194196 )
195197 }
196198}
Original file line number Diff line number Diff line change @@ -146,6 +146,8 @@ class DashboardListFragment : Fragment() {
146146 fm = requireActivity().supportFragmentManager,
147147 courseId = it.course.id,
148148 courseTitle = it.course.name,
149+ resumeBlockId = " " ,
150+ openTab = " "
149151 )
150152 },
151153 onSwipeRefresh = {
Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ interface DashboardRouter {
99 fm : FragmentManager ,
1010 courseId : String ,
1111 courseTitle : String ,
12- openTab : String = "" ,
13- resumeBlockId : String = ""
12+ openTab : String ,
13+ resumeBlockId : String
1414 )
1515
1616 fun navigateToSettings (fm : FragmentManager )
Original file line number Diff line number Diff line change @@ -5,4 +5,12 @@ import androidx.fragment.app.FragmentManager
55interface DatesRouter {
66
77 fun navigateToSettings (fm : FragmentManager )
8+
9+ fun navigateToCourseOutline (
10+ fm : FragmentManager ,
11+ courseId : String ,
12+ courseTitle : String ,
13+ openTab : String ,
14+ resumeBlockId : String
15+ )
816}
Original file line number Diff line number Diff line change @@ -239,13 +239,17 @@ private fun DatesScreen(
239239 }
240240 }
241241 }
242- if (uiState.isLoading ) {
242+ if (uiState.canLoadMore ) {
243243 item {
244- CircularProgressIndicator (
245- modifier = Modifier
246- .align(Alignment .Center ),
247- color = MaterialTheme .appColors.primary
248- )
244+ Box (
245+ Modifier
246+ .fillMaxWidth()
247+ .height(42 .dp)
248+ .padding(16 .dp),
249+ contentAlignment = Alignment .Center
250+ ) {
251+ CircularProgressIndicator (color = MaterialTheme .appColors.primary)
252+ }
249253 }
250254 }
251255 }
Original file line number Diff line number Diff line change @@ -128,7 +128,13 @@ class DatesViewModel(
128128 fragmentManager : FragmentManager ,
129129 courseDate : CourseDate ,
130130 ) {
131-
131+ datesRouter.navigateToCourseOutline(
132+ fm = fragmentManager,
133+ courseId = courseDate.courseId,
134+ courseTitle = courseDate.courseName,
135+ openTab = " " ,
136+ resumeBlockId = courseDate.assignmentBlockId
137+ )
132138 }
133139
134140 private fun groupCourseDates (dates : List <CourseDate >): Map <DueDateCategory , List <CourseDate >> {
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ enum class DueDateCategory(
1111 @StringRes
1212 val label : Int ,
1313) {
14- PAST_DUE (R .string.dates_category_past_due),
15- TODAY (R .string.dates_category_today),
16- THIS_WEEK (R .string.dates_category_this_week),
14+ UPCOMING (R .string.dates_category_upcoming),
1715 NEXT_WEEK (R .string.dates_category_next_week),
18- UPCOMING (R .string.dates_category_upcoming);
16+ THIS_WEEK (R .string.dates_category_this_week),
17+ TODAY (R .string.dates_category_today),
18+ PAST_DUE (R .string.dates_category_past_due);
1919
2020 val color: Color
2121 @Composable
You can’t perform that action at this time.
0 commit comments