ITrendsDetailPresenter.java 2.56 KB
Newer Older
konghaorui committed
1 2 3
package com.yidianling.dynamic.trendsDetail;


YKai committed
4
import androidx.appcompat.app.AppCompatActivity;
konghaorui committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83

import com.ydl.ydlcommon.mvp.base.IPresenter;
import com.yidianling.dynamic.model.CommentBean;
import com.yidianling.dynamic.model.ExpertBuild;
import com.yidianling.dynamic.model.Focus;
import com.yidianling.dynamic.model.Reply;
import com.yidianling.dynamic.model.TrendsDetailInfoBean;
import com.yidianling.dynamic.model.ZanResult;
import com.ydl.ydlcommon.data.http.BaseAPIResponse;
import com.ydl.ydlcommon.data.http.BaseResponse;

import java.util.List;

/**
 * Created by Jim on 2017/10/28 0028.
 */

public interface ITrendsDetailPresenter extends IPresenter<ITrendsDetailView> {
    interface OnTrendsDetailDataLoadFinishedListenner {
        void onTrendsDetailFetched(BaseAPIResponse<TrendsDetailInfoBean> trendsDetailInfoBeanBaseBean);

        void onTrendsDetailFetchFailed(Throwable e);

        void onCommentsListFetched(List<CommentBean> commentsBean);

        void onCommentsListFetchedFailed(Throwable e);

        void ondoLikeActionFetchedResult(BaseResponse<ZanResult> zanResultBaseBean, int type);

        void onFoucusActionSuccessed(BaseResponse<Focus> response);

        void onReportContentFetched(BaseResponse response, int answerId, String commentContent);

        void onReportSuccessed(BaseResponse<Object> response);

        void onGetExpertSuccesssed(BaseResponse<ExpertBuild> response);

        void onCommentOrReplySuccessed(BaseResponse<Reply> replyBaseResponse, int type, String content, String replyContent, String toName);

        void onDeleteSuccessed(BaseResponse<Object> response, int type, int position);

        void showDataLoadErrorView(Throwable e);
    }

    public void fetchTrendsDetails(int id);


    public void fetchCommentsDatas(int id, int page, int lastId, int direction);

    /**
     * 点赞
     */
    public void doLikeAction(int type, int id);


    public void focus(String uid);

    /**
     * //获取举报的内容列表
     */
    public void fetchReportReasonContent(int answerId, String commentContent);


    //举报帖子评论
    public void report(int trendId, int type, int reasonId, int answerId, String answerContent);


    /**
     * //删除帖子或评论
     *
     * @param type 移除类型:1移除评论,2移除动态
     * @param id   评论的id,动态id
     */
    public void delTrendsReply(int type, int id, int position);

    public void getExpert(AppCompatActivity activity, String expertUid);

    public void commitOrReply(int type, String tid, String content, String replyContent, String toName);
}