|
@@ -441,17 +441,10 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
return true;
|
|
return true;
|
|
|
|
|
|
case R.id.conversation_video_call:
|
|
case R.id.conversation_video_call:
|
|
- Bundle bundle = new Bundle();
|
|
|
|
- bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken);
|
|
|
|
- bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(currentUser));
|
|
|
|
- bundle.putString(BundleKeys.KEY_CALL_SESSION, currentCall.getSessionId());
|
|
|
|
-
|
|
|
|
- Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
|
|
|
- callIntent.putExtras(bundle);
|
|
|
|
-
|
|
|
|
- startActivity(callIntent);
|
|
|
|
|
|
+ startActivity(getIntentForCall(false));
|
|
return true;
|
|
return true;
|
|
case R.id.conversation_voice_call:
|
|
case R.id.conversation_voice_call:
|
|
|
|
+ startActivity(getIntentForCall(true));
|
|
return true;
|
|
return true;
|
|
|
|
|
|
default:
|
|
default:
|
|
@@ -459,6 +452,22 @@ public class ChatController extends BaseController implements MessagesListAdapte
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private Intent getIntentForCall(boolean isVoiceOnlyCall) {
|
|
|
|
+ Bundle bundle = new Bundle();
|
|
|
|
+ bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomToken);
|
|
|
|
+ bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(currentUser));
|
|
|
|
+ bundle.putString(BundleKeys.KEY_CALL_SESSION, currentCall.getSessionId());
|
|
|
|
+
|
|
|
|
+ if (isVoiceOnlyCall) {
|
|
|
|
+ bundle.putBoolean(BundleKeys.KEY_CALL_VOICE_ONLY, true);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
|
|
|
+ callIntent.putExtras(bundle);
|
|
|
|
+
|
|
|
|
+ return callIntent;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void onSelectionChanged(int count) {
|
|
public void onSelectionChanged(int count) {
|
|
//globalMenu.findItem(R.id.action_delete).setVisible(count > 0);
|
|
//globalMenu.findItem(R.id.action_delete).setVisible(count > 0);
|