use of org.mazhuang.guanggoo.data.task.FavouriteTask in project guanggoo-android by mzlogin.
the class TopicDetailPresenter method favorite.
@Override
public void favorite() {
String topicId = UrlUtil.getTid(getUrl());
String favouriteUrl = ConstantUtil.FAVORITE_URL + "?topic_id=" + topicId;
NetworkTaskScheduler.getInstance().execute(new FavouriteTask(favouriteUrl, new OnResponseListener<String>() {
@Override
public void onSucceed(String data) {
mView.onFavoriteSucceed();
}
@Override
public void onFailed(String msg) {
mView.onFavoriteFail(msg);
}
}));
}
use of org.mazhuang.guanggoo.data.task.FavouriteTask in project guanggoo-android by mzlogin.
the class TopicDetailPresenter method unfavorite.
@Override
public void unfavorite() {
String topicId = UrlUtil.getTid(getUrl());
String favouriteUrl = ConstantUtil.UN_FAVORITE_URL + "?topic_id=" + topicId;
NetworkTaskScheduler.getInstance().execute(new FavouriteTask(favouriteUrl, new OnResponseListener<String>() {
@Override
public void onSucceed(String data) {
mView.onUnfavoriteSucceed();
}
@Override
public void onFailed(String msg) {
mView.onUnfavoriteFailed(msg);
}
}));
}
Aggregations