package com.bokecc.livemodule.live.function.redpacket;

import android.content.Context;
import android.view.View;

import com.bokecc.livemodule.live.function.redpacket.view.RedPacketRankPopup;
import com.bokecc.livemodule.live.function.vote.VoteListener;
import com.bokecc.livemodule.live.function.vote.view.VotePopup;
import com.bokecc.sdk.mobile.live.pojo.RedPacketInfo;
import com.bokecc.sdk.mobile.live.pojo.RedPacketRankInfo;

import org.json.JSONObject;

import java.util.List;

/**
 * '投票' 处理机制
 */
public class RedPacketHandler {

    private RedPacketRankPopup mRedPacketRankPopup;

    private boolean isShow = false;


    public void showRedPacketRank(RedPacketRankInfo redPacketRankInfo,View view,Context context){
        if (mRedPacketRankPopup!=null&&mRedPacketRankPopup.isShowing()){
            mRedPacketRankPopup.dismiss();
        }
        mRedPacketRankPopup = new RedPacketRankPopup(context);
        mRedPacketRankPopup.showDate(redPacketRankInfo);
        mRedPacketRankPopup.show(view);
    }


    public void onRedPacketStart(RedPacketInfo redPacketInfo) {
        if (mRedPacketRankPopup!=null&&mRedPacketRankPopup.isShowing()){
            mRedPacketRankPopup.dismiss();
        }
    }
}
