Added message counter

This commit is contained in:
Spitap 2022-03-11 12:25:16 +01:00
parent bffd5e0338
commit 277b16762c
No known key found for this signature in database
GPG Key ID: 66DC115FB72EDC69
1 changed files with 4 additions and 1 deletions

View File

@ -364,7 +364,10 @@ class ThreadActivity : SimpleActivity() {
thread_send_message.isClickable = false
thread_type_message.onTextChangeListener {
checkSendMessageAvailability()
thread_character_counter.text = it.length.toString()
val messageLength = it.length
val messageCounter: Int = messageLength / 160
@SuppressLint("SetTextI18n")
thread_character_counter.text = (160 - messageLength % 160).toString() + "/" + messageCounter.toString()
}
confirm_manage_contacts.setOnClickListener {