Small improvements

- Improve formatting
- Fix some typos
- Mini code improvements
This commit is contained in:
2021-10-13 16:39:01 +02:00
parent f9cc9b5e14
commit 993b8f6a71
4 changed files with 11 additions and 11 deletions

View File

@ -72,7 +72,7 @@ class TimetableParser(timetableURL: String? = null, htmlDoc: Document? = null) {
var lessonIndexDay = 0 // the index of the lesson per timeslot
// elements are now all lessons, including empty ones
row.select("td.lastcol, td[style]").forEach {element ->
row.select("td.lastcol, td[style]").forEach { element ->
// if there is a lecture with rowspan="2", we need to shift everything by one to the left. This is stupid and ugly there needs to bee an API
if ((sDay > -1 && sRow > -1) && (sDay == day && ((sRow + 1) == rowIndex))) {
@ -115,8 +115,7 @@ class TimetableParser(timetableURL: String? = null, htmlDoc: Document? = null) {
lessonIndexDay++
if (element.hasClass("lastcol"))
{
if (element.hasClass("lastcol")) {
day++
lessonIndexDay = 0
}