Search in sources :

Example 1 with MessageThreadDeserializer

use of com.abewy.android.apps.klyph.core.fql.serializer.MessageThreadDeserializer in project Klyph by jonathangerbaud.

the class ThreadRequest method handleResult.

@Override
public ArrayList<GraphObject> handleResult(JSONArray[] result) {
    JSONArray data = result[0];
    JSONArray users = result[1];
    JSONArray recipients = result[2];
    JSONArray user_pics = result[3];
    assocData(recipients, users, "id", "uid", "first_name", "first_name");
    assocData(recipients, user_pics, "id", "id", "pic", "url");
    assocData(recipients, recipients, "id", "id", "uid", "id");
    assocData3(data, recipients, "recipients", "id", "recipients_friends");
    MessageThreadDeserializer deserializer = new MessageThreadDeserializer();
    ArrayList<GraphObject> mts = (ArrayList<GraphObject>) deserializer.deserializeArray(data);
    setHasMoreData(mts.size() >= 15);
    return mts;
}
Also used : JSONArray(org.json.JSONArray) ArrayList(java.util.ArrayList) MessageThreadDeserializer(com.abewy.android.apps.klyph.core.fql.serializer.MessageThreadDeserializer) GraphObject(com.abewy.android.apps.klyph.core.graph.GraphObject)

Aggregations

MessageThreadDeserializer (com.abewy.android.apps.klyph.core.fql.serializer.MessageThreadDeserializer)1 GraphObject (com.abewy.android.apps.klyph.core.graph.GraphObject)1 ArrayList (java.util.ArrayList)1 JSONArray (org.json.JSONArray)1