Skip to content

Commit d49d212

Browse files
committed
Upgrade to v1.0.31 and use new setOnJoin handler
1 parent c916ea0 commit d49d212

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/androidchat/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dependencies {
5454
})
5555
compile 'com.android.support:appcompat-v7:25.2.0'
5656
compile 'com.android.support:design:25.2.0'
57-
compile 'net.servicestack:android:1.0.30'
57+
compile 'net.servicestack:android:1.0.31'
5858
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
5959
compile('com.twitter.sdk.android:twitter:2.3.1@aar') {
6060
transitive = true;

src/androidchat/app/src/main/java/servicestack/net/androidchat/MainActivity.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,12 @@ protected void onCreate(Bundle savedInstanceState) {
9191
Extensions.updateUserProfile(connectMsg, mainActivity);
9292
});
9393
})
94-
.setOnCommand(command -> {
95-
if (command instanceof ServerEventJoin){
96-
getClient().getChannelSubscribersAsync(r -> {
97-
subscriberList = r;
98-
// Refresh profile icons when users join
99-
messageHistoryAdapter.notifyDataSetChanged();
100-
});
101-
}
94+
.setOnJoin(msg -> {
95+
getClient().getChannelSubscribersAsync(r -> {
96+
subscriberList = r;
97+
// Refresh profile icons when users join
98+
messageHistoryAdapter.notifyDataSetChanged();
99+
});
102100
})
103101
.setOnException(error -> mainActivity.runOnUiThread(() ->
104102
Toast.makeText(this, "Error : " + error.getMessage(), Toast.LENGTH_LONG)))

0 commit comments

Comments
 (0)