1
0
mirror of https://github.com/tateisu/SubwayTooter synced 2024-12-22 23:28:15 +01:00

read max_characters in instance information

This commit is contained in:
tateisu 2022-11-30 12:17:34 +09:00
parent 77cff8a484
commit 21fd16e077

View File

@ -39,6 +39,12 @@ private fun ActPost.getMaxCharCount(): Int {
// fall thru
}
info?.configuration
?.jsonObject("statuses")
?.int("max_characters")
?.takeIf { it > 0 }
?.let { return it }
info?.max_toot_chars
?.takeIf { it > 0 }
?.let { return it }