package com.tencent.liteav.live.ui.widget.msg;

import com.blankj.utilcode.util.LogUtils;
import com.tencent.imsdk.v2.V2TIMCallback;
import com.tencent.imsdk.v2.V2TIMValueCallback;

public class V2TIMSimpleCallback<T> implements V2TIMCallback, V2TIMValueCallback<T> {

    private String logic;

    public V2TIMSimpleCallback(String logic) {
        this.logic = logic;
    }

    @Override
    public void onError(int code, String desc) {
        LogUtils.e(logic + "错误：" + code + " " + desc);
        onFinish();
    }

    @Override
    public void onSuccess(T t) {
        LogUtils.e(logic + "成功");
        onFinish();
    }

    @Override
    public void onSuccess() {
        LogUtils.e(logic + "成功");
        onFinish();
    }

    public void onFinish() {
    }
}
