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:
parent
77cff8a484
commit
21fd16e077
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user