mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
[Vulcan/Web] Fix web login.
This commit is contained in:
parent
ede101ea20
commit
552acd4043
@ -121,11 +121,9 @@ val vulcanLoginMethods = listOf(
|
||||
|
||||
LoginMethod(LOGIN_TYPE_VULCAN, LOGIN_METHOD_VULCAN_API, VulcanLoginApi::class.java)
|
||||
.withIsPossible { _, loginStore ->
|
||||
loginStore.mode != LOGIN_MODE_VULCAN_HEBE
|
||||
loginStore.mode == LOGIN_MODE_VULCAN_API
|
||||
}
|
||||
.withRequiredLoginMethod { _, loginStore ->
|
||||
if (loginStore.mode == LOGIN_MODE_VULCAN_WEB) LOGIN_METHOD_VULCAN_WEB_MAIN else LOGIN_METHOD_NOT_NEEDED
|
||||
},
|
||||
.withRequiredLoginMethod { _, _ -> LOGIN_METHOD_NOT_NEEDED },
|
||||
|
||||
LoginMethod(LOGIN_TYPE_VULCAN, LOGIN_METHOD_VULCAN_HEBE, VulcanLoginHebe::class.java)
|
||||
.withIsPossible { _, loginStore ->
|
||||
|
@ -144,7 +144,7 @@ open class VulcanWebMain(open val data: DataVulcan, open val lastSync: Long?) {
|
||||
var count = 0
|
||||
while (clientIndex != -1 && count < 100) {
|
||||
val startIndex = clientIndex + clientUrl.length
|
||||
val endIndex = text.indexOf('/', startIndex = startIndex)
|
||||
val endIndex = text.indexOf('"', startIndex = startIndex)
|
||||
val schoolSymbol = text.substring(startIndex, endIndex)
|
||||
schoolSymbols += schoolSymbol
|
||||
clientIndex = text.indexOf(clientUrl, startIndex = endIndex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user