Search in sources :

Example 1 with NoOpControllerChangeHandler

use of com.bluelinelabs.conductor.internal.NoOpControllerChangeHandler in project talk-android by nextcloud.

the class CallsListController method onItemClick.

@Override
public boolean onItemClick(View view, int position) {
    CallItem callItem = adapter.getItem(position);
    if (callItem != null && getActivity() != null) {
        Room room = callItem.getModel();
        Bundle bundle = new Bundle();
        bundle.putString(BundleKeys.KEY_ROOM_TOKEN, callItem.getModel().getToken());
        bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
        if (room.hasPassword && (room.participantType.equals(Participant.ParticipantType.GUEST) || room.participantType.equals(Participant.ParticipantType.USER_FOLLOWING_LINK))) {
            bundle.putInt(BundleKeys.KEY_OPERATION_CODE, 99);
            prepareAndShowBottomSheetWithBundle(bundle, false);
        } else {
            overridePushHandler(new NoOpControllerChangeHandler());
            overridePopHandler(new NoOpControllerChangeHandler());
            Intent callIntent = new Intent(getActivity(), CallActivity.class);
            callIntent.putExtras(bundle);
            startActivity(callIntent);
        }
    }
    return true;
}
Also used : Bundle(android.os.Bundle) CallItem(com.nextcloud.talk.adapters.items.CallItem) Intent(android.content.Intent) Room(com.nextcloud.talk.models.json.rooms.Room) NoOpControllerChangeHandler(com.bluelinelabs.conductor.internal.NoOpControllerChangeHandler)

Aggregations

Intent (android.content.Intent)1 Bundle (android.os.Bundle)1 NoOpControllerChangeHandler (com.bluelinelabs.conductor.internal.NoOpControllerChangeHandler)1 CallItem (com.nextcloud.talk.adapters.items.CallItem)1 Room (com.nextcloud.talk.models.json.rooms.Room)1