소스 검색

WIP. update UI when typing message received

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 2 년 전
부모
커밋
85f637ca8a
1개의 변경된 파일4개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 8
      app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt

+ 4 - 8
app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt

@@ -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"
         }
     }