use of org.mazhuang.guanggoo.data.task.GetTopicListTask in project guanggoo-android by mzlogin.
the class TopicListPresenter method getMoreTopic.
@Override
public void getMoreTopic(int page) {
if (mCurrentTask != null) {
mCurrentTask.cancel();
}
mCurrentTask = new GetTopicListTask(UrlUtil.appendPage(mView.getUrl(), page), new OnResponseListener<TopicList>() {
@Override
public void onSucceed(TopicList data) {
mView.onGetMoreTopicSucceed(data);
mCurrentTask = null;
}
@Override
public void onFailed(String msg) {
mView.onGetMoreTopicFailed(msg);
mCurrentTask = null;
}
});
NetworkTaskScheduler.getInstance().execute(mCurrentTask);
}
use of org.mazhuang.guanggoo.data.task.GetTopicListTask in project guanggoo-android by mzlogin.
the class TopicListPresenter method getTopicList.
@Override
public void getTopicList() {
if (mCurrentTask != null) {
mCurrentTask.cancel();
}
mCurrentTask = new GetTopicListTask(mView.getUrl(), new OnResponseListener<TopicList>() {
@Override
public void onSucceed(TopicList data) {
mView.onGetTopicListSucceed(data);
mCurrentTask = null;
}
@Override
public void onFailed(String msg) {
mView.onGetTopicListFailed(msg);
mCurrentTask = null;
}
});
NetworkTaskScheduler.getInstance().execute(mCurrentTask);
}
Aggregations