| | |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.bumptech.glide.request.RequestOptions; |
| | | import com.hanju.video.app.BasicTextHttpResponseHandler; |
| | | import com.hanju.video.app.HttpApiUtil; |
| | | import com.hanju.video.app.util.UserUtil; |
| | | import com.lcjian.library.util.common.StringUtils; |
| | | import com.hanju.video.app.entity.Attention; |
| | | import com.hanju.video.app.entity.Follow; |
| | |
| | | import com.hanju.video.app.util.GlideCircleTransform; |
| | | import com.hanju.video.app.util.TimeUtil; |
| | | import com.hanju.video.app.R; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | if (info.isAttention()) { |
| | | info.setAttention(false); |
| | | holder1.tv_cancle_follow.setText("追剧"); |
| | | removeList.add(info); |
| | | // removeList.add(info); |
| | | HttpApiUtil.cancelAttention(mContext, UserUtil.getUid(mContext), UserUtil.getLoginUid(mContext), info.getVideoInfo().getId() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optBoolean("IsPost")) { |
| | | mList.remove(info); |
| | | notifyDataSetChanged(); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | } else { |
| | | info.setAttention(true); |
| | | holder1.tv_cancle_follow.setText("已追剧"); |
| | | removeList.remove(info); |
| | | // removeList.remove(info); |
| | | } |
| | | } |
| | | }); |