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