129 lines
2.8 KiB
Smali
129 lines
2.8 KiB
Smali
.class public final Lcom/discord/models/application/Unread$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "Unread.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/models/application/Unread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/models/application/Unread$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getTotalMessages(Lcom/discord/models/application/Unread$Companion;Lcom/discord/models/application/Unread$Marker;Ljava/util/List;)I
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/models/application/Unread$Companion;->getTotalMessages(Lcom/discord/models/application/Unread$Marker;Ljava/util/List;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private final getTotalMessages(Lcom/discord/models/application/Unread$Marker;Ljava/util/List;)I
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/application/Unread$Marker;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelMessage;",
|
|
">;)I"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p2}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/application/Unread$Marker;->getMessageId()Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
invoke-static {p2}, Lj0/f;->asReversed(Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lj0/j/c;
|
|
|
|
new-instance v0, Lj0/j/c$a;
|
|
|
|
invoke-direct {v0, p2}, Lj0/j/c$a;-><init>(Lj0/j/c;)V
|
|
|
|
:goto_0
|
|
invoke-virtual {v0}, Lj0/j/c$a;->hasNext()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
invoke-virtual {v0}, Lj0/j/c$a;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lcom/discord/models/domain/ModelMessage;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelMessage;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/application/Unread$Marker;->getMessageId()Ljava/lang/Long;
|
|
|
|
move-result-object p2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long p2, v2, v4
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
:goto_1
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
:goto_2
|
|
return v1
|
|
.end method
|