f.smali

.class public final Ltg/f;
.super Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;
.source "RecyclerViewScrollerListenerHelper.kt"


# instance fields
.field public final a:Ltg/g;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>(Ltg/g;)V
    .registers 2

    invoke-direct {p0}, Landroidx/recyclerview/widget/RecyclerView$OnScrollListener;-><init>()V

    iput-object p1, p0, Ltg/f;->a:Ltg/g;

    return-void
.end method


# virtual methods
.method public onScrolled(Landroidx/recyclerview/widget/RecyclerView;II)V
    .registers 6

    if-nez p2, :cond_5

    if-nez p3, :cond_5

    return-void

    :cond_5
    invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;

    move-result-object p1

    instance-of p2, p1, Landroidx/recyclerview/widget/LinearLayoutManager;

    if-eqz p2, :cond_44

    check-cast p1, Landroidx/recyclerview/widget/LinearLayoutManager;

    invoke-virtual {p1}, Landroidx/recyclerview/widget/LinearLayoutManager;->findFirstCompletelyVisibleItemPosition()I

    move-result p2

    invoke-virtual {p1}, Landroidx/recyclerview/widget/LinearLayoutManager;->findLastCompletelyVisibleItemPosition()I

    move-result p3

    invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;->getItemCount()I

    move-result p1

    const/4 v0, 0x1

    if-nez p2, :cond_2c

    sub-int v1, p1, p3

    if-le v1, v0, :cond_2c

    iget-object p1, p0, Ltg/f;->a:Ltg/g;

    if-eqz p1, :cond_44

    sget-object p2, Lcom/shopee/foody/driver/im/helper/ScrollType;->SCROLL_TO_BOTTOM:Lcom/shopee/foody/driver/im/helper/ScrollType;

    invoke-interface {p1, p2}, Ltg/g;->a(Lcom/shopee/foody/driver/im/helper/ScrollType;)V

    goto :goto_44

    :cond_2c
    sub-int/2addr p1, p3

    if-ne p1, v0, :cond_3b

    if-eqz p2, :cond_3b

    iget-object p1, p0, Ltg/f;->a:Ltg/g;

    if-eqz p1, :cond_44

    sget-object p2, Lcom/shopee/foody/driver/im/helper/ScrollType;->SCROLL_TO_TOP:Lcom/shopee/foody/driver/im/helper/ScrollType;

    invoke-interface {p1, p2}, Ltg/g;->a(Lcom/shopee/foody/driver/im/helper/ScrollType;)V

    goto :goto_44

    :cond_3b
    iget-object p1, p0, Ltg/f;->a:Ltg/g;

    if-eqz p1, :cond_44

    sget-object p2, Lcom/shopee/foody/driver/im/helper/ScrollType;->SCROLL_TO_MIDDLE:Lcom/shopee/foody/driver/im/helper/ScrollType;

    invoke-interface {p1, p2}, Ltg/g;->a(Lcom/shopee/foody/driver/im/helper/ScrollType;)V

    :cond_44
    :goto_44
    return-void
.end method