mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-04-19 19:14:51 +00:00
Fixed comment character counter.
This commit is contained in:
parent
e1882f19e8
commit
11f5f0dfe1
1 changed files with 3 additions and 2 deletions
|
@ -71,8 +71,9 @@ class CommentDialog(context: Context?, val contextUrl: String, val ref: Protocol
|
|||
_editComment.addTextChangedListener(object : TextWatcher {
|
||||
override fun afterTextChanged(s: Editable?) = Unit
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
_textCharacterCount.text = (s?.length ?: 0).toString();
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, c: Int) {
|
||||
val count = s?.length ?: 0;
|
||||
_textCharacterCount.text = count.toString();
|
||||
|
||||
if (count > PolycentricPlatformComment.MAX_COMMENT_SIZE) {
|
||||
_textCharacterCount.setTextColor(Color.RED);
|
||||
|
|
Loading…
Add table
Reference in a new issue