diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/LoginMethods.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/LoginMethods.kt index d70dd54e..b154e96e 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/LoginMethods.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/LoginMethods.kt @@ -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 -> diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/VulcanWebMain.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/VulcanWebMain.kt index 39433657..5d51839e 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/VulcanWebMain.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/VulcanWebMain.kt @@ -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)