From 6a33088352fd62b1b96dd4dde7d4b07ede95fccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Fri, 26 Feb 2021 20:37:21 +0100 Subject: [PATCH] [Vulcan/Web] Fix extracting school symbol. --- .../edziennik/data/api/edziennik/vulcan/data/VulcanWebMain.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3cd52394..d32161a6 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 @@ -168,7 +168,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.indexOfAny(charArrayOf('"', '/'), startIndex = startIndex) val schoolSymbol = text.substring(startIndex, endIndex) schoolSymbols += schoolSymbol clientIndex = text.indexOf(clientUrl, startIndex = endIndex)