2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "WidgetUserMentions.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/user/WidgetUserMentions$Model;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = "MessageLoader"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;,
|
|
|
|
Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public interactionState:Lcom/discord/stores/StoreChat$InteractionState;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public loadBeforeMessageId:Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public loadSubscription:Lrx/Subscription;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final mentionLimit:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final mentions:Ljava/util/ArrayList;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/ArrayList<",
|
|
|
|
"Lcom/discord/models/domain/ModelMessage;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final mentionsLoadingStateSubject:Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final retryDelay:J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final retryHandler:Landroid/os/Handler;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public retryRunnable:Ljava/lang/Runnable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/os/Handler;J)V
|
|
|
|
.locals 16
|
|
|
|
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryHandler:Landroid/os/Handler;
|
|
|
|
|
|
|
|
move-wide/from16 v1, p2
|
|
|
|
|
|
|
|
iput-wide v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryDelay:J
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentions:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v1, 0x19
|
|
|
|
|
|
|
|
iput v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionLimit:I
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x7
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
move-object v2, v1
|
|
|
|
|
|
|
|
invoke-direct/range {v2 .. v7}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;-><init>(ZZLjava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
const-wide/16 v9, 0x0
|
|
|
|
|
|
|
|
const/4 v11, 0x0
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
const/4 v13, 0x0
|
|
|
|
|
|
|
|
const/16 v14, 0xf
|
|
|
|
|
|
|
|
const/4 v15, 0x0
|
|
|
|
|
|
|
|
move-object v8, v1
|
|
|
|
|
|
|
|
invoke-direct/range {v8 .. v15}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;-><init>(JZZZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "BehaviorSubject.create(mentionsLoadingState)"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v1, v2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingStateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string v1, "retryHandler"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
throw v1
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleLoadError(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->handleLoadError()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleLoaded(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;Ljava/util/List;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->handleLoaded(Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleLoadError()V
|
|
|
|
.locals 1
|
2019-12-06 03:29:40 +00:00
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$handleLoadError$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$handleLoadError$1;-><init>(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retry(Ljava/lang/Runnable;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleLoaded(Ljava/util/List;)V
|
|
|
|
.locals 8
|
2019-12-06 03:29:40 +00:00
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelMessage;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iget v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionLimit:I
|
|
|
|
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
:goto_1
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/q/l;->lastOrNull(Ljava/util/List;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessage;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->loadBeforeMessageId:Ljava/lang/Long;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentions:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
new-instance v5, Ljava/util/ArrayList;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentions:Ljava/util/ArrayList;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-direct {v5, p1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const/4 v6, 0x3
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;->copy$default(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;ZZLjava/util/List;ILjava/lang/Object;)Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->setMentionsLoadingState(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;)V
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$handleLoaded$1;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0, v0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$handleLoaded$1;-><init>(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;Z)V
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retry(Ljava/lang/Runnable;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final retry(Ljava/lang/Runnable;)V
|
|
|
|
.locals 3
|
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryRunnable:Ljava/lang/Runnable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
if-eqz v0, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryHandler:Landroid/os/Handler;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-11-15 02:21:15 +00:00
|
|
|
invoke-virtual {v1, v0}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
|
|
|
|
|
|
|
|
:cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryRunnable:Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryHandler:Landroid/os/Handler;
|
|
|
|
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->retryDelay:J
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, v1, v2}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final setMentionsLoadingState(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v0, p1}, Lw/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingStateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic tryLoad$default(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$tryLoad$1;->INSTANCE:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$tryLoad$1;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->tryLoad(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getFilters()Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getMentionsLoadingStateSubject()Lrx/subjects/BehaviorSubject;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
|
|
"Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingStateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setFilters(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 2
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v0, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {v1, p1}, Lw/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
xor-int/lit8 v1, v1, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz v1, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->loadSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
|
|
|
|
:cond_0
|
2019-12-06 03:29:40 +00:00
|
|
|
iput-object v0, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->loadBeforeMessageId:Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentions:Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/util/ArrayList;->clear()V
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$filters$1;->INSTANCE:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$filters$1;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->tryLoad(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "value"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw v0
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setInteractionState(Lcom/discord/stores/StoreChat$InteractionState;)V
|
|
|
|
.locals 1
|
2019-12-06 03:29:40 +00:00
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v0, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->interactionState:Lcom/discord/stores/StoreChat$InteractionState;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 p1, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {p0, v0, p1, v0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->tryLoad$default(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "interactionState"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw v0
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final tryLoad(Lkotlin/jvm/functions/Function1;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 10
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-",
|
|
|
|
"Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;",
|
|
|
|
"Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v0, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p1, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-interface {p1, v1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->setMentionsLoadingState(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;->isLoading()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;->isAllLoaded()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->interactionState:Lcom/discord/stores/StoreChat$InteractionState;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreChat$InteractionState;->isAtTopIgnoringTouch()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v1, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eq p1, v1, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionsLoadingState:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v3, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v5, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v6, 0x6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v2 .. v7}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;->copy$default(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;ZZLjava/util/List;ILjava/lang/Object;)Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->setMentionsLoadingState(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$LoadingState;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;->getAllGuilds()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const-wide/16 v2, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;->getGuildId()J
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-wide v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sget-object p1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object v4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget v5, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->mentionLimit:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;->getIncludeRoles()Z
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result v6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->filters:Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$Filters;->getIncludeEveryone()Z
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result v7
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
move-result-object v8
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
iget-object v9, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->loadBeforeMessageId:Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual/range {v4 .. v9}, Lcom/discord/utilities/rest/RestAPI;->getMentions(IZZLjava/lang/Long;Ljava/lang/Long;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-static {p1, v2, v1, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$tryLoad$2;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$tryLoad$2;-><init>(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;)V
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$tryLoad$3;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader$tryLoad$3;-><init>(Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/WidgetUserMentions$Model$MessageLoader;->loadSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
:cond_2
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_1
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "loadingStateUpdater"
|
|
|
|
|
2020-02-20 19:33:18 +00:00
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw v0
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|