use of chat.rocket.android.service.DDPClientRef in project Rocket.Chat.Android by RocketChat.
the class CurrentUserObserver method onLogin.
@DebugLog
private void onLogin(RealmUser user) {
if (listeners != null) {
onLogout();
}
listeners = new ArrayList<>();
final String userId = user.getId();
// get and observe Room subscriptions.
methodCall.getRoomSubscriptions().onSuccess(task -> {
if (listeners != null) {
Registrable listener = new StreamNotifyUserSubscriptionsChanged(context, hostname, realmHelper, ddpClientRef, userId);
listener.register();
listeners.add(listener);
}
return null;
}).continueWith(new LogIfError());
}
Aggregations