2019-12-06 03:29:40 +00:00
|
|
|
.class public final Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;
|
2019-07-24 11:27:29 +00:00
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "WidgetChatListAdapter.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Ljava/lang/Runnable;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
2019-12-06 03:29:40 +00:00
|
|
|
accessFlags = 0x19
|
2019-07-24 11:27:29 +00:00
|
|
|
name = "ScrollToWithHighlight"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public attempts:I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final handler:Landroid/os/Handler;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final messageId:J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final onCompleted:Lkotlin/jvm/functions/Function0;
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/widgets/chat/list/WidgetChatListAdapter;Landroid/os/Handler;JLkotlin/jvm/functions/Function0;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/widgets/chat/list/WidgetChatListAdapter;",
|
|
|
|
"Landroid/os/Handler;",
|
|
|
|
"J",
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;)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_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p2, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
if-eqz p5, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->handler:Landroid/os/Handler;
|
|
|
|
|
|
|
|
iput-wide p3, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->messageId:J
|
|
|
|
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->onCompleted:Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->handler:Landroid/os/Handler;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {p1, p0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "onCompleted"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
throw v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:cond_1
|
|
|
|
const-string p1, "handler"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "adapter"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {p1}, Ly/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 private final animateHighlight(Landroid/view/View;)V
|
|
|
|
.locals 4
|
|
|
|
|
2020-04-24 19:40:22 +00:00
|
|
|
const v0, 0x7f0800dc
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setBackgroundResource(I)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getBackground()Landroid/graphics/drawable/Drawable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/graphics/drawable/TransitionDrawable;
|
|
|
|
|
|
|
|
const/16 v1, 0x1f4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/graphics/drawable/TransitionDrawable;->startTransition(I)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getHandler()Landroid/os/Handler;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight$animateHighlight$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, v0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight$animateHighlight$1;-><init>(Landroid/graphics/drawable/TransitionDrawable;)V
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x1f4
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-04-17 19:35:49 +00:00
|
|
|
new-instance p1, Ly/l;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
const-string v0, "null cannot be cast to non-null type android.graphics.drawable.TransitionDrawable"
|
|
|
|
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-direct {p1, v0}, Ly/l;-><init>(Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getNewMessageEntryIndex(Ljava/util/List;)I
|
2019-12-12 08:58:10 +00:00
|
|
|
.locals 12
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/widgets/chat/list/entries/ChatListEntry;",
|
|
|
|
">;)I"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->messageId:J
|
|
|
|
|
|
|
|
const-wide/16 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
cmp-long v6, v0, v2
|
|
|
|
|
|
|
|
if-nez v6, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iget-wide v6, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->messageId:J
|
|
|
|
|
|
|
|
const-wide/16 v8, 0x1
|
|
|
|
|
|
|
|
cmp-long v1, v6, v8
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return v5
|
|
|
|
|
|
|
|
:cond_1
|
2019-12-12 08:58:10 +00:00
|
|
|
const/4 v1, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
cmp-long v8, v6, v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-nez v8, :cond_5
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
iget-object v6, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter;->getData()Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
invoke-interface {v6}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;->getNewMessagesMarkerMessageId()J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-wide v6
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Number;->longValue()J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-wide v7
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
cmp-long v9, v7, v2
|
|
|
|
|
|
|
|
if-lez v9, :cond_2
|
|
|
|
|
|
|
|
const/4 v7, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
|
|
|
|
goto :goto_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_3
|
2019-12-12 08:58:10 +00:00
|
|
|
move-object v6, v1
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v6
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return v5
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
:goto_3
|
|
|
|
const/4 v8, -0x1
|
|
|
|
|
|
|
|
cmp-long v9, v6, v2
|
|
|
|
|
|
|
|
if-gtz v9, :cond_6
|
|
|
|
|
|
|
|
return v8
|
|
|
|
|
|
|
|
:cond_6
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:goto_4
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result v9
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-eqz v9, :cond_9
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v9
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
check-cast v9, Lcom/discord/widgets/chat/list/entries/ChatListEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
instance-of v10, v9, Lcom/discord/widgets/chat/list/entries/MessageEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-eqz v10, :cond_7
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
check-cast v9, Lcom/discord/widgets/chat/list/entries/MessageEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v9}, Lcom/discord/widgets/chat/list/entries/MessageEntry;->getMessage()Lcom/discord/models/domain/ModelMessage;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v9
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v9}, Lcom/discord/models/domain/ModelMessage;->getId()J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-wide v9
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
cmp-long v11, v9, v6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-gtz v11, :cond_7
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
const/4 v9, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
goto :goto_5
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_7
|
|
|
|
const/4 v9, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:goto_5
|
|
|
|
if-eqz v9, :cond_8
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
goto :goto_6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_8
|
2019-07-24 11:27:29 +00:00
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
goto :goto_4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_9
|
|
|
|
const/4 v3, -0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:goto_6
|
|
|
|
if-gez v3, :cond_a
|
|
|
|
|
|
|
|
if-eqz v0, :cond_a
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter;->Companion:Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Companion;
|
|
|
|
|
2020-04-17 17:35:24 +00:00
|
|
|
invoke-static {p1}, Lf/n/a/j/a;->getLastIndex(Ljava/util/List;)I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-static {v0, v2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Companion;->access$findBestNewMessagesPosition(Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Companion;I)I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_a
|
2020-04-17 19:35:49 +00:00
|
|
|
invoke-static {v3, v5}, Ly/x/f;->downTo(II)Lkotlin/ranges/IntProgression;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_b
|
2019-07-24 11:27:29 +00:00
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-eqz v2, :cond_d
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-object v8, v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
check-cast v8, Ljava/lang/Number;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v8}, Ljava/lang/Number;->intValue()I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result v8
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-interface {p1, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v8
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
check-cast v8, Lcom/discord/widgets/chat/list/entries/ChatListEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
instance-of v9, v8, Lcom/discord/widgets/chat/list/entries/NewMessagesEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-eqz v9, :cond_c
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
check-cast v8, Lcom/discord/widgets/chat/list/entries/NewMessagesEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v8}, Lcom/discord/widgets/chat/list/entries/NewMessagesEntry;->getMessageId()J
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-wide v8
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
cmp-long v10, v8, v6
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-nez v10, :cond_c
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
const/4 v8, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
goto :goto_7
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_c
|
|
|
|
const/4 v8, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:goto_7
|
|
|
|
if-eqz v8, :cond_b
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-object v1, v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_d
|
|
|
|
check-cast v1, Ljava/lang/Integer;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-eqz v1, :cond_e
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_e
|
|
|
|
return v3
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final scheduleRetry()V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->attempts:I
|
|
|
|
|
|
|
|
const/16 v1, 0x14
|
|
|
|
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
|
|
|
|
iput v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->attempts:I
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->handler:Landroid/os/Handler;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const-wide/16 v1, 0x64
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v0, p0, v1, v2}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->onCompleted:Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final cancel()V
|
2019-12-06 03:29:40 +00:00
|
|
|
.locals 1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->handler:Landroid/os/Handler;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
invoke-virtual {v0, p0}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getAdapter()Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getHandler()Landroid/os/Handler;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->handler:Landroid/os/Handler;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getMessageId()J
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->messageId:J
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getOnCompleted()Lkotlin/jvm/functions/Function0;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->onCompleted:Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public run()V
|
2019-12-12 08:58:10 +00:00
|
|
|
.locals 4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter;->getData()Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/chat/list/model/WidgetChatListModel;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
move-object v0, v2
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/chat/list/model/WidgetChatListModel;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/list/model/WidgetChatListModel;->isLoadingMessages()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->scheduleRetry()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter;->getData()Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;->getList()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->getNewMessageEntryIndex(Ljava/util/List;)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-gez v0, :cond_2
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->scheduleRetry()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v1}, Landroid/view/ViewGroup;->getHeight()I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
int-to-float v1, v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
const/high16 v3, 0x40000000 # 2.0f
|
|
|
|
|
|
|
|
div-float/2addr v1, v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
float-to-int v1, v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter;->getLayoutManager()Landroidx/recyclerview/widget/LinearLayoutManager;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-eqz v3, :cond_3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v3, v0, v1}, Landroidx/recyclerview/widget/LinearLayoutManager;->scrollToPositionWithOffset(II)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v3, v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->findViewByPosition(I)Landroid/view/View;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
:cond_3
|
|
|
|
if-eqz v2, :cond_5
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->adapter:Lcom/discord/widgets/chat/list/WidgetChatListAdapter;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter;->getData()Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-interface {v1}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$Data;->getList()Ljava/util/List;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
move-result-object v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
instance-of v0, v0, Lcom/discord/widgets/chat/list/entries/NewMessagesEntry;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-12 08:58:10 +00:00
|
|
|
if-nez v0, :cond_4
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v2}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->animateHighlight(Landroid/view/View;)V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->onCompleted:Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
goto :goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_5
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/list/WidgetChatListAdapter$ScrollToWithHighlight;->scheduleRetry()V
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
:goto_0
|
2019-07-24 11:27:29 +00:00
|
|
|
return-void
|
|
|
|
.end method
|