private static < RequestType extends ConversationsSubmissionRequest, ResponseType extends ConversationsResponse> LoadCallSubmission<RequestType, ResponseType> createCall( Class<ResponseType> responseTypeClass, RequestType submission) { if (submission.getBuilder().getAction() == Action.Submit) { submission.setForcePreview(true); } return loadCallFromSubmission(responseTypeClass, submission); }
static < RequestType extends ConversationsSubmissionRequest, ResponseType extends ConversationsResponse> LoadCall<RequestType, ResponseType> reCreateCallWithPhotos( Class<ResponseType> responseTypeClass, RequestType submission, List<Photo> photos) { submission.setPhotos(photos); submission.getBuilder().photoUploads.clear(); submission.setForcePreview(false); LoadCall loadCall = loadCallFromSubmission(responseTypeClass, submission); return loadCall; }