bump version number, make new release
This commit is contained in:
@@ -12,7 +12,7 @@ android {
|
||||
minSdk = 28
|
||||
targetSdk = 34
|
||||
versionCode = 1
|
||||
versionName = "1.0.5"
|
||||
versionName = "1.0.6"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
|
||||
@@ -168,12 +168,11 @@ class MainFragment : Fragment() {
|
||||
toolbar.text = text
|
||||
delay(delayTime)
|
||||
}
|
||||
for (text in loadingArray.reversedArray()) {
|
||||
if (loadingArray.indexOf(text) != 0) {
|
||||
toolbar.text = text
|
||||
delay(delayTime)
|
||||
}
|
||||
for (text in loadingArray.reversedArray().slice(1..<loadingArray.size)) {
|
||||
toolbar.text = text
|
||||
delay(delayTime)
|
||||
}
|
||||
delay(delayTime)
|
||||
}
|
||||
|
||||
// determine the role of the student
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.odweta.solon
|
||||
|
||||
import android.util.Log
|
||||
import org.json.JSONObject
|
||||
import java.time.LocalDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
@@ -17,7 +16,8 @@ class Parsing {
|
||||
if (hourspan == 1) {
|
||||
val detailHours = subj.getJSONArray("detailHours")
|
||||
subject.number = detailHours.getJSONObject(0).get("id").toString()
|
||||
subject.start = detailHours.getJSONObject(0).get("timeFrom").toString()
|
||||
subject.start =
|
||||
detailHours.getJSONObject(0).get("timeFrom").toString()
|
||||
subject.start = subject.start.slice(0..subject.start.length - 4)
|
||||
subject.end = detailHours.getJSONObject(0).get("timeto").toString()
|
||||
subject.end = subject.end.slice(0..subject.end.length - 4)
|
||||
@@ -44,11 +44,9 @@ class Parsing {
|
||||
}
|
||||
|
||||
fun userIsParent(): Boolean {
|
||||
return if (Vars.userData != "") {
|
||||
return if (Vars.userData != "")
|
||||
JSONObject(Vars.userData).getString("userType") == "parent"
|
||||
} else {
|
||||
false
|
||||
}
|
||||
else false
|
||||
}
|
||||
|
||||
fun parseTimeTableJSON(jsonString: String): List<Day> {
|
||||
@@ -78,13 +76,18 @@ class Parsing {
|
||||
|
||||
for (obj in jsonObjectList) {
|
||||
// for each day
|
||||
val dateRAW = obj.get("date").toString()
|
||||
var dayStr = dateRAW.split("T")[0].split("-")[2]
|
||||
var monthStr = dateRAW.split("T")[0].split("-")[1]
|
||||
|
||||
if (dayStr[0] == '0') { dayStr = dayStr.slice(1..<dayStr.length) }
|
||||
if (monthStr[0] == '0') { monthStr = monthStr.slice(1..<monthStr.length) }
|
||||
// get the month and day strings from the current date of the day
|
||||
val dateRAW = obj.getString("date")
|
||||
var (_, monthStr, dayStr) = dateRAW
|
||||
.split("T")[0]
|
||||
.split("-")
|
||||
|
||||
// remove leading zeros
|
||||
while (dayStr[0] == '0') { dayStr = dayStr.slice(1..<dayStr.length) }
|
||||
while (monthStr[0] == '0') { monthStr = monthStr.slice(1..<monthStr.length) }
|
||||
|
||||
// format it into a string that is readable
|
||||
val date = "$dayStr. $monthStr."
|
||||
|
||||
val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss")
|
||||
@@ -111,7 +114,6 @@ class Parsing {
|
||||
}
|
||||
|
||||
for (subj in subjectJSONList) {
|
||||
Log.d("debug", subj.toString())
|
||||
// for each subject in one particular day
|
||||
val subject = Subject()
|
||||
val kind = subj.getJSONObject("hourKind").get("id")
|
||||
@@ -268,7 +270,7 @@ class Parsing {
|
||||
day.date = date
|
||||
day.subjects = auxSubjects
|
||||
|
||||
// get rid of dulicates
|
||||
// get rid of duplicates
|
||||
val nextSubjects: MutableList<Subject> = mutableListOf()
|
||||
var prevSubject: Subject = Subject.empty()
|
||||
|
||||
@@ -339,17 +341,11 @@ class Parsing {
|
||||
|
||||
for (markJSON in marksList) {
|
||||
val mark = Mark()
|
||||
|
||||
mark.grade = markJSON.getString("markText")
|
||||
|
||||
mark.weight = markJSON.getString("weight")
|
||||
|
||||
mark.subject = subjectMap[markJSON.getString("subjectId")].toString()
|
||||
|
||||
mark.date = markJSON.getString("markDate")
|
||||
|
||||
mark.theme = markJSON.getString("theme")
|
||||
|
||||
marks[mark.subject]?.add(mark)
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user