made new release 2.4.1

This commit is contained in:
odweta
2025-01-15 21:29:06 +01:00
parent 4cb07126e2
commit 7907429aea
6 changed files with 368 additions and 9 deletions
@@ -90,9 +90,6 @@ fun launchContinue(
global.newMarks = Parsing.parseNewMarks(marks)
global.finalMarks = Parsing.parseFinalMarks(finalMarks)
// // load the settings
// global.settings = Util.fileToString(global.filePaths.settings).toSettingsData()
// load the lecture notes
Util.loadLectureNotes()
Util.csvToLectureNotes()
@@ -101,6 +98,7 @@ fun launchContinue(
if (!global.internetAwaitListenerRunning)
setOnInternetAvailListener(ctx)
// FIXME maybe? causes IndexOutOfBoundsException????? prob not tho
if (!global.launched) {
// show the default (main) screen
global.currentScreen = Screen.Main
@@ -1,5 +1,6 @@
package com.odweta.solon
import android.util.Log
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.background
import androidx.compose.foundation.border
@@ -25,6 +26,7 @@ import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
@@ -244,6 +246,9 @@ fun FinalMarksScreen() {
) {
Text(Util.fileToString(global.filePaths.finalMarks), color = Color.White)
for ((subject, mark) in global.finalMarks) {
// LaunchedEffect(Unit) {
// Log.d("debug", networkRequestFactory.perform(NetworkRequestType.Apologies).body.string?.toString())
//}
Row {
Text(subject, color = Color.White)
Text(mark.toString(), color = Color.White, modifier = Modifier.padding(10.dp))
@@ -233,7 +233,23 @@ fun DayPager() {
state = pagerState,
modifier = Modifier.fillMaxSize()
) { pageIndex ->
DayScreen(global.timetable[pageIndex])
if (global.timetable.isNotEmpty()) {
DayScreen(global.timetable[pageIndex])
} else {
NoDayScreen()
}
}
}
@Composable
fun NoDayScreen() {
Box(Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text(
"Zatím žádný rozvrh.",
color = Color.White,
fontSize = 30.sp,
fontStyle = FontStyle.Italic
)
}
}
@@ -537,7 +553,7 @@ private fun DayScreen(day: Day) {
.clickable {
global.selectedLecture = lectureId
showDetailDialog = true
})
})
if (
(global.lectureNotes[global.selectedLecture] != null &&