forked from github/szkolny
[API/Mobidziennik] Fix some errors.
This commit is contained in:
parent
30b6ac2a06
commit
0b1e7242bb
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
package pl.szczodrzynski.edziennik.data.api.edziennik.mobidziennik.data.api
|
package pl.szczodrzynski.edziennik.data.api.edziennik.mobidziennik.data.api
|
||||||
|
|
||||||
|
import android.text.Html
|
||||||
import androidx.core.util.contains
|
import androidx.core.util.contains
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.mobidziennik.DataMobidziennik
|
import pl.szczodrzynski.edziennik.data.api.edziennik.mobidziennik.DataMobidziennik
|
||||||
import pl.szczodrzynski.edziennik.data.api.models.DataRemoveModel
|
import pl.szczodrzynski.edziennik.data.api.models.DataRemoveModel
|
||||||
@ -25,7 +26,7 @@ class MobidziennikApiHomework(val data: DataMobidziennik, rows: List<String>) {
|
|||||||
val id = cols[0].toLong()
|
val id = cols[0].toLong()
|
||||||
val teacherId = cols[7].toLong()
|
val teacherId = cols[7].toLong()
|
||||||
val subjectId = cols[6].toLong()
|
val subjectId = cols[6].toLong()
|
||||||
val topic = cols[1]
|
val topic = Html.fromHtml(cols[1])?.toString() ?: ""
|
||||||
val eventDate = Date.fromYmd(cols[2])
|
val eventDate = Date.fromYmd(cols[2])
|
||||||
val startTime = Time.fromYmdHm(cols[3])
|
val startTime = Time.fromYmdHm(cols[3])
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class MobidziennikApiTeams(val data: DataMobidziennik, tableTeams: List<String>?
|
|||||||
|
|
||||||
val studentId = cols[1].toInt()
|
val studentId = cols[1].toInt()
|
||||||
val teamId = cols[2].toLong()
|
val teamId = cols[2].toLong()
|
||||||
val studentNumber = cols[4].toInt()
|
val studentNumber = cols[4].toIntOrNull() ?: -1
|
||||||
|
|
||||||
if (studentId != data.studentId)
|
if (studentId != data.studentId)
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user