fixed settings file read error
This commit is contained in:
@@ -61,7 +61,8 @@ fun fetchNewData(ctx: Context, coscope: CoroutineScope) {
|
|||||||
val role = if (Parsing.userIsParent()) {
|
val role = if (Parsing.userIsParent()) {
|
||||||
" – Rodič"
|
" – Rodič"
|
||||||
} else {
|
} else {
|
||||||
" – Student"
|
//TODO: remove
|
||||||
|
" – Student #############################################"
|
||||||
}
|
}
|
||||||
|
|
||||||
// display the full name of the user in the toolbar
|
// display the full name of the user in the toolbar
|
||||||
@@ -166,7 +167,9 @@ private suspend fun launchPhase1(ctx: Context) {
|
|||||||
marks = Parsing.parseMarksJSON(marksJSON)
|
marks = Parsing.parseMarksJSON(marksJSON)
|
||||||
|
|
||||||
// set the settings
|
// set the settings
|
||||||
|
if (Util.fileExists(settingsDataFilePath) && !Util.fileIsEmpty(settingsDataFilePath)) {
|
||||||
settingsData = Util.stringToSettingsData(Util.fileToString(settingsDataFilePath))
|
settingsData = Util.stringToSettingsData(Util.fileToString(settingsDataFilePath))
|
||||||
|
} // else load the default settigns
|
||||||
|
|
||||||
// continue to launch phase 2
|
// continue to launch phase 2
|
||||||
done = true
|
done = true
|
||||||
|
|||||||
Reference in New Issue
Block a user