When calculating post length, count all urls as being of the reserved character count, even if they're shorter. (#2404)
Addresses #2399
This commit is contained in:
parent
2017d0b13b
commit
bbd818084d
2 changed files with 7 additions and 5 deletions
|
@ -716,7 +716,9 @@ class ComposeActivity :
|
|||
val urlSpans = binding.composeEditField.urls
|
||||
if (urlSpans != null) {
|
||||
for (span in urlSpans) {
|
||||
offset += max(0, span.url.length - charactersReservedPerUrl)
|
||||
// it's expected that this will be negative
|
||||
// when the url length is less than the reserved character count
|
||||
offset += (span.url.length - charactersReservedPerUrl)
|
||||
}
|
||||
}
|
||||
var length = binding.composeEditField.length() - offset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue