WIP. update UI when typing message received

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2023-05-16 17:26:50 +02:00
parent 50e7af4d04
commit 85f637ca8a
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -321,17 +321,13 @@ class ChatActivity :
override fun onStartTyping(session: String?) {
val name = webSocketInstance?.getDisplayNameForSession(session)
runOnUiThread {
Toast.makeText(this@ChatActivity, name + " started typing", Toast.LENGTH_SHORT).show()
}
// binding.typingIndicator.visibility = View.VISIBLE
binding.typingIndicator.text = name + " started typing"
}
override fun onStopTyping(session: String?) {
val name = webSocketInstance?.getDisplayNameForSession(session)
runOnUiThread {
Toast.makeText(this@ChatActivity, name + " stopped typing", Toast.LENGTH_SHORT).show()
}
// binding.typingIndicator.visibility = View.INVISIBLE
binding.typingIndicator.text = "x"
}
}