Permalink
Browse files

Register ChatReceiver as a global reciever + show Toast

  • Loading branch information...
mythz committed Mar 23, 2017
1 parent 35c7f61 commit 2a9a4b5ee40797419ff8a195f1317dea5d2c69d6
@@ -94,14 +94,13 @@ protected void onCreate(Bundle savedInstanceState) {
.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)))
Toast.makeText(this, "Error : " + error.getMessage(), Toast.LENGTH_LONG).show()))
.setResolver(new ReceiverResolver(cmdReceiver))
.registerNamedReceiver("cmd", ChatReceiver.class)
.registerReceiver(ChatReceiver.class)
.registerNamedReceiver("tv", TvReciever.class)
.registerNamedReceiver("css", CssReceiver.class);

0 comments on commit 2a9a4b5

Please sign in to comment.