mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-11-23 22:09:30 +00:00
Made method call more clear
This commit is contained in:
parent
35c5040133
commit
a29700aea5
@ -22,10 +22,14 @@ public class GetLatestPostsTask extends SafeAsyncTask<Integer, Void, PostsList>
|
|||||||
protected PostsList doInBackground(Integer... integers) {
|
protected PostsList doInBackground(Integer... integers) {
|
||||||
|
|
||||||
PostsHelper helper = new PostsHelper(getContext());
|
PostsHelper helper = new PostsHelper(getContext());
|
||||||
|
PostsList list;
|
||||||
|
|
||||||
//Get the list of posts
|
//Get the list of posts
|
||||||
int from = integers[0] == 0 ? -1 : integers[0];
|
if(integers.length == 0)
|
||||||
PostsList list = helper.get_latest(from);
|
list = helper.get_latest();
|
||||||
|
else
|
||||||
|
list = helper.get_latest(integers[0]);
|
||||||
|
|
||||||
if(list == null) return null;
|
if(list == null) return null;
|
||||||
|
|
||||||
//Load related information
|
//Load related information
|
||||||
|
@ -78,7 +78,7 @@ public class LatestPostsFragment extends AbstractPostsListFragment {
|
|||||||
onGotNewPosts(posts);
|
onGotNewPosts(posts);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mGetLatestPostsTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, 0);
|
mGetLatestPostsTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user