Permalink
Browse files

Upgrade to v1.0.31 and use new setOnJoin handler

  • Loading branch information...
mythz committed Mar 22, 2017
1 parent c916ea0 commit d49d21278543316800f25d76eecd3af5e02bc246
@@ -54,7 +54,7 @@ dependencies {
})
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
compile 'net.servicestack:android:1.0.30'
compile 'net.servicestack:android:1.0.31'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile('com.twitter.sdk.android:twitter:2.3.1@aar') {
transitive = true;
@@ -91,14 +91,12 @@ protected void onCreate(Bundle savedInstanceState) {
Extensions.updateUserProfile(connectMsg, mainActivity);
});
})
.setOnCommand(command -> {
if (command instanceof ServerEventJoin){
getClient().getChannelSubscribersAsync(r -> {
subscriberList = r;
// Refresh profile icons when users join
messageHistoryAdapter.notifyDataSetChanged();
});
}
.setOnJoin(msg -> {
getClient().getChannelSubscribersAsync(r -> {
subscriberList = r;
// Refresh profile icons when users join
messageHistoryAdapter.notifyDataSetChanged();
});
})
.setOnException(error -> mainActivity.runOnUiThread(() ->
Toast.makeText(this, "Error : " + error.getMessage(), Toast.LENGTH_LONG)))

0 comments on commit d49d212

Please sign in to comment.