mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[APIv2/Vulcan] Update uonet-request-signer. Update removing profile. Fix minor issues.
This commit is contained in:
parent
e3bb607303
commit
64019dccf7
@ -161,7 +161,7 @@ dependencies {
|
|||||||
|
|
||||||
implementation "org.redundent:kotlin-xml-builder:1.5.3"
|
implementation "org.redundent:kotlin-xml-builder:1.5.3"
|
||||||
|
|
||||||
implementation "io.github.wulkanowy:signer-android:0.1.0"
|
implementation "io.github.wulkanowy:signer-android:0.1.1"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -40,7 +40,7 @@ open class VulcanApi(open val data: DataVulcan) {
|
|||||||
d(tag, "Request: Vulcan/Api - $url")
|
d(tag, "Request: Vulcan/Api - $url")
|
||||||
|
|
||||||
if (data.teamList.size() == 0) {
|
if (data.teamList.size() == 0) {
|
||||||
data.profile?.getStudentData("studentClassName", null)?.also { name ->
|
data.profile?.studentClassName?.also { name ->
|
||||||
val id = Utils.crc16(name.toByteArray()).toLong()
|
val id = Utils.crc16(name.toByteArray()).toLong()
|
||||||
|
|
||||||
val teamObject = Team(
|
val teamObject = Team(
|
||||||
|
@ -63,7 +63,7 @@ class VulcanApiEvents(override val data: DataVulcan, private val isHomework: Boo
|
|||||||
else -> Event.TYPE_EXAM
|
else -> Event.TYPE_EXAM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val teamId = event.getLong("IdOddzial") ?: data.teamClass?.id ?: return@forEach
|
val teamId = event.getLong("IdOddzial") ?: data.teamClass?.id ?: -1
|
||||||
|
|
||||||
val eventObject = Event(
|
val eventObject = Event(
|
||||||
profileId,
|
profileId,
|
||||||
|
@ -44,7 +44,7 @@ class VulcanFirstLogin(val data: DataVulcan, val onSuccess: () -> Unit) {
|
|||||||
val studentId = student.getInt("Id") ?: return@forEach
|
val studentId = student.getInt("Id") ?: return@forEach
|
||||||
val studentLoginId = student.getInt("UzytkownikLoginId") ?: return@forEach
|
val studentLoginId = student.getInt("UzytkownikLoginId") ?: return@forEach
|
||||||
val studentClassId = student.getInt("IdOddzial") ?: return@forEach
|
val studentClassId = student.getInt("IdOddzial") ?: return@forEach
|
||||||
val studentClassName = student.getString("OkresPoziom").toString() + student.getString("OddzialSymbol")
|
val studentClassName = student.getString("OkresPoziom").toString() + (student.getString("OddzialSymbol") ?: return@forEach)
|
||||||
val studentSemesterId = student.getInt("IdOkresKlasyfikacyjny") ?: return@forEach
|
val studentSemesterId = student.getInt("IdOkresKlasyfikacyjny") ?: return@forEach
|
||||||
val studentFirstName = student.getString("Imie") ?: ""
|
val studentFirstName = student.getString("Imie") ?: ""
|
||||||
val studentLastName = student.getString("Nazwisko") ?: ""
|
val studentLastName = student.getString("Nazwisko") ?: ""
|
||||||
|
@ -1161,6 +1161,13 @@ public class Edziennik {
|
|||||||
app.db.teamDao().clear(profileId);
|
app.db.teamDao().clear(profileId);
|
||||||
app.db.messageRecipientDao().clear(profileId);
|
app.db.messageRecipientDao().clear(profileId);
|
||||||
app.db.messageDao().clear(profileId);
|
app.db.messageDao().clear(profileId);
|
||||||
|
app.db.endpointTimerDao().clear(profileId);
|
||||||
|
app.db.attendanceTypeDao().clear(profileId);
|
||||||
|
app.db.classroomDao().clear(profileId);
|
||||||
|
app.db.lessonRangeDao().clear(profileId);
|
||||||
|
app.db.noticeTypeDao().clear(profileId);
|
||||||
|
app.db.teacherAbsenceDao().clear(profileId);
|
||||||
|
app.db.teacherAbsenceTypeDao().clear(profileId);
|
||||||
|
|
||||||
int loginStoreId = profileObject.getLoginStoreId();
|
int loginStoreId = profileObject.getLoginStoreId();
|
||||||
List<Integer> profilesUsingLoginStore = app.db.profileDao().getIdsByLoginStoreIdNow(loginStoreId);
|
List<Integer> profilesUsingLoginStore = app.db.profileDao().getIdsByLoginStoreIdNow(loginStoreId);
|
||||||
|
Loading…
Reference in New Issue
Block a user