package com.base.filerecoveryrecyclebin.view

import android.content.Context
import android.util.AttributeSet
import android.webkit.WebView
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout

/**
 *Create by SleepDog on 2025-01-21
 */
class WebRefreshView @JvmOverloads constructor(
    context: Context, attrs: AttributeSet? = null
) : WebView(context, attrs) {

     var swipeRefreshLayout: SwipeRefreshLayout? = null
    override fun onScrollChanged(l: Int, t: Int, oldl: Int, oldt: Int) {
        super.onScrollChanged(l, t, oldl, oldt)
        swipeRefreshLayout?.isEnabled = scrollY == 0
    }
}