use of im.actor.core.js.entity.JsBlockedUser in project actor-platform by actorapp.
the class JsBindingModule method getUserBlocked.
public JsBindedValue<JsBlockedUser> getUserBlocked(int uid) {
if (!usersBloked.containsKey(uid)) {
final JsBindedValue<JsBlockedUser> value = new JsBindedValue<>();
final UserVM userVM = context().getUsersModule().getUsers().get(uid);
userVM.getIsBlocked().subscribe(new ValueChangedListener<Boolean>() {
@Override
public void onChanged(Boolean val, Value<Boolean> valueModel) {
value.changeValue(JsBlockedUser.create(val));
}
});
usersBloked.put(uid, value);
}
return usersBloked.get(uid);
}
Aggregations