File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
samplekotlin/src/main/java/com/example/chattutorial Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import com.getstream.sdk.chat.viewmodel.messages.MessageListViewModel.Mode.Threa
1717import com.getstream.sdk.chat.viewmodel.messages.MessageListViewModel.State.NavigateUp
1818import com.getstream.sdk.chat.viewmodel.messages.bindView
1919import io.getstream.chat.android.client.ChatClient
20+ import io.getstream.chat.android.client.controllers.subscribeFor
2021import io.getstream.chat.android.client.events.TypingStartEvent
2122import io.getstream.chat.android.client.events.TypingStopEvent
2223import io.getstream.chat.android.client.models.Channel
@@ -87,12 +88,11 @@ class ChannelActivity4 : AppCompatActivity() {
8788 ChatClient
8889 .instance()
8990 .channel(cid)
90- .subscribeFor(this , TypingStartEvent ::class .java , TypingStopEvent ::class .java
91+ .subscribeFor(this , TypingStartEvent ::class , TypingStopEvent ::class
9192 ) { event ->
9293 when (event) {
9394 is TypingStartEvent -> currentlyTyping.add(event.user.name)
9495 is TypingStopEvent -> currentlyTyping.remove(event.user.name)
95- else -> Unit
9696 }
9797
9898 binding.typingHeader.text = when {
You can’t perform that action at this time.
0 commit comments