use of com.romainpiel.lib.bus.MuteEvent in project meatspace-android by RomainPiel.
the class ChatFragment method onActivityCreated.
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
if (savedInstanceState != null) {
listViewState = savedInstanceState.getParcelable(STATE_LISTVIEW);
listPosition = savedInstanceState.getInt(POSITION_LIST);
itemPosition = savedInstanceState.getInt(POSITION_ITEM);
}
if (adapter == null) {
adapter = new ChatAdapter(getActivity());
adapter.setOnMuteClickListener(new OnMenuClickListener<Chat>() {
@Override
public void onMenuClick(Chat item) {
BusManager.get().getChatBus().post(new MuteEvent(true, item.getValue().getFingerprint()));
}
});
}
if (device == null) {
device = new Device(getActivity());
}
listView.setAdapter(adapter);
}
Aggregations