use of com.abewy.android.apps.klyph.core.fql.Event.EventResponse in project Klyph by jonathangerbaud.
the class EventFragment method sendRequest.
private void sendRequest(int query) {
final EventResponse eventResponse;
switch(query) {
case Query.POST_EVENT_ATTEND:
{
eventResponse = EventResponse.ATTENDING;
break;
}
case Query.POST_EVENT_UNSURE:
{
eventResponse = EventResponse.UNSURE;
break;
}
case Query.POST_EVENT_DECLINE:
{
eventResponse = EventResponse.DECLINED;
break;
}
default:
{
eventResponse = EventResponse.NOT_REPLIED;
break;
}
}
final AlertDialog publishing = new AlertDialog.Builder(getActivity()).setTitle(R.string.event_response_dialog_title).setMessage(R.string.event_response_dialog_message).setCancelable(false).create();
publishing.show();
new AsyncRequest(query, event.getEid(), "", new AsyncRequest.Callback() {
@Override
public void onComplete(Response response) {
publishing.dismiss();
onRequestComplete(response, eventResponse);
}
}).execute();
}
Aggregations