mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[Mobidziennik] Fix extracting when attachment has no size.
This commit is contained in:
parent
a133a96819
commit
f8a7d52b1d
@ -124,7 +124,7 @@ class MobidziennikWebGetMessage(
|
||||
val attachmentName = it.ownText()
|
||||
Regexes.MOBIDZIENNIK_MESSAGE_ATTACHMENT.find(it.outerHtml())?.let { match ->
|
||||
val attachmentId = match[1].toLong()
|
||||
var size = match[2].toFloatOrNull() ?: 0f
|
||||
var size = match[2].toFloatOrNull() ?: -1f
|
||||
when (match[3]) {
|
||||
"K" -> size *= 1024f
|
||||
"M" -> size *= 1024f * 1024f
|
||||
|
Loading…
Reference in New Issue
Block a user