.class public Lcom/moji/user/homepage/fragment/AttentionFragment;
.super Lcom/moji/user/homepage/fragment/UserCenterBaseFragment;
.source "AttentionFragment.java"

# interfaces
.implements Lcom/moji/user/homepage/presenter/AttentionPresenter$AttentionListCallBack;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/user/homepage/fragment/UserCenterBaseFragment<",
        "Lcom/moji/user/homepage/presenter/AttentionPresenter;",
        ">;",
        "Lcom/moji/user/homepage/presenter/AttentionPresenter$AttentionListCallBack;"
    }
.end annotation


# static fields
.field public static f:Ljava/lang/String; = "fragment_type"

.field public static g:Ljava/lang/String; = "nick_name"


# instance fields
.field public e:I

.field private p:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .line 31
    invoke-direct {p0}, Lcom/moji/user/homepage/fragment/UserCenterBaseFragment;-><init>()V

    return-void
.end method

.method public static a(JILjava/lang/String;)Lcom/moji/user/homepage/fragment/AttentionFragment;
    .locals 3

    .line 38
    new-instance v0, Lcom/moji/user/homepage/fragment/AttentionFragment;

    invoke-direct {v0}, Lcom/moji/user/homepage/fragment/AttentionFragment;-><init>()V

    .line 39
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    const-string v2, "user_sns_id"

    .line 40
    invoke-virtual {v1, v2, p0, p1}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V

    .line 41
    sget-object p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->f:Ljava/lang/String;

    invoke-virtual {v1, p0, p2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 42
    sget-object p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->g:Ljava/lang/String;

    invoke-virtual {v1, p0, p3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 43
    invoke-virtual {v0, v1}, Lcom/moji/user/homepage/fragment/AttentionFragment;->setArguments(Landroid/os/Bundle;)V

    return-object v0
.end method


# virtual methods
.method public a(Ljava/util/ArrayList;Z)V
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/mqn/entity/FansList$Item;",
            ">;Z)V"
        }
    .end annotation

    .line 91
    iget-object p2, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->k:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;

    invoke-virtual {p2}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->d()V

    if-eqz p1, :cond_3

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

    move-result p2

    if-nez p2, :cond_0

    goto :goto_2

    .line 95
    :cond_0
    invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object p2

    :goto_0
    invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/http/mqn/entity/FansList$Item;

    .line 96
    new-instance v1, Lcom/moji/user/homepage/cell/AttentionFriendCell;

    invoke-virtual {p0}, Lcom/moji/user/homepage/fragment/AttentionFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v2

    invoke-direct {v1, v0, v2}, Lcom/moji/user/homepage/cell/AttentionFriendCell;-><init>(Lcom/moji/http/mqn/entity/FansList$Item;Landroid/content/Context;)V

    .line 97
    iget-object v0, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->k:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;

    invoke-virtual {v0, v1}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->a(Lcom/moji/newliveview/dynamic/base/Cell;)V

    goto :goto_0

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

    move-result p1

    if-lez p1, :cond_2

    const/4 p1, 0x1

    goto :goto_1

    :cond_2
    const/4 p1, 0x0

    :goto_1
    invoke-virtual {p0, p1}, Lcom/moji/user/homepage/fragment/AttentionFragment;->c(Z)V

    return-void

    :cond_3
    :goto_2
    return-void
.end method

.method public a(Z)V
    .locals 2

    .line 71
    invoke-virtual {p0}, Lcom/moji/user/homepage/fragment/AttentionFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 73
    sget-object v1, Lcom/moji/user/homepage/fragment/AttentionFragment;->f:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v1

    iput v1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->e:I

    .line 74
    sget-object v1, Lcom/moji/user/homepage/fragment/AttentionFragment;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->p:Ljava/lang/String;

    .line 75
    iget-object v0, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->l:Ljava/lang/Object;

    check-cast v0, Lcom/moji/user/homepage/presenter/AttentionPresenter;

    iget v1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->e:I

    invoke-virtual {v0, v1, p1}, Lcom/moji/user/homepage/presenter/AttentionPresenter;->a(IZ)V

    :cond_0
    return-void
.end method

.method public a(ZZ)V
    .locals 12

    .line 104
    iget-object v0, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->m:Lcom/moji/swiperefreshlayout/SwipeRefreshLayout;

    invoke-virtual {v0}, Lcom/moji/swiperefreshlayout/SwipeRefreshLayout;->b()V

    .line 105
    iget-object v0, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->p:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    const-string v0, ""

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->p:Ljava/lang/String;

    :goto_0
    const-string v1, "\n"

    const-string v2, ""

    .line 106
    invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    .line 107
    iget v1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->e:I

    packed-switch v1, :pswitch_data_0

    goto/16 :goto_1

    :pswitch_0
    if-eqz p1, :cond_2

    .line 119
    iget-object p1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->k:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;

    invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->a()I

    move-result p1

    if-nez p1, :cond_1

    .line 120
    iget-object v1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->d:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    sget v2, Lcom/moji/user/R$drawable;->view_icon_empty_no_friend:I

    new-instance p1, Ljava/lang/StringBuilder;

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

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget p2, Lcom/moji/user/R$string;->no_fans_one_fans:I

    invoke-static {p2}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object p2

    invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    sget p1, Lcom/moji/user/R$string;->my_attention_he:I

    .line 121
    invoke-static {p1}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v5

    new-instance v6, Lcom/moji/user/homepage/fragment/AttentionFragment$1;

    invoke-direct {v6, p0}, Lcom/moji/user/homepage/fragment/AttentionFragment$1;-><init>(Lcom/moji/user/homepage/fragment/AttentionFragment;)V

    .line 120
    invoke-virtual/range {v1 .. v6}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->a(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/view/View$OnClickListener;)V

    goto/16 :goto_1

    .line 146
    :cond_1
    iget-object p1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->d:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {p1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->G()V

    goto/16 :goto_1

    :cond_2
    if-eqz p2, :cond_3

    .line 150
    invoke-virtual {p0}, Lcom/moji/user/homepage/fragment/AttentionFragment;->d()V

    goto :goto_1

    .line 152
    :cond_3
    iget-object p1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->k:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;

    invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->a()I

    move-result p1

    if-eqz p1, :cond_4

    iget-object p1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->o:Lcom/moji/newliveview/dynamic/FooterCell;

    if-eqz p1, :cond_4

    .line 154
    iget-object p1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->o:Lcom/moji/newliveview/dynamic/FooterCell;

    const/4 p2, 0x2

    invoke-virtual {p1, p2}, Lcom/moji/newliveview/dynamic/FooterCell;->a(I)V

    .line 155
    iget-object p1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->k:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;

    iget-object p2, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->k:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;

    invoke-virtual {p2}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->a()I

    move-result p2

    invoke-virtual {p1, p2}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->c(I)V

    goto :goto_1

    .line 115
    :pswitch_1
    sget v3, Lcom/moji/user/R$drawable;->view_icon_empty_no_friend:I

    new-instance v1, Ljava/lang/StringBuilder;

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

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    sget v0, Lcom/moji/user/R$string;->no_attention_nobody:I

    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    move-object v0, p0

    move v1, p1

    move v2, p2

    invoke-virtual/range {v0 .. v5}, Lcom/moji/user/homepage/fragment/AttentionFragment;->a(ZZILjava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    .line 112
    :pswitch_2
    sget v9, Lcom/moji/user/R$drawable;->view_icon_empty_no_friend:I

    sget v0, Lcom/moji/user/R$string;->you_no_fans:I

    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v10

    const/4 v11, 0x0

    move-object v6, p0

    move v7, p1

    move v8, p2

    invoke-virtual/range {v6 .. v11}, Lcom/moji/user/homepage/fragment/AttentionFragment;->a(ZZILjava/lang/String;Ljava/lang/String;)V

    goto :goto_1

    .line 109
    :pswitch_3
    sget v3, Lcom/moji/user/R$drawable;->view_icon_empty_no_friend:I

    sget v0, Lcom/moji/user/R$string;->you_no_attention_nobody:I

    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    move-object v0, p0

    move v1, p1

    move v2, p2

    invoke-virtual/range {v0 .. v5}, Lcom/moji/user/homepage/fragment/AttentionFragment;->a(ZZILjava/lang/String;Ljava/lang/String;)V

    :cond_4
    :goto_1
    return-void

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public b(Z)V
    .locals 0

    .line 166
    invoke-virtual {p0, p1}, Lcom/moji/user/homepage/fragment/AttentionFragment;->d(Z)V

    return-void
.end method

.method public e()I
    .locals 1

    .line 66
    sget v0, Lcom/moji/user/R$layout;->fragment_friend_list:I

    return v0
.end method

.method public eventLoginSuccess(Lcom/moji/bus/event/BusEventCommon$LoginSuccessEvent;)V
    .locals 0
    .annotation runtime Lorg/greenrobot/eventbus/Subscribe;
        a = .enum Lorg/greenrobot/eventbus/ThreadMode;->MAIN:Lorg/greenrobot/eventbus/ThreadMode;
    .end annotation

    const/4 p1, 0x1

    .line 61
    invoke-virtual {p0, p1}, Lcom/moji/user/homepage/fragment/AttentionFragment;->a(Z)V

    return-void
.end method

.method public f()Lcom/moji/user/homepage/presenter/AttentionPresenter;
    .locals 3

    .line 81
    new-instance v0, Lcom/moji/user/homepage/presenter/AttentionPresenter;

    iget-wide v1, p0, Lcom/moji/user/homepage/fragment/AttentionFragment;->h:J

    invoke-direct {v0, p0, v1, v2}, Lcom/moji/user/homepage/presenter/AttentionPresenter;-><init>(Lcom/moji/user/homepage/presenter/AttentionPresenter$AttentionListCallBack;J)V

    return-object v0
.end method

.method public g()Z
    .locals 1

    const/4 v0, 0x1

    return v0
.end method

.method public synthetic h()Ljava/lang/Object;
    .locals 1

    .line 31
    invoke-virtual {p0}, Lcom/moji/user/homepage/fragment/AttentionFragment;->f()Lcom/moji/user/homepage/presenter/AttentionPresenter;

    move-result-object v0

    return-object v0
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 49
    invoke-super {p0, p1}, Lcom/moji/user/homepage/fragment/UserCenterBaseFragment;->onCreate(Landroid/os/Bundle;)V

    .line 50
    invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;

    move-result-object p1

    invoke-virtual {p1, p0}, Lcom/moji/bus/Bus;->a(Ljava/lang/Object;)V

    return-void
.end method

.method public onDestroy()V
    .locals 1

    .line 55
    invoke-super {p0}, Lcom/moji/user/homepage/fragment/UserCenterBaseFragment;->onDestroy()V

    .line 56
    invoke-static {}, Lcom/moji/bus/Bus;->a()Lcom/moji/bus/Bus;

    move-result-object v0

    invoke-virtual {v0, p0}, Lcom/moji/bus/Bus;->b(Ljava/lang/Object;)V

    return-void
.end method
