File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
src/main/java/com/example/chattutorialjava
samplekotlin/src/main/java/com/example/chattutorial Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ android {
3434
3535dependencies {
3636 implementation " org.jetbrains.kotlin:kotlin-stdlib:1.4.10"
37- implementation " com.github. getstream:stream-chat-android:4.4.1 "
37+ implementation " io. getstream:stream-chat-android:4.4.5 "
3838 implementation " io.coil-kt:coil:1.0.0"
3939
4040 implementation " androidx.lifecycle:lifecycle-viewmodel:2.3.0-beta01"
Original file line number Diff line number Diff line change @@ -117,12 +117,12 @@ public void handleOnBackPressed() {
117117 ChannelController channelController = result .data ();
118118
119119 // Observe typing users
120- channelController .getTyping ().observe (this , users -> {
121- if (users .isEmpty ()) {
120+ channelController .getTyping ().observe (this , typingState -> {
121+ if (typingState . getUsers () .isEmpty ()) {
122122 typingHeaderView .setText (nobodyTyping );
123123 } else {
124124 List <String > userNames = new LinkedList <>();
125- for (User user : users ) {
125+ for (User user : typingState . getUsers () ) {
126126 userNames .add ((String ) user .getExtraData ().get ("name" ));
127127 }
128128 String typing = "typing: " + TextUtils .join (", " , userNames );
Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ class ChannelActivity3 : AppCompatActivity() {
8585 if (channelControllerResult.isSuccess) {
8686
8787 // Observe typing users
88- channelControllerResult.data().typing.observe(this ) { users ->
88+ channelControllerResult.data().typing.observe(this ) { typingState ->
8989 binding.typingHeaderView.text = when {
90- users.isNotEmpty() -> users.joinToString(prefix = " typing: " ) { user -> user.name }
90+ typingState. users.isNotEmpty() -> typingState. users.joinToString(prefix = " typing: " ) { user -> user.name }
9191 else -> nobodyTyping
9292 }
9393 }
You can’t perform that action at this time.
0 commit comments