package com.gh.gamecenter.gamedetail.accelerator.chain

import android.content.Context
import com.gh.gamecenter.common.utils.ifLogin

class AcceleratorLoginInterceptor : AcceleratorValidator.Interceptor {

    override fun intercept(
        context: Context,
        chain: AcceleratorValidator.Chain,
        listener: AcceleratorValidator.ValidateListener?
    ) {
        context.ifLogin("[网络加速]") {
            val request = chain.request
            chain.proceed(context, request, listener)
        }
    }
}