File tree Expand file tree Collapse file tree 4 files changed +3
-17
lines changed
app/src/main/java/org/openedx/app
course/src/main/java/org/openedx/course/data/storage
dates/src/main/java/org/openedx/dates/presentation/dates Expand file tree Collapse file tree 4 files changed +3
-17
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ class MainFragment : Fragment(R.layout.fragment_main) {
106106 add(R .id.fragmentDownloads to { DownloadsFragment () })
107107 }
108108 if (viewModel.isDatesFragmentEnabled) {
109- add(R .id.fragmentDates to DatesFragment ())
109+ add(R .id.fragmentDates to { DatesFragment () } )
110110 }
111111 add(R .id.fragmentProfile to { ProfileFragment () })
112112 }
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ const val DATABASE_NAME = "OpenEdX_db"
4242 CourseEnrollmentDetailsEntity ::class ,
4343 CourseDateEntity ::class ,
4444 VideoProgressEntity ::class ,
45- CourseDatesResponseEntity ::class ,
4645 CourseProgressEntity ::class ,
4746 ],
4847 autoMigrations = [
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import androidx.room.TypeConverter
44import com.google.common.reflect.TypeToken
55import com.google.gson.Gson
66import org.openedx.core.data.model.room.BlockDb
7- import org.openedx.core.data.model.room.CourseDateDB
87import org.openedx.core.data.model.room.GradingPolicyDb
98import org.openedx.core.data.model.room.SectionScoreDb
109import org.openedx.core.data.model.room.discovery.CourseDateBlockDb
@@ -84,16 +83,4 @@ class CourseConverter {
8483 @TypeConverter
8584 fun toGradeRangeMap (value : String ): Map <String , Float > =
8685 Gson ().fromJson(value, object : TypeToken <Map <String , Float >>() {}.type)
87-
88- @TypeConverter
89- fun fromListOfCourseDateDB (value : List <CourseDateDB >): String {
90- val json = Gson ().toJson(value)
91- return json.toString()
92- }
93-
94- @TypeConverter
95- fun toListOfCourseDateDB (value : String ): List <CourseDateDB > {
96- val type = genericType<List <CourseDateDB >>()
97- return Gson ().fromJson(value, type)
98- }
9986}
Original file line number Diff line number Diff line change @@ -134,7 +134,8 @@ fun DatesScreen(
134134 LazyColumn (
135135 modifier = contentWidth.fillMaxSize(),
136136 state = scrollState,
137- contentPadding = PaddingValues (bottom = 48 .dp)
137+ contentPadding = PaddingValues (bottom = 48 .dp, top = 24 .dp),
138+ verticalArrangement = Arrangement .spacedBy(16 .dp)
138139 ) {
139140 uiState.dates.keys.forEach { sectionKey ->
140141 val dates = uiState.dates[sectionKey].orEmpty()
@@ -144,7 +145,6 @@ fun DatesScreen(
144145 if (isHavePastRelatedDates) {
145146 item {
146147 ShiftDueDatesCard (
147- modifier = Modifier .padding(top = 12 .dp),
148148 isButtonEnabled = ! uiState.isShiftDueDatesPressed,
149149 onClick = {
150150 onAction(DatesViewActions .ShiftDueDate )
You can’t perform that action at this time.
0 commit comments