2020-02-06 22:18:40 +00:00
|
|
|
.class public final Lcom/discord/widgets/friends/FriendsListViewModel;
|
|
|
|
.super Le/a/b/c0;
|
|
|
|
.source "FriendsListViewModel.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/friends/FriendsListViewModel$ViewState;,
|
|
|
|
Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;,
|
|
|
|
Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;,
|
|
|
|
Lcom/discord/widgets/friends/FriendsListViewModel$Item;,
|
|
|
|
Lcom/discord/widgets/friends/FriendsListViewModel$Factory;,
|
|
|
|
Lcom/discord/widgets/friends/FriendsListViewModel$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Le/a/b/c0<",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$ViewState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final COLLAPSED_PENDING_ITEM_COUNT:I = 0x2
|
|
|
|
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/friends/FriendsListViewModel$Companion;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public computeItemJob:Lrx/functions/Cancellable;
|
|
|
|
|
|
|
|
.field public final initRequestSectionExpanded:Z
|
|
|
|
|
|
|
|
.field public isPendingSectionExpanded:Z
|
|
|
|
|
|
|
|
.field public listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
.field public final storeObservable:Lrx/Observable;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/friends/FriendsListViewModel$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/friends/FriendsListViewModel$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/friends/FriendsListViewModel;->Companion:Lcom/discord/widgets/friends/FriendsListViewModel$Companion;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>(Lrx/Observable;Z)V
|
|
|
|
.locals 10
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;",
|
|
|
|
">;Z)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Uninitialized;
|
|
|
|
|
|
|
|
invoke-direct {p0, v1}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->storeObservable:Lrx/Observable;
|
|
|
|
|
|
|
|
iput-boolean p2, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->initRequestSectionExpanded:Z
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
sget-object p2, Lt/q/o;->d:Lt/q/o;
|
|
|
|
|
|
|
|
invoke-direct {p1, v0, p2, p2}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;-><init>(Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;Ljava/util/List;Ljava/util/List;)V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
iget-boolean p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->initRequestSectionExpanded:Z
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->isPendingSectionExpanded:Z
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->storeObservable:Lrx/Observable;
|
|
|
|
|
|
|
|
const/4 p2, 0x2
|
|
|
|
|
|
|
|
invoke-static {p1, p0, v0, p2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-class v2, Lcom/discord/widgets/friends/FriendsListViewModel;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
new-instance v7, Lcom/discord/widgets/friends/FriendsListViewModel$1;
|
|
|
|
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/friends/FriendsListViewModel$1;-><init>(Lcom/discord/widgets/friends/FriendsListViewModel;)V
|
|
|
|
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "storeObservable"
|
|
|
|
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic constructor <init>(Lrx/Observable;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/friends/FriendsListViewModel;-><init>(Lrx/Observable;Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getItems(Lcom/discord/widgets/friends/FriendsListViewModel;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p6}, Lcom/discord/widgets/friends/FriendsListViewModel;->getItems(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleComputedItems(Lcom/discord/widgets/friends/FriendsListViewModel;Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/friends/FriendsListViewModel;->handleComputedItems(Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/friends/FriendsListViewModel;Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/friends/FriendsListViewModel;->handleStoreState(Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final asyncComputeAndHandleOnUiThread(Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lrx/functions/Cancellable;
|
|
|
|
.locals 12
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<T:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">(",
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"+TT;>;",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Lcom/discord/utilities/error/Error;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-TT;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)",
|
|
|
|
"Lrx/functions/Cancellable;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lkotlin/jvm/internal/Ref$ObjectRef;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lkotlin/jvm/internal/Ref$ObjectRef;-><init>()V
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
iput-object v1, v0, Lkotlin/jvm/internal/Ref$ObjectRef;->element:Ljava/lang/Object;
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$1;
|
|
|
|
|
|
|
|
invoke-direct {v2, p1}, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$1;-><init>(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
|
|
|
|
sget-object p1, Lrx/Emitter$a;->d:Lrx/Emitter$a;
|
|
|
|
|
|
|
|
invoke-static {v2, p1}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/Emitter$a;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {}, Lb0/q/a;->b()Lrx/Scheduler;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2}, Lrx/Observable;->b(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v2, "Observable\n .crea\u2026Schedulers.computation())"
|
|
|
|
|
|
|
|
invoke-static {p1, v2}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
invoke-static {p1, p0, v1, v2, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-class v4, Lcom/discord/widgets/friends/FriendsListViewModel;
|
|
|
|
|
|
|
|
new-instance v9, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$2;
|
|
|
|
|
|
|
|
invoke-direct {v9, p3}, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$2;-><init>(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
new-instance v7, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$3;
|
|
|
|
|
|
|
|
invoke-direct {v7, p2}, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$3;-><init>(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
new-instance v6, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$4;
|
|
|
|
|
|
|
|
invoke-direct {v6, v0}, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$4;-><init>(Lkotlin/jvm/internal/Ref$ObjectRef;)V
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
const/16 v10, 0x12
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v3 .. v11}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$5;
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/widgets/friends/FriendsListViewModel$asyncComputeAndHandleOnUiThread$5;-><init>(Lkotlin/jvm/internal/Ref$ObjectRef;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic asyncComputeAndHandleOnUiThread$default(Lcom/discord/widgets/friends/FriendsListViewModel;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/functions/Cancellable;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/friends/FriendsListViewModel;->asyncComputeAndHandleOnUiThread(Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lrx/functions/Cancellable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final generateLoadedItems()V
|
|
|
|
.locals 8
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;->getPendingHeaderItem()Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
iget-boolean v4, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->isPendingSectionExpanded:Z
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/16 v6, 0xb
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;->copy$default(Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;IIZZILjava/lang/Object;)Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
move-object v2, v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x6
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;->copy$default(Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;Ljava/util/List;Ljava/util/List;ILjava/lang/Object;)Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/friends/FriendsListViewModel;->getVisibleItems(Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Loaded;-><init>(Ljava/util/List;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getItems(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
.locals 7
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelGuildMember$Computed;",
|
|
|
|
">;>;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
|
|
">;)",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {p1}, Le/k/a/b/e/p/g;->asSequence(Ljava/util/Map;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v6, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$allItems$1;
|
|
|
|
|
|
|
|
move-object v0, v6
|
|
|
|
|
|
|
|
move-object v1, p2
|
|
|
|
|
|
|
|
move-object v2, p3
|
|
|
|
|
|
|
|
move-object v3, p4
|
|
|
|
|
|
|
|
move-object v4, p5
|
|
|
|
|
|
|
|
move-object v5, p6
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$allItems$1;-><init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V
|
|
|
|
|
|
|
|
invoke-static {p1, v6}, Le/k/a/b/e/p/g;->mapNotNull(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$pendingSectionItems$1;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$getItems$pendingSectionItems$1;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Le/k/a/b/e/p/g;->filter(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
sget-object p3, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$pendingSectionItems$2;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$getItems$pendingSectionItems$2;
|
|
|
|
|
|
|
|
invoke-static {p2, p3}, Le/k/a/b/e/p/g;->sortedWith(Lkotlin/sequences/Sequence;Ljava/util/Comparator;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-static {p2}, Le/k/a/b/e/p/g;->toList(Lkotlin/sequences/Sequence;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result p3
|
|
|
|
|
|
|
|
const/4 p4, 0x1
|
|
|
|
|
|
|
|
xor-int/2addr p3, p4
|
|
|
|
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
const p3, 0x7f1206cd
|
2020-02-06 22:18:40 +00:00
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->size()I
|
|
|
|
|
|
|
|
move-result p5
|
|
|
|
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->size()I
|
|
|
|
|
|
|
|
move-result p6
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-le p6, v0, :cond_0
|
|
|
|
|
|
|
|
const/4 p6, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p6, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
new-instance v0, Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;
|
|
|
|
|
|
|
|
invoke-direct {v0, p3, p5, v1, p6}, Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;-><init>(IIZZ)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
new-instance p3, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {p3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
sget-object p5, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$onlineFriendItems$1;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$getItems$onlineFriendItems$1;
|
|
|
|
|
|
|
|
invoke-static {p1, p5}, Le/k/a/b/e/p/g;->filter(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p5
|
|
|
|
|
|
|
|
sget-object p6, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$onlineFriendItems$2;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$getItems$onlineFriendItems$2;
|
|
|
|
|
|
|
|
invoke-static {p5, p6}, Le/k/a/b/e/p/g;->sortedWith(Lkotlin/sequences/Sequence;Ljava/util/Comparator;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p5
|
|
|
|
|
|
|
|
invoke-static {p5}, Le/k/a/b/e/p/g;->toList(Lkotlin/sequences/Sequence;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p5
|
|
|
|
|
|
|
|
invoke-interface {p5}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result p6
|
|
|
|
|
|
|
|
xor-int/2addr p6, p4
|
|
|
|
|
|
|
|
if-eqz p6, :cond_2
|
|
|
|
|
|
|
|
new-instance p6, Lcom/discord/widgets/friends/FriendsListViewModel$Item$Header;
|
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
const v1, 0x7f121195
|
2020-02-06 22:18:40 +00:00
|
|
|
|
|
|
|
invoke-direct {p6, v1}, Lcom/discord/widgets/friends/FriendsListViewModel$Item$Header;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-virtual {p3, p6}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {p3, p5}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sget-object p5, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$offlineFriendItems$1;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$getItems$offlineFriendItems$1;
|
|
|
|
|
|
|
|
invoke-static {p1, p5}, Le/k/a/b/e/p/g;->filter(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
sget-object p5, Lcom/discord/widgets/friends/FriendsListViewModel$getItems$offlineFriendItems$2;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$getItems$offlineFriendItems$2;
|
|
|
|
|
|
|
|
invoke-static {p1, p5}, Le/k/a/b/e/p/g;->sortedWith(Lkotlin/sequences/Sequence;Ljava/util/Comparator;)Lkotlin/sequences/Sequence;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Le/k/a/b/e/p/g;->toList(Lkotlin/sequences/Sequence;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result p5
|
|
|
|
|
|
|
|
xor-int/2addr p4, p5
|
|
|
|
|
|
|
|
if-eqz p4, :cond_3
|
|
|
|
|
|
|
|
new-instance p4, Lcom/discord/widgets/friends/FriendsListViewModel$Item$Header;
|
|
|
|
|
2020-02-12 20:59:48 +00:00
|
|
|
const p5, 0x7f121194
|
2020-02-06 22:18:40 +00:00
|
|
|
|
|
|
|
invoke-direct {p4, p5}, Lcom/discord/widgets/friends/FriendsListViewModel$Item$Header;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-virtual {p3, p4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {p3, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance p1, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
invoke-direct {p1, v0, p2, p3}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;-><init>(Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;Ljava/util/List;Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getVisibleItems(Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;)Ljava/util/List;
|
|
|
|
.locals 3
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;",
|
|
|
|
")",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$Item;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;->component1()Lcom/discord/widgets/friends/FriendsListViewModel$Item$PendingHeader;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;->component2()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;->component3()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-boolean v2, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->isPendingSectionExpanded:Z
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
const v2, 0x7fffffff
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-static {v1, v2}, Lt/q/l;->take(Ljava/lang/Iterable;I)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {v0}, Le/k/a/b/e/p/g;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lt/q/l;->plus(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Lt/q/l;->plus(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleComputedItems(Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->listSections:Lcom/discord/widgets/friends/FriendsListViewModel$ListSections;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/FriendsListViewModel;->generateLoadedItems()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;)V
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->computeItemJob:Lrx/functions/Cancellable;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lrx/functions/Cancellable;->cancel()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;->getChannelId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Hidden;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Hidden;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;->getRelationships()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Empty;->INSTANCE:Lcom/discord/widgets/friends/FriendsListViewModel$ViewState$Empty;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance v1, Lcom/discord/widgets/friends/FriendsListViewModel$handleStoreState$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/friends/FriendsListViewModel$handleStoreState$1;-><init>(Lcom/discord/widgets/friends/FriendsListViewModel;Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;)V
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
new-instance v3, Lcom/discord/widgets/friends/FriendsListViewModel$handleStoreState$2;
|
|
|
|
|
|
|
|
invoke-direct {v3, p0}, Lcom/discord/widgets/friends/FriendsListViewModel$handleStoreState$2;-><init>(Lcom/discord/widgets/friends/FriendsListViewModel;)V
|
|
|
|
|
|
|
|
const/4 v4, 0x2
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v0, p0
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/widgets/friends/FriendsListViewModel;->asyncComputeAndHandleOnUiThread$default(Lcom/discord/widgets/friends/FriendsListViewModel;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/functions/Cancellable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->computeItemJob:Lrx/functions/Cancellable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getInitRequestSectionExpanded()Z
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->initRequestSectionExpanded:Z
|
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getStoreObservable()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/friends/FriendsListViewModel$StoreState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->storeObservable:Lrx/Observable;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final handleClickPendingHeader()V
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->isPendingSectionExpanded:Z
|
|
|
|
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
|
|
|
|
iput-boolean v0, p0, Lcom/discord/widgets/friends/FriendsListViewModel;->isPendingSectionExpanded:Z
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/FriendsListViewModel;->generateLoadedItems()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|