Skip to content

Commit f7ca7e3

Browse files
feat: according designer feedback
1 parent 291a9a1 commit f7ca7e3

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

app/src/main/java/org/openedx/app/MainFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

app/src/main/java/org/openedx/app/room/AppDatabase.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import org.openedx.discovery.data.storage.DiscoveryDao
2727
const val DATABASE_VERSION = 4
2828
const val DATABASE_NAME = "OpenEdX_db"
2929

30+
@Suppress("MagicNumber")
3031
@Database(
3132
entities = [
3233
CourseEntity::class,

course/src/main/java/org/openedx/course/data/storage/CourseConverter.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import androidx.room.TypeConverter
44
import com.google.common.reflect.TypeToken
55
import com.google.gson.Gson
66
import org.openedx.core.data.model.room.BlockDb
7-
import org.openedx.core.data.model.room.CourseDateDB
87
import org.openedx.core.data.model.room.GradingPolicyDb
98
import org.openedx.core.data.model.room.SectionScoreDb
109
import org.openedx.core.data.model.room.discovery.CourseDateBlockDb
@@ -74,16 +73,4 @@ class CourseConverter {
7473
@TypeConverter
7574
fun toGradeRangeMap(value: String): Map<String, Float> =
7675
Gson().fromJson(value, object : TypeToken<Map<String, Float>>() {}.type)
77-
78-
@TypeConverter
79-
fun fromListOfCourseDateDB(value: List<CourseDateDB>): String {
80-
val json = Gson().toJson(value)
81-
return json.toString()
82-
}
83-
84-
@TypeConverter
85-
fun toListOfCourseDateDB(value: String): List<CourseDateDB> {
86-
val type = genericType<List<CourseDateDB>>()
87-
return Gson().fromJson(value, type)
88-
}
8976
}

dates/src/main/java/org/openedx/dates/presentation/dates/DatesScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)