Browse Source

finish inbox task

pms
Thodoris1999 6 years ago
parent
commit
429d65513e
  1. 8
      app/src/main/java/gr/thmmy/mthmmy/activities/inbox/tasks/InboxTask.java

8
app/src/main/java/gr/thmmy/mthmmy/activities/inbox/tasks/InboxTask.java

@ -13,6 +13,7 @@ import java.util.Objects;
import gr.thmmy.mthmmy.base.BaseActivity; import gr.thmmy.mthmmy.base.BaseActivity;
import gr.thmmy.mthmmy.model.Inbox; import gr.thmmy.mthmmy.model.Inbox;
import gr.thmmy.mthmmy.model.PM; import gr.thmmy.mthmmy.model.PM;
import gr.thmmy.mthmmy.utils.NetworkResultCodes;
import gr.thmmy.mthmmy.utils.parsing.NewParseTask; import gr.thmmy.mthmmy.utils.parsing.NewParseTask;
import gr.thmmy.mthmmy.utils.parsing.ParseException; import gr.thmmy.mthmmy.utils.parsing.ParseException;
import gr.thmmy.mthmmy.utils.parsing.ParseHelpers; import gr.thmmy.mthmmy.utils.parsing.ParseHelpers;
@ -30,14 +31,13 @@ public class InboxTask extends NewParseTask<Inbox> {
inbox.setNumberOfPages(ParseHelpers.parseNumberOfPages(document, inbox.getCurrentPageIndex(), language)); inbox.setNumberOfPages(ParseHelpers.parseNumberOfPages(document, inbox.getCurrentPageIndex(), language));
ArrayList<PM> pmList = parsePMs(document, language); ArrayList<PM> pmList = parsePMs(document, language);
inbox.setPms(pmList);
return inbox;
return null;
} }
@Override @Override
protected int getResultCode(Response response, Inbox data) { protected int getResultCode(Response response, Inbox data) {
return 0; return NetworkResultCodes.SUCCESSFUL;
} }
private ArrayList<PM> parsePMs(Document document, ParseHelpers.Language language) { private ArrayList<PM> parsePMs(Document document, ParseHelpers.Language language) {

Loading…
Cancel
Save