CommentsFragment$3.smali

.class Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;
.super Ljava/lang/Object;
.source "CommentsFragment.java"

# interfaces
.implements Ltr/com/hurriyet/androidsdk/callback/GetCommentsCallback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->loadNextColumns()V
.end annotation

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


# instance fields
.field final synthetic this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;


# direct methods
.method constructor <init>(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)V
    .registers 2

    .line 154
    iput-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

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

    return-void
.end method


# virtual methods
.method public onFailure(Ltr/com/hurriyet/androidsdk/model/ErrorResponse;)V
    .registers 4

    .line 181
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    const/4 v1, 0x0

    # setter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->isLoading:Z
    invoke-static {v0, v1}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$102(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;Z)Z

    .line 183
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->getContext()Landroid/content/Context;

    move-result-object v0

    if-eqz v0, :cond_1f

    .line 184
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {p1}, Ltr/com/hurriyet/androidsdk/model/ErrorResponse;->getMessage()Ljava/lang/String;

    move-result-object p1

    invoke-static {v0, p1, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    :cond_1f
    return-void
.end method

.method public onSuccess(Ljava/util/ArrayList;I)V
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList<",
            "Ltr/com/hurriyet/androidsdk/response/comment/Comments;",
            ">;I)V"
        }
    .end annotation

    .line 159
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v0

    const/4 v1, 0x0

    if-lez v0, :cond_3f

    .line 161
    iget-object v0, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->commentsAdapter:Lhurriyet/mobil/android/hurriyet/adapters/CommentsAdapter;
    invoke-static {v0}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$400(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)Lhurriyet/mobil/android/hurriyet/adapters/CommentsAdapter;

    move-result-object v0

    invoke-virtual {v0}, Lhurriyet/mobil/android/hurriyet/adapters/CommentsAdapter;->getItemCount()I

    move-result v0

    .line 162
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v2

    .line 164
    iget-object v3, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->commentLst:Ljava/util/ArrayList;
    invoke-static {v3}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$500(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)Ljava/util/ArrayList;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 165
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->commentsAdapter:Lhurriyet/mobil/android/hurriyet/adapters/CommentsAdapter;
    invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$400(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)Lhurriyet/mobil/android/hurriyet/adapters/CommentsAdapter;

    move-result-object p1

    invoke-virtual {p1, v0, v2}, Lhurriyet/mobil/android/hurriyet/adapters/CommentsAdapter;->notifyItemRangeInserted(II)V

    .line 167
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # operator++ for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->pageNo:I
    invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$608(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)I

    .line 169
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->commentLst:Ljava/util/ArrayList;
    invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$500(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)Ljava/util/ArrayList;

    move-result-object p1

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

    move-result p1

    if-ne p1, p2, :cond_48

    .line 170
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    const/4 p2, 0x1

    # setter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->isAllLoaded:Z
    invoke-static {p1, p2}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$702(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;Z)Z

    goto :goto_48

    .line 173
    :cond_3f
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # getter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->txtFirstComment:Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;
    invoke-static {p1}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$800(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;)Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;

    move-result-object p1

    invoke-virtual {p1, v1}, Lhurriyet/mobil/android/hurriyet/views/HurriyetTextView;->setVisibility(I)V

    .line 176
    :cond_48
    :goto_48
    iget-object p1, p0, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment$3;->this$0:Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;

    # setter for: Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->isLoading:Z
    invoke-static {p1, v1}, Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;->access$102(Lhurriyet/mobil/android/hurriyet/fragments/CommentsFragment;Z)Z

    return-void
.end method