Weather/smali_classes3/com/moji/user/message/fragment/MoAnnouncementFragment.smali
2021-05-10 10:13:34 +02:00

461 lines
12 KiB
Smali

.class public Lcom/moji/user/message/fragment/MoAnnouncementFragment;
.super Lcom/moji/user/message/fragment/BaseMsgFragment;
.source "MoAnnouncementFragment.java"
# interfaces
.implements Lcom/moji/user/message/IMsgDetailCallBack;
.implements Lcom/moji/user/message/presenter/MoAnnouncementPresenter$MoMsgCallBack;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/moji/user/message/fragment/BaseMsgFragment<",
"Lcom/moji/user/message/presenter/MoAnnouncementPresenter;",
">;",
"Lcom/moji/user/message/IMsgDetailCallBack<",
"Lcom/moji/http/ugc/bean/MoMsgInfo;",
">;",
"Lcom/moji/user/message/presenter/MoAnnouncementPresenter$MoMsgCallBack;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 40
invoke-direct {p0}, Lcom/moji/user/message/fragment/BaseMsgFragment;-><init>()V
return-void
.end method
.method private p()I
.locals 3
.line 69
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;
move-result-object v0
if-eqz v0, :cond_0
.line 70
iget v0, v0, Lcom/moji/common/area/AreaInfo;->cityId:I
goto :goto_0
:cond_0
const/4 v0, -0x1
.line 71
:goto_0
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->h()Z
move-result v1
if-eqz v1, :cond_1
.line 73
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
move-result-object v1
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->b()Lcom/moji/common/area/AreaInfo;
move-result-object v2
invoke-virtual {v1, v2}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
move-result-object v1
if-eqz v1, :cond_2
.line 75
iget-object v0, v1, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
iget-wide v0, v0, Lcom/moji/weatherprovider/data/Detail;->mCityId:J
long-to-int v0, v0
goto :goto_1
.line 78
:cond_1
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->c()Ljava/util/List;
move-result-object v1
if-eqz v1, :cond_2
.line 79
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
if-eqz v1, :cond_2
.line 80
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->c()Ljava/util/List;
move-result-object v0
const/4 v1, 0x0
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/moji/common/area/AreaInfo;
.line 81
iget v0, v0, Lcom/moji/common/area/AreaInfo;->cityId:I
:cond_2
:goto_1
return v0
.end method
# virtual methods
.method public a(ILcom/moji/http/ugc/bean/MoMsgInfo;)V
.locals 4
if-eqz p2, :cond_3
.line 119
iget-object p1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->gotoParam:Ljava/lang/String;
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result p1
if-nez p1, :cond_3
.line 120
invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;
move-result-object p1
invoke-virtual {p1}, Lcom/moji/account/data/AccountProvider;->f()Z
move-result p1
if-eqz p1, :cond_0
.line 121
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
move-result-object p1
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->ME_NEWS_NOTICE_DETAIL_CLICK:Lcom/moji/statistics/EVENT_TAG;
iget v1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->id:I
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
goto :goto_0
.line 123
:cond_0
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
move-result-object p1
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->NOTLOGGED_NEWS_DETAIL_CLICK:Lcom/moji/statistics/EVENT_TAG;
iget v1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->id:I
invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
.line 125
:goto_0
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
move-result-object p1
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->MESSAGE_DETAIL_CLICK:Lcom/moji/statistics/EVENT_TAG;
iget-object v1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->gotoParam:Ljava/lang/String;
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {p1, v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;
.line 126
iget p1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->gotoType:I
const/4 v0, 0x1
if-nez p1, :cond_1
.line 127
new-instance p1, Landroid/content/Intent;
invoke-virtual {p0}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->getContext()Landroid/content/Context;
move-result-object v1
const-class v2, Lcom/moji/webview/BrowserActivity;
invoke-direct {p1, v1, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 128
new-instance v1, Landroid/os/Bundle;
const/4 v2, 0x5
invoke-direct {v1, v2}, Landroid/os/Bundle;-><init>(I)V
const-string v2, "target_url"
.line 129
iget-object v3, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->gotoParam:Ljava/lang/String;
invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
const-string v2, "title"
.line 130
iget-object v3, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->title:Ljava/lang/String;
invoke-virtual {v1, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
.line 131
invoke-virtual {p1, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
.line 132
invoke-virtual {p0, p1}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->startActivity(Landroid/content/Intent;)V
goto :goto_1
.line 133
:cond_1
iget p1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->gotoType:I
if-ne p1, v0, :cond_2
.line 134
new-instance p1, Lcom/moji/open/OpenNewPage;
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
move-result-object v1
invoke-direct {p1, v1}, Lcom/moji/open/OpenNewPage;-><init>(Landroid/content/Context;)V
.line 135
iget-object v1, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->gotoParam:Ljava/lang/String;
invoke-virtual {p1, v1}, Lcom/moji/open/OpenNewPage;->b(Ljava/lang/String;)V
.line 137
:cond_2
:goto_1
iput-boolean v0, p2, Lcom/moji/http/ugc/bean/MoMsgInfo;->isLooked:Z
.line 138
iget-object p1, p0, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->e:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;
invoke-virtual {p1}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->c()V
:cond_3
return-void
.end method
.method public bridge synthetic a(ILjava/lang/Object;)V
.locals 0
.line 40
check-cast p2, Lcom/moji/http/ugc/bean/MoMsgInfo;
invoke-virtual {p0, p1, p2}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->a(ILcom/moji/http/ugc/bean/MoMsgInfo;)V
return-void
.end method
.method public a(Lcom/moji/newliveview/dynamic/base/BaseCell;)V
.locals 0
return-void
.end method
.method public a(Ljava/util/ArrayList;)V
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/ArrayList<",
"Lcom/moji/http/ugc/bean/MoMsgInfo;",
">;)V"
}
.end annotation
if-nez p1, :cond_0
.line 89
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result v0
if-nez v0, :cond_0
return-void
.line 92
:cond_0
iget-object v0, p0, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->e:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;
invoke-virtual {v0}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->d()V
.line 93
invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/moji/http/ugc/bean/MoMsgInfo;
.line 94
new-instance v2, Lcom/moji/user/message/cell/MsgAnnouncementCell;
invoke-direct {v2, v1, p0}, Lcom/moji/user/message/cell/MsgAnnouncementCell;-><init>(Lcom/moji/http/ugc/bean/MoMsgInfo;Lcom/moji/user/message/IMsgDetailCallBack;)V
.line 95
iget-object v1, p0, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->e:Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;
invoke-virtual {v1, v2}, Lcom/moji/newliveview/dynamic/base/CustomRecyclerAdapter;->a(Lcom/moji/newliveview/dynamic/base/Cell;)V
goto :goto_0
.line 97
: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/message/fragment/MoAnnouncementFragment;->a(Z)V
return-void
.end method
.method public b(ZZ)V
.locals 1
.line 102
iget-object v0, p0, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->c:Lcom/moji/swiperefreshlayout/SwipeRefreshLayout;
invoke-virtual {v0}, Lcom/moji/swiperefreshlayout/SwipeRefreshLayout;->b()V
.line 103
invoke-virtual {p0, p1, p2}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->a(ZZ)V
return-void
.end method
.method protected c(Z)V
.locals 1
.line 64
iget-object v0, p0, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->d:Ljava/lang/Object;
check-cast v0, Lcom/moji/user/message/presenter/MoAnnouncementPresenter;
invoke-virtual {v0, p1}, Lcom/moji/user/message/presenter/MoAnnouncementPresenter;->a(Z)V
return-void
.end method
.method public d(Z)V
.locals 0
.line 108
invoke-virtual {p0, p1}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->b(Z)V
return-void
.end method
.method protected j()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method protected synthetic l()Ljava/lang/Object;
.locals 1
.line 40
invoke-virtual {p0}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->o()Lcom/moji/user/message/presenter/MoAnnouncementPresenter;
move-result-object v0
return-object v0
.end method
.method public m()V
.locals 0
return-void
.end method
.method protected n()Ljava/lang/String;
.locals 1
.line 54
sget v0, Lcom/moji/user/R$string;->me_mo_message:I
invoke-static {v0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method protected o()Lcom/moji/user/message/presenter/MoAnnouncementPresenter;
.locals 2
.line 59
new-instance v0, Lcom/moji/user/message/presenter/MoAnnouncementPresenter;
invoke-direct {p0}, Lcom/moji/user/message/fragment/MoAnnouncementFragment;->p()I
move-result v1
invoke-direct {v0, p0, v1}, Lcom/moji/user/message/presenter/MoAnnouncementPresenter;-><init>(Lcom/moji/user/message/presenter/MoAnnouncementPresenter$MoMsgCallBack;I)V
return-object v0
.end method