.class public final Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion; .super Ljava/lang/Object; .source "WidgetChannelListUnreads.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Companion" .end annotation # direct methods .method public constructor ()V .locals 0 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public synthetic constructor (Lkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 invoke-direct {p0}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion;->()V return-void .end method .method private final findIndicator(Ljava/util/List;Lkotlin/ranges/IntProgression;ZZ)Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator; .locals 7 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Ljava/lang/Object;", ">;", "Lkotlin/ranges/IntProgression;", "ZZ)", "Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;" } .end annotation invoke-virtual {p2}, Lkotlin/ranges/IntProgression;->getFirst()I move-result v0 invoke-virtual {p2}, Lkotlin/ranges/IntProgression;->getLast()I move-result v1 invoke-virtual {p2}, Lkotlin/ranges/IntProgression;->getStep()I move-result p2 const/4 v2, 0x0 const/4 v3, -0x1 if-ltz p2, :cond_0 if-gt v0, v1, :cond_4 goto :goto_0 :cond_0 if-lt v0, v1, :cond_4 :goto_0 const/4 v4, -0x1 :goto_1 invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object; move-result-object v5 instance-of v6, v5, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem; if-nez v6, :cond_1 move-object v5, v2 :cond_1 check-cast v5, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem; if-eqz v5, :cond_3 invoke-interface {v5}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem;->getMentionCount()I move-result v6 if-lez v6, :cond_2 new-instance p1, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator; const/4 p2, 0x0 invoke-direct {p1, p2, v0}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;->(II)V return-object p1 :cond_2 if-eqz p4, :cond_3 if-nez p3, :cond_3 if-ne v4, v3, :cond_3 invoke-interface {v5}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem;->isUnread()Z move-result v5 if-eqz v5, :cond_3 move v4, v0 :cond_3 if-eq v0, v1, :cond_5 add-int/2addr v0, p2 goto :goto_1 :cond_4 const/4 v4, -0x1 :cond_5 if-eq v4, v3, :cond_6 new-instance v2, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator; const/4 p1, 0x1 invoke-direct {v2, p1, v4}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;->(II)V :cond_6 return-object v2 .end method .method public static synthetic get$default(Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion;Lkotlin/ranges/IntRange;Ljava/util/List;ZILjava/lang/Object;)Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model; .locals 0 and-int/lit8 p4, p4, 0x4 if-eqz p4, :cond_0 const/4 p3, 0x1 :cond_0 invoke-virtual {p0, p1, p2, p3}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion;->get(Lkotlin/ranges/IntRange;Ljava/util/List;Z)Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model; move-result-object p0 return-object p0 .end method .method private final hasUnread(Ljava/util/List;Lkotlin/ranges/IntRange;)Z .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List<", "+", "Ljava/lang/Object;", ">;", "Lkotlin/ranges/IntRange;", ")Z" } .end annotation invoke-static {p1, p2}, Lw/q/l;->slice(Ljava/util/List;Lkotlin/ranges/IntRange;)Ljava/util/List; move-result-object p1 instance-of p2, p1, Ljava/util/Collection; const/4 v0, 0x1 const/4 v1, 0x0 if-eqz p2, :cond_0 invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z move-result p2 if-eqz p2, :cond_0 goto :goto_1 :cond_0 invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object p1 :cond_1 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result p2 if-eqz p2, :cond_4 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object p2 instance-of v2, p2, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem; if-nez v2, :cond_2 const/4 p2, 0x0 :cond_2 check-cast p2, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem; if-eqz p2, :cond_3 invoke-interface {p2}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$UnreadItem;->isUnread()Z move-result p2 if-ne p2, v0, :cond_3 const/4 p2, 0x1 goto :goto_0 :cond_3 const/4 p2, 0x0 :goto_0 if-eqz p2, :cond_1 const/4 v1, 0x1 :cond_4 :goto_1 return v1 .end method # virtual methods .method public final get(Lkotlin/ranges/IntRange;Ljava/util/List;Z)Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model; .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lkotlin/ranges/IntRange;", "Ljava/util/List<", "+", "Ljava/lang/Object;", ">;Z)", "Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model;" } .end annotation const/4 v0, 0x0 if-eqz p1, :cond_2 if-eqz p2, :cond_1 const/4 v1, 0x1 const/4 v2, 0x0 if-eqz p3, :cond_0 :try_start_0 invoke-direct {p0, p2, p1}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion;->hasUnread(Ljava/util/List;Lkotlin/ranges/IntRange;)Z move-result v3 if-eqz v3, :cond_0 const/4 v3, 0x1 goto :goto_0 :cond_0 const/4 v3, 0x0 :goto_0 invoke-virtual {p1}, Lkotlin/ranges/IntProgression;->getFirst()I move-result v4 invoke-static {v2, v4}, Lw/x/f;->until(II)Lkotlin/ranges/IntRange; move-result-object v2 invoke-direct {p0, p2, v2, v3, p3}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion;->findIndicator(Ljava/util/List;Lkotlin/ranges/IntProgression;ZZ)Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator; move-result-object v2 invoke-static {p2}, Le/k/a/c/e/p/g;->getLastIndex(Ljava/util/List;)I move-result v4 invoke-virtual {p1}, Lkotlin/ranges/IntProgression;->getLast()I move-result p1 add-int/2addr p1, v1 invoke-static {v4, p1}, Lw/x/f;->downTo(II)Lkotlin/ranges/IntProgression; move-result-object p1 invoke-direct {p0, p2, p1, v3, p3}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Companion;->findIndicator(Ljava/util/List;Lkotlin/ranges/IntProgression;ZZ)Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator; move-result-object p1 new-instance p2, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model; invoke-direct {p2, v2, p1}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model;->(Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;)V :try_end_0 .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_1 :catch_0 new-instance p2, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model; const/4 p1, 0x3 invoke-direct {p2, v0, v0, p1, v0}, Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model;->(Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;Lcom/discord/widgets/channels/list/WidgetChannelListUnreads$Model$Indicator;ILkotlin/jvm/internal/DefaultConstructorMarker;)V :goto_1 return-object p2 :cond_1 const-string p1, "items" invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V throw v0 :cond_2 const-string p1, "visibleRange" invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V throw v0 .end method