.class public Lcom/moji/newliveview/home/presenter/NearLivePresenter;
.super Lcom/moji/newliveview/home/presenter/AbsHomePresenter;
.source "NearLivePresenter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/newliveview/home/presenter/NearLivePresenter$FooterViewHolder;,
        Lcom/moji/newliveview/home/presenter/NearLivePresenter$PicViewHolder;,
        Lcom/moji/newliveview/home/presenter/NearLivePresenter$TitleHolder;,
        Lcom/moji/newliveview/home/presenter/NearLivePresenter$NearLiveCallBack;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/newliveview/home/presenter/AbsHomePresenter<",
        "Lcom/moji/newliveview/home/presenter/NearLivePresenter$NearLiveCallBack;",
        ">;"
    }
.end annotation


# instance fields
.field private f:Landroid/content/Context;

.field private g:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/http/snsforum/entity/WaterFallPicture;",
            ">;"
        }
    .end annotation
.end field

.field private h:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ljava/lang/Integer;",
            "Ljava/lang/Integer;",
            ">;"
        }
    .end annotation
.end field

.field private i:Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;

.field private j:F

.field private k:F

.field private l:I

.field private m:I

.field private n:Ljava/lang/String;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/moji/newliveview/home/presenter/NearLivePresenter$NearLiveCallBack;)V
    .locals 0

    .line 108
    invoke-direct {p0, p1, p2}, Lcom/moji/newliveview/home/presenter/AbsHomePresenter;-><init>(Landroid/content/Context;Lcom/moji/base/MJPresenter$ICallback;)V

    .line 71
    new-instance p2, Ljava/util/ArrayList;

    invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V

    iput-object p2, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    .line 72
    new-instance p2, Ljava/util/HashMap;

    invoke-direct {p2}, Ljava/util/HashMap;-><init>()V

    iput-object p2, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->h:Ljava/util/Map;

    .line 109
    iput-object p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->f:Landroid/content/Context;

    .line 110
    sget p1, Lcom/moji/newliveview/R$dimen;->waterfall_item_text_content_height:I

    invoke-static {p1}, Lcom/moji/tool/DeviceTool;->a(I)F

    move-result p1

    iput p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->j:F

    .line 111
    sget p1, Lcom/moji/newliveview/R$dimen;->waterfall_item_padding_bottom:I

    invoke-static {p1}, Lcom/moji/tool/DeviceTool;->a(I)F

    move-result p1

    iput p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->k:F

    return-void
.end method

.method static synthetic a(Lcom/moji/newliveview/home/presenter/NearLivePresenter;I)I
    .locals 0

    .line 63
    iput p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->m:I

    return p1
.end method

.method static synthetic a(Lcom/moji/newliveview/home/presenter/NearLivePresenter;Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;)Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;
    .locals 0

    .line 63
    iput-object p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->i:Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;

    return-object p1
.end method

.method static synthetic a(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)Ljava/lang/String;
    .locals 0

    .line 63
    iget-object p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->n:Ljava/lang/String;

    return-object p0
.end method

.method private a(Landroid/view/View;ILjava/util/ArrayList;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/view/View;",
            "I",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/snsforum/entity/ThumbPictureItem;",
            ">;)V"
        }
    .end annotation

    .line 366
    new-instance p1, Landroid/content/Intent;

    iget-object v0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->f:Landroid/content/Context;

    const-class v1, Lcom/moji/newliveview/detail/PictureDetailActivity;

    invoke-direct {p1, v0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 367
    new-instance v0, Landroid/os/Bundle;

    const/4 v1, 0x5

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

    const-string v1, "extra_data_thumb_picture_list"

    .line 368
    invoke-virtual {v0, v1, p3}, Landroid/os/Bundle;->putParcelableArrayList(Ljava/lang/String;Ljava/util/ArrayList;)V

    const-string p3, "extra_data_target_position"

    .line 369
    invoke-virtual {v0, p3, p2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 370
    invoke-virtual {p1, v0}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    .line 371
    iget-object p2, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->f:Landroid/content/Context;

    invoke-virtual {p2, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    .line 372
    iget-object p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->f:Landroid/content/Context;

    check-cast p1, Landroid/app/Activity;

    sget p2, Lcom/moji/newliveview/R$anim;->activity_open_right_in:I

    sget p3, Lcom/moji/newliveview/R$anim;->activity_open_right_out:I

    invoke-virtual {p1, p2, p3}, Landroid/app/Activity;->overridePendingTransition(II)V

    return-void
.end method

.method static synthetic a(Lcom/moji/newliveview/home/presenter/NearLivePresenter;Landroid/view/View;ILjava/util/ArrayList;)V
    .locals 0

    .line 63
    invoke-direct {p0, p1, p2, p3}, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->a(Landroid/view/View;ILjava/util/ArrayList;)V

    return-void
.end method

.method static synthetic b(Lcom/moji/newliveview/home/presenter/NearLivePresenter;I)I
    .locals 0

    .line 63
    iput p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->l:I

    return p1
.end method

.method static synthetic b(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)Landroid/content/Context;
    .locals 0

    .line 63
    iget-object p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->f:Landroid/content/Context;

    return-object p0
.end method

.method static synthetic c(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)Ljava/util/List;
    .locals 0

    .line 63
    iget-object p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    return-object p0
.end method

.method static synthetic d(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)Ljava/util/ArrayList;
    .locals 0

    .line 63
    invoke-direct {p0}, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->f()Ljava/util/ArrayList;

    move-result-object p0

    return-object p0
.end method

.method static synthetic e(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)Ljava/util/Map;
    .locals 0

    .line 63
    iget-object p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->h:Ljava/util/Map;

    return-object p0
.end method

.method static synthetic f(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)I
    .locals 0

    .line 63
    iget p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->l:I

    return p0
.end method

.method private f()Ljava/util/ArrayList;
    .locals 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/ArrayList<",
            "Lcom/moji/http/snsforum/entity/ThumbPictureItem;",
            ">;"
        }
    .end annotation

    .line 353
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 354
    iget-object v1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

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

    move-result v2

    if-eqz v2, :cond_0

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

    move-result-object v2

    check-cast v2, Lcom/moji/http/snsforum/entity/WaterFallPicture;

    .line 355
    new-instance v3, Lcom/moji/http/snsforum/entity/ThumbPictureItem;

    invoke-direct {v3}, Lcom/moji/http/snsforum/entity/ThumbPictureItem;-><init>()V

    .line 356
    iget-wide v4, v2, Lcom/moji/http/snsforum/entity/WaterFallPicture;->id:J

    iput-wide v4, v3, Lcom/moji/http/snsforum/entity/ThumbPictureItem;->id:J

    .line 357
    iget-object v4, v2, Lcom/moji/http/snsforum/entity/WaterFallPicture;->full_path:Ljava/lang/String;

    iput-object v4, v3, Lcom/moji/http/snsforum/entity/ThumbPictureItem;->url:Ljava/lang/String;

    .line 358
    iget v4, v2, Lcom/moji/http/snsforum/entity/WaterFallPicture;->width:I

    iput v4, v3, Lcom/moji/http/snsforum/entity/ThumbPictureItem;->width:I

    .line 359
    iget v2, v2, Lcom/moji/http/snsforum/entity/WaterFallPicture;->height:I

    iput v2, v3, Lcom/moji/http/snsforum/entity/ThumbPictureItem;->height:I

    .line 360
    invoke-virtual {v0, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    :cond_0
    return-object v0
.end method

.method static synthetic g(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;
    .locals 0

    .line 63
    iget-object p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->i:Landroid/support/v7/widget/StaggeredGridLayoutManager$LayoutParams;

    return-object p0
.end method

.method static synthetic h(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)I
    .locals 0

    .line 63
    iget p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->m:I

    return p0
.end method

.method static synthetic i(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)F
    .locals 0

    .line 63
    iget p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->j:F

    return p0
.end method

.method static synthetic j(Lcom/moji/newliveview/home/presenter/NearLivePresenter;)F
    .locals 0

    .line 63
    iget p0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->k:F

    return p0
.end method


# virtual methods
.method public a(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;)Landroid/support/v7/widget/RecyclerView$ViewHolder;
    .locals 3

    .line 137
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_INDEX_MOMENT:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 138
    new-instance v0, Lcom/moji/newliveview/home/presenter/NearLivePresenter$TitleHolder;

    sget v1, Lcom/moji/newliveview/R$layout;->item_near_live_title:I

    const/4 v2, 0x0

    invoke-virtual {p1, v1, p2, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    invoke-direct {v0, p0, p1}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$TitleHolder;-><init>(Lcom/moji/newliveview/home/presenter/NearLivePresenter;Landroid/view/View;)V

    return-object v0
.end method

.method public a()V
    .locals 1

    .line 117
    invoke-super {p0}, Lcom/moji/newliveview/home/presenter/AbsHomePresenter;->a()V

    .line 118
    iget-object v0, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    return-void
.end method

.method public a(Landroid/support/v7/widget/RecyclerView$ViewHolder;)V
    .locals 1

    .line 147
    invoke-virtual {p0}, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 148
    check-cast p1, Lcom/moji/newliveview/home/presenter/NearLivePresenter$TitleHolder;

    .line 149
    invoke-virtual {p1}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$TitleHolder;->y()V

    .line 150
    invoke-virtual {p0}, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->c()V

    :cond_0
    return-void
.end method

.method public a(Landroid/support/v7/widget/RecyclerView$ViewHolder;I)V
    .locals 0

    .line 157
    check-cast p1, Lcom/moji/newliveview/home/presenter/NearLivePresenter$PicViewHolder;

    .line 158
    invoke-virtual {p1, p2}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$PicViewHolder;->c(I)V

    return-void
.end method

.method public a(Lcom/moji/newliveview/home/view/WaterFallPraiseView;Lcom/moji/http/snsforum/entity/WaterFallPicture;)V
    .locals 3

    if-nez p2, :cond_0

    return-void

    .line 380
    :cond_0
    new-instance v0, Lcom/moji/http/snsforum/ClickPraiseRequest;

    iget-wide v1, p2, Lcom/moji/http/snsforum/entity/WaterFallPicture;->id:J

    invoke-direct {v0, v1, v2}, Lcom/moji/http/snsforum/ClickPraiseRequest;-><init>(J)V

    .line 381
    new-instance v1, Lcom/moji/newliveview/home/presenter/NearLivePresenter$1;

    invoke-direct {v1, p0, p1, p2}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$1;-><init>(Lcom/moji/newliveview/home/presenter/NearLivePresenter;Lcom/moji/newliveview/home/view/WaterFallPraiseView;Lcom/moji/http/snsforum/entity/WaterFallPicture;)V

    invoke-virtual {v0, v1}, Lcom/moji/http/snsforum/ClickPraiseRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method

.method public a(Ljava/util/List;Ljava/lang/String;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/moji/http/snsforum/entity/WaterFallPicture;",
            ">;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .line 131
    iput-object p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    .line 132
    iput-object p2, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->n:Ljava/lang/String;

    return-void
.end method

.method public b(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;)Landroid/support/v7/widget/RecyclerView$ViewHolder;
    .locals 3

    .line 143
    new-instance v0, Lcom/moji/newliveview/home/presenter/NearLivePresenter$PicViewHolder;

    sget v1, Lcom/moji/newliveview/R$layout;->item_waterfall_near_live:I

    const/4 v2, 0x0

    invoke-virtual {p1, v1, p2, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    invoke-direct {v0, p0, p1}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$PicViewHolder;-><init>(Lcom/moji/newliveview/home/presenter/NearLivePresenter;Landroid/view/View;)V

    return-object v0
.end method

.method public c(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;)Landroid/support/v7/widget/RecyclerView$ViewHolder;
    .locals 3

    .line 437
    new-instance v0, Lcom/moji/newliveview/home/presenter/NearLivePresenter$FooterViewHolder;

    sget v1, Lcom/moji/newliveview/R$layout;->item_newlive_home_footer:I

    const/4 v2, 0x0

    invoke-virtual {p1, v1, p2, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p1

    invoke-direct {v0, p0, p1}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$FooterViewHolder;-><init>(Lcom/moji/newliveview/home/presenter/NearLivePresenter;Landroid/view/View;)V

    return-object v0
.end method

.method public d()V
    .locals 1

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

    move-result-object v0

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

    return-void
.end method

.method public e()V
    .locals 1

    .line 87
    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

.method public refreshPraiseEvent(Lcom/moji/newliveview/category/PraiseEvent;)V
    .locals 9
    .annotation runtime Lorg/greenrobot/eventbus/Subscribe;
        a = .enum Lorg/greenrobot/eventbus/ThreadMode;->MAIN:Lorg/greenrobot/eventbus/ThreadMode;
    .end annotation

    const/4 v0, -0x1

    const/4 v1, 0x0

    const/4 v2, -0x1

    .line 420
    :goto_0
    iget-object v3, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v1, v3, :cond_1

    .line 421
    iget-object v3, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->g:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/moji/http/snsforum/entity/WaterFallPicture;

    .line 422
    iget-wide v4, v3, Lcom/moji/http/snsforum/entity/WaterFallPicture;->id:J

    .line 423
    iget-wide v6, p1, Lcom/moji/newliveview/category/PraiseEvent;->a:J

    sub-long/2addr v4, v6

    const-wide/16 v6, 0x0

    cmp-long v8, v4, v6

    if-nez v8, :cond_0

    .line 424
    iget-wide v4, v3, Lcom/moji/http/snsforum/entity/WaterFallPicture;->praise_num:J

    const-wide/16 v6, 0x1

    add-long/2addr v4, v6

    iput-wide v4, v3, Lcom/moji/http/snsforum/entity/WaterFallPicture;->praise_num:J

    const/4 v2, 0x1

    .line 425
    iput-boolean v2, v3, Lcom/moji/http/snsforum/entity/WaterFallPicture;->is_praise:Z

    move v2, v1

    :cond_0
    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 429
    :cond_1
    iget-object p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->e:Lcom/moji/base/MJPresenter$ICallback;

    if-eqz p1, :cond_2

    if-eq v2, v0, :cond_2

    .line 430
    iget-object p1, p0, Lcom/moji/newliveview/home/presenter/NearLivePresenter;->e:Lcom/moji/base/MJPresenter$ICallback;

    check-cast p1, Lcom/moji/newliveview/home/presenter/NearLivePresenter$NearLiveCallBack;

    invoke-interface {p1, v2}, Lcom/moji/newliveview/home/presenter/NearLivePresenter$NearLiveCallBack;->a(I)V

    :cond_2
    return-void
.end method
