.class Lcom/moji/forum/ui/TopicSquareActivity$3;
.super Ljava/lang/Object;
.source "TopicSquareActivity.java"

# interfaces
.implements Landroid/widget/AbsListView$OnScrollListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/forum/ui/TopicSquareActivity;->a()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/forum/ui/TopicSquareActivity;

.field private b:Z


# direct methods
.method constructor <init>(Lcom/moji/forum/ui/TopicSquareActivity;)V
    .locals 0

    .line 430
    iput-object p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onScroll(Landroid/widget/AbsListView;III)V
    .locals 2

    .line 449
    iget-object v0, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-virtual {v0, p1, p2}, Lcom/moji/forum/ui/TopicSquareActivity;->a(Landroid/widget/AbsListView;I)V

    .line 450
    iget-object v0, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {v0}, Lcom/moji/forum/ui/TopicSquareActivity;->f(Lcom/moji/forum/ui/TopicSquareActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    const/4 v1, 0x0

    if-lez v0, :cond_0

    if-eqz p4, :cond_0

    add-int/2addr p2, p3

    if-lt p2, p4, :cond_0

    iget-object p2, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {p2}, Lcom/moji/forum/ui/TopicSquareActivity;->e(Lcom/moji/forum/ui/TopicSquareActivity;)Z

    move-result p2

    if-nez p2, :cond_0

    iget-object p2, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {p2}, Lcom/moji/forum/ui/TopicSquareActivity;->g(Lcom/moji/forum/ui/TopicSquareActivity;)Z

    move-result p2

    if-nez p2, :cond_0

    .line 451
    iget-object p2, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-virtual {p2, v1}, Lcom/moji/forum/ui/TopicSquareActivity;->a(Z)V

    .line 453
    :cond_0
    invoke-virtual {p1}, Landroid/widget/AbsListView;->getLastVisiblePosition()I

    move-result p2

    const/4 v0, 0x1

    sub-int/2addr p4, v0

    if-ne p2, p4, :cond_1

    sub-int/2addr p3, v0

    invoke-virtual {p1, p3}, Landroid/widget/AbsListView;->getChildAt(I)Landroid/view/View;

    move-result-object p2

    if-eqz p2, :cond_1

    invoke-virtual {p1, p3}, Landroid/widget/AbsListView;->getChildAt(I)Landroid/view/View;

    move-result-object p2

    invoke-virtual {p2}, Landroid/view/View;->getBottom()I

    move-result p2

    invoke-virtual {p1}, Landroid/widget/AbsListView;->getHeight()I

    move-result p1

    if-gt p2, p1, :cond_1

    .line 454
    iput-boolean v0, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->b:Z

    goto :goto_0

    .line 456
    :cond_1
    iput-boolean v1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->b:Z

    :goto_0
    return-void
.end method

.method public onScrollStateChanged(Landroid/widget/AbsListView;I)V
    .locals 1

    const/4 p1, 0x1

    if-ne p2, p1, :cond_0

    .line 435
    iget-object p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/TopicSquareActivity;->c(Lcom/moji/forum/ui/TopicSquareActivity;)Lcom/moji/forum/view/AutoHeightLayout;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/forum/view/AutoHeightLayout;->a()Z

    move-result p1

    if-eqz p1, :cond_0

    .line 436
    iget-object p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/TopicSquareActivity;->c(Lcom/moji/forum/ui/TopicSquareActivity;)Lcom/moji/forum/view/AutoHeightLayout;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/forum/view/AutoHeightLayout;->b()V

    .line 437
    iget-object p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/TopicSquareActivity;->d(Lcom/moji/forum/ui/TopicSquareActivity;)Landroid/widget/ImageButton;

    move-result-object p1

    sget v0, Lcom/moji/forum/R$drawable;->add_emotion_forum:I

    invoke-virtual {p1, v0}, Landroid/widget/ImageButton;->setBackgroundResource(I)V

    :cond_0
    if-eqz p2, :cond_1

    const/4 p1, 0x2

    if-ne p2, p1, :cond_2

    .line 441
    :cond_1
    iget-boolean p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->b:Z

    if-eqz p1, :cond_2

    iget-object p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/TopicSquareActivity;->e(Lcom/moji/forum/ui/TopicSquareActivity;)Z

    move-result p1

    if-nez p1, :cond_2

    .line 442
    iget-object p1, p0, Lcom/moji/forum/ui/TopicSquareActivity$3;->a:Lcom/moji/forum/ui/TopicSquareActivity;

    const/4 p2, 0x0

    invoke-virtual {p1, p2}, Lcom/moji/forum/ui/TopicSquareActivity;->a(Z)V

    :cond_2
    return-void
.end method
