diff --git a/mobile/app/src/main/java/com/odweta/solon/Launch.kt b/mobile/app/src/main/java/com/odweta/solon/Launch.kt index b2dd288..b78d53e 100644 --- a/mobile/app/src/main/java/com/odweta/solon/Launch.kt +++ b/mobile/app/src/main/java/com/odweta/solon/Launch.kt @@ -61,7 +61,8 @@ fun fetchNewData(ctx: Context, coscope: CoroutineScope) { val role = if (Parsing.userIsParent()) { " – Rodič" } else { - " – Student" + //TODO: remove + " – Student #############################################" } // display the full name of the user in the toolbar @@ -166,7 +167,9 @@ private suspend fun launchPhase1(ctx: Context) { marks = Parsing.parseMarksJSON(marksJSON) // set the settings - settingsData = Util.stringToSettingsData(Util.fileToString(settingsDataFilePath)) + if (Util.fileExists(settingsDataFilePath) && !Util.fileIsEmpty(settingsDataFilePath)) { + settingsData = Util.stringToSettingsData(Util.fileToString(settingsDataFilePath)) + } // else load the default settigns // continue to launch phase 2 done = true