made the showRefreshButton setting work
This commit is contained in:
@@ -62,11 +62,7 @@ fun TimetableScreen() {
|
||||
contentAlignment = Alignment.BottomCenter
|
||||
) {
|
||||
DayPager()
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(bottom = 10.dp)
|
||||
.background(color = Color.Black, shape = RoundedCornerShape(roundedCornerDimen))
|
||||
) {
|
||||
if (settingsData.showRefreshButton.checked.value) {
|
||||
RefreshButton()
|
||||
}
|
||||
}
|
||||
@@ -89,6 +85,11 @@ fun RefreshButton(modifier: Modifier = Modifier) {
|
||||
val coscope = rememberCoroutineScope()
|
||||
val ctx = LocalContext.current
|
||||
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.padding(bottom = 10.dp)
|
||||
.background(color = Color.Black, shape = RoundedCornerShape(roundedCornerDimen))
|
||||
) {
|
||||
Button(
|
||||
onClick = {
|
||||
coscope.launch {
|
||||
@@ -114,6 +115,7 @@ fun RefreshButton(modifier: Modifier = Modifier) {
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getSubjectColor(s: Subject, transparent: Boolean): Color {
|
||||
return if (s.free) {
|
||||
@@ -373,7 +375,9 @@ private fun DayScreen(day: Day) {
|
||||
}
|
||||
}
|
||||
// TODO: remove when added settings to turn the refresh button on/off
|
||||
if (settingsData.showRefreshButton.checked.value) {
|
||||
Spacer(modifier = Modifier.height(90.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user