Skip to content

Commit 356a959

Browse files
authored
Merge pull request #33 from GetStream/task/sdkBump
Bump Stream SDK
2 parents 53b880e + e830fae commit 356a959

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

samplejava/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434

3535
dependencies {
3636
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.10"
37-
implementation "com.github.getstream:stream-chat-android:1ab9aa8ae2bde84d5e7a61b767b32dd0c33d05e6"
37+
implementation "com.github.getstream:stream-chat-android:4.4.1"
3838
implementation "io.coil-kt:coil:1.0.0"
3939

4040
implementation "androidx.lifecycle:lifecycle-viewmodel:2.3.0-beta01"

samplejava/src/main/java/com/example/chattutorialjava/ChannelActivity3.java

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,18 @@ public void handleOnBackPressed() {
116116
ChatDomain.instance().getUseCases().getGetChannelController().invoke(cid).enqueue((result) -> {
117117
ChannelController channelController = result.data();
118118

119-
runOnUiThread(() -> {
120-
// Observe typing users
121-
channelController.getTyping().observe(this, users -> {
122-
if (users.isEmpty()) {
123-
typingHeaderView.setText(nobodyTyping);
124-
} else {
125-
List<String> userNames = new LinkedList<>();
126-
for (User user : users) {
127-
userNames.add((String)user.getExtraData().get("name"));
128-
}
129-
String typing = "typing: " + TextUtils.join(", ", userNames);
130-
typingHeaderView.setText(typing);
119+
// Observe typing users
120+
channelController.getTyping().observe(this, users -> {
121+
if (users.isEmpty()) {
122+
typingHeaderView.setText(nobodyTyping);
123+
} else {
124+
List<String> userNames = new LinkedList<>();
125+
for (User user : users) {
126+
userNames.add((String) user.getExtraData().get("name"));
131127
}
132-
});
128+
String typing = "typing: " + TextUtils.join(", ", userNames);
129+
typingHeaderView.setText(typing);
130+
}
133131
});
134132
return Unit.INSTANCE;
135133
});

samplekotlin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ android {
4040

4141
dependencies {
4242
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.10"
43-
implementation "com.github.getstream:stream-chat-android:1ab9aa8ae2bde84d5e7a61b767b32dd0c33d05e6"
43+
implementation "com.github.getstream:stream-chat-android:4.4.1"
4444
implementation "io.coil-kt:coil:1.0.0"
4545

4646
implementation "androidx.lifecycle:lifecycle-viewmodel:2.3.0-beta01"

samplekotlin/src/main/java/com/example/chattutorial/ChannelActivity4.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ import com.getstream.sdk.chat.viewmodel.messages.MessageListViewModel.Mode.Threa
1717
import com.getstream.sdk.chat.viewmodel.messages.MessageListViewModel.State.NavigateUp
1818
import com.getstream.sdk.chat.viewmodel.messages.bindView
1919
import io.getstream.chat.android.client.ChatClient
20-
import io.getstream.chat.android.client.controllers.subscribeFor
2120
import io.getstream.chat.android.client.events.TypingStartEvent
2221
import io.getstream.chat.android.client.events.TypingStopEvent
2322
import io.getstream.chat.android.client.models.Channel
24-
import io.getstream.chat.android.client.models.name
2523

2624
class ChannelActivity4 : AppCompatActivity() {
2725

0 commit comments

Comments
 (0)