1062 lines
30 KiB
Smali
1062 lines
30 KiB
Smali
.class public Lcom/moji/mjweather/feed/ChannelManageActivity;
|
|
.super Lcom/moji/mjweather/feed/FeedBaseFragmentActivity;
|
|
.source "ChannelManageActivity.java"
|
|
|
|
|
|
# static fields
|
|
.field public static final CHANNEL_CHANGE_FINISHED:Ljava/lang/String; = "channel_change_finished"
|
|
|
|
.field public static final CURRENT_ITEM_CATEGORY_ID:Ljava/lang/String; = "current_item_categoryid"
|
|
|
|
.field public static final OPEN_FROM_MAIN_ACTIVITY:Ljava/lang/String; = "open_from_main_activity"
|
|
|
|
|
|
# instance fields
|
|
.field private a:I
|
|
|
|
.field private b:Z
|
|
|
|
.field private c:Landroid/support/v7/widget/RecyclerView;
|
|
|
|
.field private i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
.field private j:Landroid/support/v7/widget/GridLayoutManager;
|
|
|
|
.field private k:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private l:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private m:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 34
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/FeedBaseFragmentActivity;-><init>()V
|
|
|
|
.line 44
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
.line 45
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/mjweather/feed/ChannelManageActivity;I)I
|
|
.locals 0
|
|
|
|
.line 34
|
|
iput p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->a:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/mjweather/feed/ChannelManageActivity;)Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
.locals 0
|
|
|
|
.line 34
|
|
iget-object p0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private a(Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
.locals 7
|
|
|
|
.line 134
|
|
invoke-static {}, Lcom/moji/mjweather/feed/utils/ChannelController;->a()Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
move-result-object v0
|
|
|
|
.line 135
|
|
invoke-virtual {v0}, Lcom/moji/mjweather/feed/utils/ChannelController;->b()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
.line 136
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
if-lez v2, :cond_5
|
|
|
|
.line 138
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 139
|
|
iget-object v3, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->add_card_list:Ljava/util/ArrayList;
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 140
|
|
iget-object v3, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->add_card_list:Ljava/util/ArrayList;
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 142
|
|
:cond_0
|
|
iget-object v3, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->delete_card_list:Ljava/util/ArrayList;
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
.line 143
|
|
iget-object v3, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->delete_card_list:Ljava/util/ArrayList;
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 146
|
|
:cond_1
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/mjweather/feed/utils/ChannelController;->a(Ljava/util/List;Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
.line 147
|
|
invoke-interface {v2, v0}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z
|
|
|
|
.line 148
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_2
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
.line 149
|
|
iget-object v4, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->add_card_list:Ljava/util/ArrayList;
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
.line 150
|
|
iget-object v4, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->add_card_list:Ljava/util/ArrayList;
|
|
|
|
invoke-virtual {v4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v4
|
|
|
|
:cond_3
|
|
:goto_0
|
|
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_2
|
|
|
|
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
.line 151
|
|
invoke-virtual {v3, v5}, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
.line 152
|
|
iget v6, v5, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
iput v6, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
.line 153
|
|
iget v6, v5, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->isHot:I
|
|
|
|
iput v6, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->isHot:I
|
|
|
|
.line 154
|
|
iget v6, v5, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->isNew:I
|
|
|
|
iput v6, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->isNew:I
|
|
|
|
.line 155
|
|
iget-object v6, v5, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->iconPath:Ljava/lang/String;
|
|
|
|
iput-object v6, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->iconPath:Ljava/lang/String;
|
|
|
|
.line 156
|
|
iget v5, v5, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->type:I
|
|
|
|
iput v5, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->type:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 161
|
|
:cond_4
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->clear()V
|
|
|
|
.line 162
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->clear()V
|
|
|
|
.line 163
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 164
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 165
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/EncryptTool;->a(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->m:Ljava/lang/String;
|
|
|
|
.line 166
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
iget v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->a:I
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->f(I)V
|
|
|
|
.line 167
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c()V
|
|
|
|
goto :goto_1
|
|
|
|
.line 171
|
|
:cond_5
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/feed/ChannelManageActivity;->b(Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/mjweather/feed/ChannelManageActivity;Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
.locals 0
|
|
|
|
.line 34
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/feed/ChannelManageActivity;->b(Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Ljava/util/List;)V
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 177
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
.line 178
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 179
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v1, v2, :cond_3
|
|
|
|
.line 180
|
|
invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
if-lez v1, :cond_1
|
|
|
|
.line 182
|
|
iget v3, v2, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
const/16 v4, 0x24
|
|
|
|
if-eq v3, v4, :cond_0
|
|
|
|
.line 183
|
|
iget-object v3, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
add-int/lit8 v4, v1, 0x1
|
|
|
|
if-le v3, v4, :cond_2
|
|
|
|
iget-object v3, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {v3, v4, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_1
|
|
|
|
.line 185
|
|
:cond_0
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {p1, v0, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_2
|
|
|
|
.line 189
|
|
:cond_1
|
|
iget-object v3, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
const/4 v4, 0x1
|
|
|
|
invoke-interface {v3, v4, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_2
|
|
:goto_1
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic b(Lcom/moji/mjweather/feed/ChannelManageActivity;)Ljava/util/List;
|
|
.locals 0
|
|
|
|
.line 34
|
|
iget-object p0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private b(Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
.locals 1
|
|
|
|
.line 200
|
|
iget-object v0, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->add_card_list:Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p0, v0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->a(Ljava/util/List;)V
|
|
|
|
.line 201
|
|
iget-object v0, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->delete_card_list:Ljava/util/ArrayList;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 202
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->clear()V
|
|
|
|
.line 203
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
iget-object p1, p1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;->delete_card_list:Ljava/util/ArrayList;
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 205
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/EncryptTool;->a(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->m:Ljava/lang/String;
|
|
|
|
.line 206
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
iget v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->a:I
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->f(I)V
|
|
|
|
.line 207
|
|
iget-object p1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->c()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic b(Lcom/moji/mjweather/feed/ChannelManageActivity;Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
.locals 0
|
|
|
|
.line 34
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/feed/ChannelManageActivity;->a(Lcom/moji/http/fdsapi/entity/FeedManagerSubscribe;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic c(Lcom/moji/mjweather/feed/ChannelManageActivity;)Z
|
|
.locals 0
|
|
|
|
.line 34
|
|
iget-boolean p0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->b:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic d(Lcom/moji/mjweather/feed/ChannelManageActivity;)I
|
|
.locals 0
|
|
|
|
.line 34
|
|
iget p0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->a:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static synthetic e(Lcom/moji/mjweather/feed/ChannelManageActivity;)V
|
|
.locals 0
|
|
|
|
.line 34
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->n()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private j()V
|
|
.locals 3
|
|
|
|
.line 115
|
|
new-instance v0, Lcom/moji/http/fdsapi/GetSubscribeRequest;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v0, v2, v1, v1}, Lcom/moji/http/fdsapi/GetSubscribeRequest;-><init>(III)V
|
|
|
|
.line 116
|
|
new-instance v1, Lcom/moji/mjweather/feed/ChannelManageActivity$4;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/mjweather/feed/ChannelManageActivity$4;-><init>(Lcom/moji/mjweather/feed/ChannelManageActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/http/fdsapi/GetSubscribeRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private k()V
|
|
.locals 3
|
|
|
|
.line 212
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->l()Lorg/json/JSONArray;
|
|
|
|
move-result-object v0
|
|
|
|
.line 213
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->m()Lorg/json/JSONArray;
|
|
|
|
move-result-object v1
|
|
|
|
.line 214
|
|
invoke-virtual {v0}, Lorg/json/JSONArray;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 215
|
|
new-instance v2, Lcom/moji/http/fdsapi/SaveSubscribeRequest;
|
|
|
|
invoke-direct {v2, v0, v1}, Lcom/moji/http/fdsapi/SaveSubscribeRequest;-><init>(Lorg/json/JSONArray;Lorg/json/JSONArray;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 216
|
|
invoke-virtual {v2, v0}, Lcom/moji/http/fdsapi/SaveSubscribeRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V
|
|
|
|
.line 218
|
|
:cond_0
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/moji/mjweather/feed/event/EventBusChannelBack;
|
|
|
|
iget v2, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->a:I
|
|
|
|
invoke-direct {v1, v2}, Lcom/moji/mjweather/feed/event/EventBusChannelBack;-><init>(I)V
|
|
|
|
invoke-virtual {v0, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 219
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private l()Lorg/json/JSONArray;
|
|
.locals 5
|
|
|
|
.line 223
|
|
new-instance v0, Lorg/json/JSONArray;
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
|
|
|
|
.line 224
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 225
|
|
iget-object v2, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_0
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
.line 226
|
|
iget v4, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 229
|
|
:cond_0
|
|
iget v4, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 230
|
|
iget v3, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
invoke-virtual {v0, v3}, Lorg/json/JSONArray;->put(I)Lorg/json/JSONArray;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private m()Lorg/json/JSONArray;
|
|
.locals 6
|
|
|
|
.line 236
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 237
|
|
:goto_0
|
|
iget-object v3, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v3}, Ljava/util/List;->size()I
|
|
|
|
move-result v3
|
|
|
|
if-ge v2, v3, :cond_0
|
|
|
|
.line 238
|
|
iget-object v3, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
.line 239
|
|
iget v4, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
iget v5, v1, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
if-ne v4, v5, :cond_1
|
|
|
|
.line 240
|
|
iget-object v4, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v4, v3}, Ljava/util/List;->remove(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 245
|
|
:cond_2
|
|
new-instance v0, Lorg/json/JSONArray;
|
|
|
|
invoke-direct {v0}, Lorg/json/JSONArray;-><init>()V
|
|
|
|
.line 246
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 247
|
|
iget-object v2, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_1
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;
|
|
|
|
.line 248
|
|
iget v4, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
.line 251
|
|
:cond_3
|
|
iget v4, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 252
|
|
iget v3, v3, Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;->categoryId:I
|
|
|
|
invoke-virtual {v0, v3}, Lorg/json/JSONArray;->put(I)Lorg/json/JSONArray;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private n()V
|
|
.locals 2
|
|
|
|
.line 288
|
|
iget-boolean v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->b:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 289
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "channel_change_finished"
|
|
|
|
invoke-virtual {v0, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 293
|
|
:cond_0
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->k()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected a()V
|
|
.locals 1
|
|
|
|
.line 50
|
|
sget v0, Lcom/moji/mjweather/feed/R$layout;->activity_zaker_channel_manage_root:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->setContentView(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected c()V
|
|
.locals 4
|
|
|
|
.line 55
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->w()V
|
|
|
|
const-string v0, "\u9891\u9053\u7ba1\u7406"
|
|
|
|
.line 56
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->b(Ljava/lang/String;)V
|
|
|
|
.line 57
|
|
sget v0, Lcom/moji/mjweather/feed/R$id;->recyclerview:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/support/v7/widget/RecyclerView;
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->c:Landroid/support/v7/widget/RecyclerView;
|
|
|
|
.line 58
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->c:Landroid/support/v7/widget/RecyclerView;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v7/widget/RecyclerView;->setVisibility(I)V
|
|
|
|
.line 59
|
|
new-instance v0, Landroid/support/v7/widget/GridLayoutManager;
|
|
|
|
const/4 v1, 0x4
|
|
|
|
invoke-direct {v0, p0, v1}, Landroid/support/v7/widget/GridLayoutManager;-><init>(Landroid/content/Context;I)V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->j:Landroid/support/v7/widget/GridLayoutManager;
|
|
|
|
.line 60
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->c:Landroid/support/v7/widget/RecyclerView;
|
|
|
|
iget-object v1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->j:Landroid/support/v7/widget/GridLayoutManager;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v7/widget/RecyclerView;->setLayoutManager(Landroid/support/v7/widget/RecyclerView$LayoutManager;)V
|
|
|
|
.line 61
|
|
new-instance v0, Lcom/moji/mjweather/feed/adapter/ChannelItemDragHelperCallback;
|
|
|
|
invoke-direct {v0}, Lcom/moji/mjweather/feed/adapter/ChannelItemDragHelperCallback;-><init>()V
|
|
|
|
.line 62
|
|
new-instance v1, Landroid/support/v7/widget/helper/ItemTouchHelper;
|
|
|
|
invoke-direct {v1, v0}, Landroid/support/v7/widget/helper/ItemTouchHelper;-><init>(Landroid/support/v7/widget/helper/ItemTouchHelper$Callback;)V
|
|
|
|
.line 63
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->c:Landroid/support/v7/widget/RecyclerView;
|
|
|
|
invoke-virtual {v1, v0}, Landroid/support/v7/widget/helper/ItemTouchHelper;->a(Landroid/support/v7/widget/RecyclerView;)V
|
|
|
|
.line 64
|
|
new-instance v0, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
iget-object v2, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->k:Ljava/util/List;
|
|
|
|
iget-object v3, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->l:Ljava/util/List;
|
|
|
|
invoke-direct {v0, p0, v1, v2, v3}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;-><init>(Landroid/content/Context;Landroid/support/v7/widget/helper/ItemTouchHelper;Ljava/util/List;Ljava/util/List;)V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
.line 65
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->c:Landroid/support/v7/widget/RecyclerView;
|
|
|
|
iget-object v1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v7/widget/RecyclerView;->setAdapter(Landroid/support/v7/widget/RecyclerView$Adapter;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected e()V
|
|
.locals 2
|
|
|
|
.line 71
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->j:Landroid/support/v7/widget/GridLayoutManager;
|
|
|
|
new-instance v1, Lcom/moji/mjweather/feed/ChannelManageActivity$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/mjweather/feed/ChannelManageActivity$1;-><init>(Lcom/moji/mjweather/feed/ChannelManageActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/support/v7/widget/GridLayoutManager;->a(Landroid/support/v7/widget/GridLayoutManager$SpanSizeLookup;)V
|
|
|
|
.line 79
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
new-instance v1, Lcom/moji/mjweather/feed/ChannelManageActivity$2;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/mjweather/feed/ChannelManageActivity$2;-><init>(Lcom/moji/mjweather/feed/ChannelManageActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a(Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OnMyChannelItemClickListener;)V
|
|
|
|
.line 95
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
new-instance v1, Lcom/moji/mjweather/feed/ChannelManageActivity$3;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/mjweather/feed/ChannelManageActivity$3;-><init>(Lcom/moji/mjweather/feed/ChannelManageActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->a(Lcom/moji/mjweather/feed/adapter/ChannelAdapter$OnChannelMoveListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
.line 264
|
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 265
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->n()V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
.line 268
|
|
:cond_0
|
|
invoke-super {p0, p1, p2}, Lcom/moji/mjweather/feed/FeedBaseFragmentActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method protected onPause()V
|
|
.locals 2
|
|
|
|
.line 298
|
|
invoke-super {p0}, Lcom/moji/mjweather/feed/FeedBaseFragmentActivity;->onPause()V
|
|
|
|
.line 299
|
|
invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/account/data/AccountProvider;->f()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 300
|
|
invoke-static {}, Lcom/moji/mjweather/feed/utils/ChannelController;->a()Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
move-result-object v0
|
|
|
|
.line 301
|
|
iget-object v1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->i:Lcom/moji/mjweather/feed/adapter/ChannelAdapter;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/mjweather/feed/adapter/ChannelAdapter;->f()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/mjweather/feed/utils/ChannelController;->a(Ljava/util/List;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected p_()V
|
|
.locals 3
|
|
|
|
.line 106
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "current_item_categoryid"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 107
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
iput v1, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->a:I
|
|
|
|
const-string v1, "open_from_main_activity"
|
|
|
|
.line 108
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
iput-boolean v0, p0, Lcom/moji/mjweather/feed/ChannelManageActivity;->b:Z
|
|
|
|
.line 109
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/moji/statistics/EVENT_TAG;->FEEDS_CATEGORYL_MANAGER:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 110
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->j()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected q_()V
|
|
.locals 0
|
|
|
|
.line 259
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/ChannelManageActivity;->n()V
|
|
|
|
return-void
|
|
.end method
|