.class public final Lcom/discord/widgets/channels/WidgetChannelTopic; .super Lcom/discord/app/AppFragment; .source "WidgetChannelTopic.kt" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; } .end annotation # static fields .field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty; # instance fields .field public final channelIcon$delegate:Lkotlin/properties/ReadOnlyProperty; .field public final channelName$delegate:Lkotlin/properties/ReadOnlyProperty; .field public final channelTopicAKA$delegate:Lkotlin/properties/ReadOnlyProperty; .field public final channelTopicTitle$delegate:Lkotlin/properties/ReadOnlyProperty; .field public final moreButton$delegate:Lkotlin/properties/ReadOnlyProperty; .field public final topicContainer$delegate:Lkotlin/properties/ReadOnlyProperty; .field public viewModel:Lcom/discord/widgets/channels/WidgetChannelTopicViewModel; # direct methods .method public static constructor ()V .locals 6 const/4 v0, 0x6 new-array v0, v0, [Lkotlin/reflect/KProperty; new-instance v1, Lw/u/b/u; const-class v2, Lcom/discord/widgets/channels/WidgetChannelTopic; invoke-static {v2}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b; move-result-object v2 const-string v3, "topicContainer" const-string v4, "getTopicContainer()Landroid/view/ViewGroup;" invoke-direct {v1, v2, v3, v4}, Lw/u/b/u;->(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V sget-object v2, Lw/u/b/w;->a:Lw/u/b/x; invoke-virtual {v2, v1}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d; const/4 v2, 0x0 aput-object v1, v0, v2 const/4 v1, 0x1 new-instance v2, Lw/u/b/u; const-class v3, Lcom/discord/widgets/channels/WidgetChannelTopic; invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b; move-result-object v3 const-string v4, "moreButton" const-string v5, "getMoreButton()Landroid/widget/ImageView;" invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;->(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V sget-object v3, Lw/u/b/w;->a:Lw/u/b/x; invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d; aput-object v2, v0, v1 const/4 v1, 0x2 new-instance v2, Lw/u/b/u; const-class v3, Lcom/discord/widgets/channels/WidgetChannelTopic; invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b; move-result-object v3 const-string v4, "channelTopicTitle" const-string v5, "getChannelTopicTitle()Landroid/widget/TextView;" invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;->(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V sget-object v3, Lw/u/b/w;->a:Lw/u/b/x; invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d; aput-object v2, v0, v1 const/4 v1, 0x3 new-instance v2, Lw/u/b/u; const-class v3, Lcom/discord/widgets/channels/WidgetChannelTopic; invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b; move-result-object v3 const-string v4, "channelTopicAKA" const-string v5, "getChannelTopicAKA()Landroid/widget/TextView;" invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;->(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V sget-object v3, Lw/u/b/w;->a:Lw/u/b/x; invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d; aput-object v2, v0, v1 const/4 v1, 0x4 new-instance v2, Lw/u/b/u; const-class v3, Lcom/discord/widgets/channels/WidgetChannelTopic; invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b; move-result-object v3 const-string v4, "channelName" const-string v5, "getChannelName()Landroid/widget/TextView;" invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;->(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V sget-object v3, Lw/u/b/w;->a:Lw/u/b/x; invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d; aput-object v2, v0, v1 const/4 v1, 0x5 new-instance v2, Lw/u/b/u; const-class v3, Lcom/discord/widgets/channels/WidgetChannelTopic; invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b; move-result-object v3 const-string v4, "channelIcon" const-string v5, "getChannelIcon()Landroid/widget/ImageView;" invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;->(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V sget-object v3, Lw/u/b/w;->a:Lw/u/b/x; invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d; aput-object v2, v0, v1 sput-object v0, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; return-void .end method .method public constructor ()V .locals 1 invoke-direct {p0}, Lcom/discord/app/AppFragment;->()V const v0, 0x7f0a019b invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty; move-result-object v0 iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->topicContainer$delegate:Lkotlin/properties/ReadOnlyProperty; const v0, 0x7f0a019c invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty; move-result-object v0 iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->moreButton$delegate:Lkotlin/properties/ReadOnlyProperty; const v0, 0x7f0a019e invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty; move-result-object v0 iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelTopicTitle$delegate:Lkotlin/properties/ReadOnlyProperty; const v0, 0x7f0a0199 invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty; move-result-object v0 iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelTopicAKA$delegate:Lkotlin/properties/ReadOnlyProperty; const v0, 0x7f0a019d invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty; move-result-object v0 iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelName$delegate:Lkotlin/properties/ReadOnlyProperty; const v0, 0x7f0a019a invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty; move-result-object v0 iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelIcon$delegate:Lkotlin/properties/ReadOnlyProperty; return-void .end method .method public static final synthetic access$configureUI(Lcom/discord/widgets/channels/WidgetChannelTopic;Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic;->configureUI(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState;)V return-void .end method .method private final configureUI(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState;)V .locals 11 instance-of v0, p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Uninitialized; const/4 v1, 0x0 const/4 v2, 0x1 const/16 v3, 0x8 if-eqz v0, :cond_1 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicAKA()Landroid/widget/TextView; move-result-object p1 invoke-virtual {p1, v3}, Landroid/view/View;->setVisibility(I)V invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View; move-result-object p1 if-eqz p1, :cond_0 invoke-static {p1, v1}, Landroidx/core/view/ViewKt;->setVisible(Landroid/view/View;Z)V :cond_0 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getMoreButton()Landroid/widget/ImageView; move-result-object p1 invoke-virtual {p1, v3}, Landroid/view/View;->setVisibility(I)V sget-object p1, Lcom/discord/utilities/channel/GuildChannelIconType$Text;->INSTANCE:Lcom/discord/utilities/channel/GuildChannelIconType$Text; invoke-static {p1}, Lcom/discord/utilities/channel/GuildChannelIconUtilsKt;->mapGuildChannelTypeToIcon(Lcom/discord/utilities/channel/GuildChannelIconType;)I move-result p1 invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic;->setChannelIcon(I)V new-instance p1, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; const/4 v5, 0x0 const/4 v6, 0x0 const/4 v7, 0x0 const/4 v8, 0x0 const/16 v9, 0xf const/4 v10, 0x0 move-object v4, p1 invoke-direct/range {v4 .. v10}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->(Ljava/lang/String;Ljava/lang/CharSequence;ILkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V goto/16 :goto_1 :cond_1 instance-of v0, p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild; if-eqz v0, :cond_5 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicAKA()Landroid/widget/TextView; move-result-object v0 invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View; move-result-object v0 if-eqz v0, :cond_2 invoke-static {v0, v2}, Landroidx/core/view/ViewKt;->setVisible(Landroid/view/View;Z)V :cond_2 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getMoreButton()Landroid/widget/ImageView; move-result-object v0 invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V move-object v0, p1 check-cast v0, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild; invoke-virtual {v0}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild;->getChannelIconType()Lcom/discord/utilities/channel/GuildChannelIconType; move-result-object v0 invoke-static {v0}, Lcom/discord/utilities/channel/GuildChannelIconUtilsKt;->mapGuildChannelTypeToIcon(Lcom/discord/utilities/channel/GuildChannelIconType;)I move-result v0 invoke-direct {p0, v0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->setChannelIcon(I)V instance-of v0, p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$DefaultTopic; if-eqz v0, :cond_3 check-cast p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$DefaultTopic; invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getRenderedTopicForDefaultTopic(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$DefaultTopic;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; move-result-object p1 goto :goto_1 :cond_3 if-eqz p1, :cond_4 check-cast p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic; invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getRenderedTopicForTopic(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; move-result-object p1 goto :goto_1 :cond_4 new-instance p1, Lw/l; const-string v0, "null cannot be cast to non-null type com.discord.widgets.channels.WidgetChannelTopicViewModel.ViewState.Guild.Topic" invoke-direct {p1, v0}, Lw/l;->(Ljava/lang/String;)V throw p1 :cond_5 instance-of v0, p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM; if-eqz v0, :cond_8 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicAKA()Landroid/widget/TextView; move-result-object v0 check-cast p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM; invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM;->getRecipientNicknames()Ljava/util/Set; move-result-object v4 invoke-interface {v4}, Ljava/util/Collection;->isEmpty()Z move-result v4 xor-int/2addr v4, v2 if-eqz v4, :cond_6 const/4 v4, 0x0 goto :goto_0 :cond_6 const/16 v4, 0x8 :goto_0 invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)V invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View; move-result-object v0 if-eqz v0, :cond_7 invoke-static {v0, v2}, Landroidx/core/view/ViewKt;->setVisible(Landroid/view/View;Z)V :cond_7 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getMoreButton()Landroid/widget/ImageView; move-result-object v0 invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V const v0, 0x7f08027c invoke-direct {p0, v0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->setChannelIcon(I)V invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getRenderedTopicForDM(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; move-result-object p1 goto :goto_1 :cond_8 instance-of v0, p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$GDM; if-eqz v0, :cond_d invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicAKA()Landroid/widget/TextView; move-result-object v0 invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getView()Landroid/view/View; move-result-object v0 if-eqz v0, :cond_9 invoke-static {v0, v2}, Landroidx/core/view/ViewKt;->setVisible(Landroid/view/View;Z)V :cond_9 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getMoreButton()Landroid/widget/ImageView; move-result-object v0 invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V check-cast p1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$GDM; invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$GDM;->getChannel()Lcom/discord/models/domain/ModelChannel; move-result-object v0 invoke-direct {p0, v0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->setChannelIconForGDM(Lcom/discord/models/domain/ModelChannel;)V invoke-direct {p0, p1}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getRenderedTopicForGDM(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$GDM;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; move-result-object p1 :goto_1 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getTopicContainer()Landroid/view/ViewGroup; move-result-object v0 invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->getTopic()Ljava/lang/CharSequence; move-result-object v4 if-eqz v4, :cond_b invoke-interface {v4}, Ljava/lang/CharSequence;->length()I move-result v4 if-lez v4, :cond_a const/4 v4, 0x1 goto :goto_2 :cond_a const/4 v4, 0x0 :goto_2 if-ne v4, v2, :cond_b goto :goto_3 :cond_b const/4 v2, 0x0 :goto_3 if-eqz v2, :cond_c goto :goto_4 :cond_c const/16 v1, 0x8 :goto_4 invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicTitle()Landroid/widget/TextView; move-result-object v0 invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->getAutoLinkMask()I move-result v1 invoke-virtual {v0, v1}, Landroid/widget/TextView;->setAutoLinkMask(I)V invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicTitle()Landroid/widget/TextView; move-result-object v0 invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->getTopic()Ljava/lang/CharSequence; move-result-object v1 invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelName()Landroid/widget/TextView; move-result-object v0 invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->getChannelName()Ljava/lang/String; move-result-object p1 invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V return-void :cond_d new-instance p1, Lw/g; invoke-direct {p1}, Lw/g;->()V throw p1 .end method .method private final getChannelIcon()Landroid/widget/ImageView; .locals 3 iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelIcon$delegate:Lkotlin/properties/ReadOnlyProperty; sget-object v1, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; const/4 v2, 0x5 aget-object v1, v1, v2 invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/widget/ImageView; return-object v0 .end method .method private final getChannelName()Landroid/widget/TextView; .locals 3 iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelName$delegate:Lkotlin/properties/ReadOnlyProperty; sget-object v1, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; const/4 v2, 0x4 aget-object v1, v1, v2 invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/widget/TextView; return-object v0 .end method .method private final getChannelTopicAKA()Landroid/widget/TextView; .locals 3 iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelTopicAKA$delegate:Lkotlin/properties/ReadOnlyProperty; sget-object v1, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; const/4 v2, 0x3 aget-object v1, v1, v2 invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/widget/TextView; return-object v0 .end method .method private final getChannelTopicTitle()Landroid/widget/TextView; .locals 3 iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->channelTopicTitle$delegate:Lkotlin/properties/ReadOnlyProperty; sget-object v1, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; const/4 v2, 0x2 aget-object v1, v1, v2 invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/widget/TextView; return-object v0 .end method .method private final getMoreButton()Landroid/widget/ImageView; .locals 3 iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->moreButton$delegate:Lkotlin/properties/ReadOnlyProperty; sget-object v1, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; const/4 v2, 0x1 aget-object v1, v1, v2 invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/widget/ImageView; return-object v0 .end method .method private final getRenderedTopicForDM(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; .locals 16 new-instance v7, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM;->getRecipientName()Ljava/lang/String; move-result-object v1 invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$DM;->getRecipientNicknames()Ljava/util/Set; move-result-object v8 const-string v9, "," const/4 v10, 0x0 const/4 v11, 0x0 const/4 v12, 0x0 const/4 v13, 0x0 const/4 v14, 0x0 const/16 v15, 0x3e invoke-static/range {v8 .. v15}, Lw/q/l;->joinToString$default(Ljava/lang/Iterable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;I)Ljava/lang/String; move-result-object v2 sget-object v4, Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForDM$1;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForDM$1; const/4 v3, 0x0 const/4 v5, 0x4 const/4 v6, 0x0 move-object v0, v7 invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->(Ljava/lang/String;Ljava/lang/CharSequence;ILkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V return-object v7 .end method .method private final getRenderedTopicForDefaultTopic(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$DefaultTopic;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; .locals 8 new-instance v7, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$DefaultTopic;->getChannelName()Ljava/lang/String; move-result-object v1 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicTitle()Landroid/widget/TextView; move-result-object p1 invoke-virtual {p1}, Landroid/widget/TextView;->getContext()Landroid/content/Context; move-result-object p1 const v0, 0x7f1203ac invoke-virtual {p1, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String; move-result-object v2 const/4 v3, 0x0 const/4 v4, 0x0 const/16 v5, 0x8 const/4 v6, 0x0 move-object v0, v7 invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->(Ljava/lang/String;Ljava/lang/CharSequence;ILkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V return-object v7 .end method .method private final getRenderedTopicForGDM(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$GDM;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; .locals 8 new-instance v7, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; invoke-virtual {p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$GDM;->getChannelName()Ljava/lang/String; move-result-object v1 sget-object v4, Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForGDM$1;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForGDM$1; const/4 v2, 0x0 const/4 v3, 0x0 const/4 v5, 0x4 const/4 v6, 0x0 move-object v0, v7 invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->(Ljava/lang/String;Ljava/lang/CharSequence;ILkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V return-object v7 .end method .method private final getRenderedTopicForTopic(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;)Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; .locals 19 new-instance v15, Lcom/discord/utilities/textprocessing/MessageRenderContext; invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelTopicTitle()Landroid/widget/TextView; move-result-object v0 invoke-virtual {v0}, Landroid/widget/TextView;->getContext()Landroid/content/Context; move-result-object v1 const-string v0, "channelTopicTitle.context" invoke-static {v1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->getAllowAnimatedEmojis()Z move-result v4 invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->getUserNames()Ljava/util/Map; move-result-object v5 invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->getChannelNames()Ljava/util/Map; move-result-object v6 invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->getRoles()Ljava/util/Map; move-result-object v7 sget-object v10, Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForTopic$renderContext$1;->INSTANCE:Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForTopic$renderContext$1; new-instance v13, Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForTopic$renderContext$2; move-object/from16 v14, p0 iget-object v0, v14, Lcom/discord/widgets/channels/WidgetChannelTopic;->viewModel:Lcom/discord/widgets/channels/WidgetChannelTopicViewModel; if-eqz v0, :cond_2 invoke-direct {v13, v0}, Lcom/discord/widgets/channels/WidgetChannelTopic$getRenderedTopicForTopic$renderContext$2;->(Lcom/discord/widgets/channels/WidgetChannelTopicViewModel;)V const/16 v16, 0x6c0 const/16 v17, 0x0 const-wide/16 v2, 0x0 const/4 v8, 0x0 const/4 v9, 0x0 const/4 v11, 0x0 const/4 v12, 0x0 move-object v0, v15 move/from16 v14, v16 move-object/from16 v18, v15 move-object/from16 v15, v17 invoke-direct/range {v0 .. v15}, Lcom/discord/utilities/textprocessing/MessageRenderContext;->(Landroid/content/Context;JZLjava/util/Map;Ljava/util/Map;Ljava/util/Map;ILkotlin/jvm/functions/Function3;Lkotlin/jvm/functions/Function1;IILkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->getAst()Ljava/util/List; move-result-object v0 move-object/from16 v1, v18 invoke-static {v0, v1}, Lcom/discord/utilities/textprocessing/AstRenderer;->render(Ljava/util/Collection;Ljava/lang/Object;)Lcom/facebook/drawee/span/DraweeSpanStringBuilder; move-result-object v4 invoke-virtual {v4}, Landroid/text/SpannableStringBuilder;->length()I move-result v0 const/16 v1, 0xc8 if-gt v0, v1, :cond_1 invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->isLinkifyConflicting()Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 :cond_0 const/16 v0, 0xf const/16 v5, 0xf goto :goto_1 :cond_1 :goto_0 const/4 v0, 0x0 const/4 v5, 0x0 :goto_1 new-instance v0, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic; invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$ViewState$Guild$Topic;->getChannelName()Ljava/lang/String; move-result-object v3 const/4 v6, 0x0 const/16 v7, 0x8 const/4 v8, 0x0 move-object v2, v0 invoke-direct/range {v2 .. v8}, Lcom/discord/widgets/channels/WidgetChannelTopic$RenderedTopic;->(Ljava/lang/String;Ljava/lang/CharSequence;ILkotlin/jvm/functions/Function0;ILkotlin/jvm/internal/DefaultConstructorMarker;)V return-object v0 :cond_2 const-string v0, "viewModel" invoke-static {v0}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V const/4 v0, 0x0 throw v0 .end method .method private final getTopicContainer()Landroid/view/ViewGroup; .locals 3 iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->topicContainer$delegate:Lkotlin/properties/ReadOnlyProperty; sget-object v1, Lcom/discord/widgets/channels/WidgetChannelTopic;->$$delegatedProperties:[Lkotlin/reflect/KProperty; const/4 v2, 0x0 aget-object v1, v1, v2 invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/view/ViewGroup; return-object v0 .end method .method private final setChannelIcon(I)V .locals 4 .param p1 # I .annotation build Landroidx/annotation/DrawableRes; .end annotation .end param invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelIcon()Landroid/widget/ImageView; move-result-object v0 invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageResource(I)V invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelIcon()Landroid/widget/ImageView; move-result-object p1 invoke-virtual {p1}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams; move-result-object p1 if-eqz p1, :cond_0 check-cast p1, Landroid/view/ViewGroup$MarginLayoutParams; iget v0, p1, Landroid/view/ViewGroup$MarginLayoutParams;->leftMargin:I iget v1, p1, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelIcon()Landroid/widget/ImageView; move-result-object v2 invoke-virtual {v2}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources; move-result-object v2 const v3, 0x7f0701c8 invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I move-result v2 iget v3, p1, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I invoke-virtual {p1, v0, v1, v2, v3}, Landroid/view/ViewGroup$MarginLayoutParams;->setMargins(IIII)V return-void :cond_0 new-instance p1, Lw/l; const-string v0, "null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams" invoke-direct {p1, v0}, Lw/l;->(Ljava/lang/String;)V throw p1 .end method .method private final setChannelIconForGDM(Lcom/discord/models/domain/ModelChannel;)V .locals 7 invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelIcon()Landroid/widget/ImageView; move-result-object v0 invoke-static {p1}, Lcom/discord/utilities/icon/IconUtils;->getForChannel(Lcom/discord/models/domain/ModelChannel;)Ljava/lang/String; move-result-object v1 const v2, 0x7f070058 const/4 v3, 0x0 const/4 v4, 0x0 const/16 v5, 0x18 const/4 v6, 0x0 invoke-static/range {v0 .. v6}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelIcon()Landroid/widget/ImageView; move-result-object p1 invoke-virtual {p1}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams; move-result-object p1 if-eqz p1, :cond_0 check-cast p1, Landroid/view/ViewGroup$MarginLayoutParams; iget v0, p1, Landroid/view/ViewGroup$MarginLayoutParams;->leftMargin:I iget v1, p1, Landroid/view/ViewGroup$MarginLayoutParams;->topMargin:I invoke-direct {p0}, Lcom/discord/widgets/channels/WidgetChannelTopic;->getChannelIcon()Landroid/widget/ImageView; move-result-object v2 invoke-virtual {v2}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources; move-result-object v2 const v3, 0x7f0701c7 invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I move-result v2 iget v3, p1, Landroid/view/ViewGroup$MarginLayoutParams;->bottomMargin:I invoke-virtual {p1, v0, v1, v2, v3}, Landroid/view/ViewGroup$MarginLayoutParams;->setMargins(IIII)V return-void :cond_0 new-instance p1, Lw/l; const-string v0, "null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams" invoke-direct {p1, v0}, Lw/l;->(Ljava/lang/String;)V throw p1 .end method # virtual methods .method public getContentViewResId()I .locals 1 const v0, 0x7f0d0142 return v0 .end method .method public onViewBoundOrOnResume()V .locals 11 invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V new-instance v9, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$Factory; const/4 v1, 0x0 const/4 v2, 0x0 const/4 v3, 0x0 const/4 v4, 0x0 const/4 v5, 0x0 const/4 v6, 0x0 const/16 v7, 0x3f const/4 v8, 0x0 move-object v0, v9 invoke-direct/range {v0 .. v8}, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel$Factory;->(Lcom/discord/stores/StoreChannelsSelected;Lcom/discord/stores/StoreChannels;Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreNavigation;ILkotlin/jvm/internal/DefaultConstructorMarker;)V invoke-static {p0, v9}, Landroidx/lifecycle/ViewModelProviders;->of(Landroidx/fragment/app/Fragment;Landroidx/lifecycle/ViewModelProvider$Factory;)Landroidx/lifecycle/ViewModelProvider; move-result-object v0 const-class v1, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel; invoke-virtual {v0, v1}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel; move-result-object v0 const-string v1, "ViewModelProviders.of(th\u2026picViewModel::class.java)" invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V check-cast v0, Lcom/discord/widgets/channels/WidgetChannelTopicViewModel; iput-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->viewModel:Lcom/discord/widgets/channels/WidgetChannelTopicViewModel; iget-object v0, p0, Lcom/discord/widgets/channels/WidgetChannelTopic;->viewModel:Lcom/discord/widgets/channels/WidgetChannelTopicViewModel; if-eqz v0, :cond_0 invoke-virtual {v0}, Le/a/b/c0;->observeViewState()Lrx/Observable; move-result-object v0 invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable; move-result-object v0 const-string v1, "viewModel\n .obser\u2026 .distinctUntilChanged()" invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-static {v0, p0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->bindToComponentLifecycle(Lrx/Observable;Lcom/discord/app/AppComponent;)Lrx/Observable; move-result-object v2 const-class v3, Lcom/discord/widgets/channels/WidgetChannelTopic; const/4 v4, 0x0 const/4 v5, 0x0 const/4 v6, 0x0 const/4 v7, 0x0 new-instance v8, Lcom/discord/widgets/channels/WidgetChannelTopic$onViewBoundOrOnResume$1; invoke-direct {v8, p0}, Lcom/discord/widgets/channels/WidgetChannelTopic$onViewBoundOrOnResume$1;->(Lcom/discord/widgets/channels/WidgetChannelTopic;)V const/16 v9, 0x1e const/4 v10, 0x0 invoke-static/range {v2 .. v10}, 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 v0, "viewModel" invoke-static {v0}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V const/4 v0, 0x0 throw v0 .end method