package com.gh.gamecenter.gamedetail.desc

import android.os.Handler
import android.view.View
import androidx.recyclerview.widget.RecyclerView

open class ExposureViewHolder(view: View, val handler: Handler) : RecyclerView.ViewHolder(view) {

    private var mLogRunnable: Runnable? = null

    fun startDelayLogRunnable() {
        if (mLogRunnable == null) {
            mLogRunnable = Runnable {
                exposureLog()
            }
            handler.postDelayed(mLogRunnable!!, 3000)
        }
    }

    open fun exposureLog() {

    }

    fun removeLogRunnable() {
        if (mLogRunnable != null) {
            handler.removeCallbacks(mLogRunnable!!)
            mLogRunnable = null
        }
    }
}