1316 lines
40 KiB
Smali
1316 lines
40 KiB
Smali
.class public final Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;
|
|
.super Lcom/discord/widgets/guilds/list/GuildListViewHolder;
|
|
.source "GuildListViewHolder.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/widgets/guilds/list/GuildsDragAndDropCallback$DraggableViewHolder;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/guilds/list/GuildListViewHolder;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "GuildViewHolder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$Companion;
|
|
|
|
.field public static final DEFAULT_AVATAR_TEXT_SIZE_SP:F = 14.0f
|
|
|
|
.field public static final TARGETED_AVATAR_TEXT_SIZE_DP:F = 8.0f
|
|
|
|
|
|
# instance fields
|
|
.field public data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
.field public final defaultAvatarSize:I
|
|
|
|
.field public final imageRequestSize:I
|
|
|
|
.field public isDragging:Z
|
|
|
|
.field public final itemApplicationStream:Landroid/view/View;
|
|
|
|
.field public final itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
.field public final itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
.field public final itemAvatarText:Landroid/widget/TextView;
|
|
|
|
.field public final itemMentions:Landroid/widget/TextView;
|
|
|
|
.field public final itemSelected:Landroid/view/View;
|
|
|
|
.field public final itemUnread:Landroid/view/View;
|
|
|
|
.field public final itemVoice:Landroid/view/View;
|
|
|
|
.field public final onClicked:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final onLongPressed:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final overlayColor:I
|
|
|
|
.field public final overlayColorInFolder:I
|
|
|
|
.field public final targetedAvatarMargin:I
|
|
|
|
.field public final targetedAvatarSize:I
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->Companion:Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/view/View;IILkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 1
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/view/View;",
|
|
"II",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;",
|
|
"Lkotlin/Unit;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;-><init>(Landroid/view/View;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->overlayColor:I
|
|
|
|
iput p3, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->overlayColorInFolder:I
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->onClicked:Lkotlin/jvm/functions/Function1;
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->onLongPressed:Lkotlin/jvm/functions/Function1;
|
|
|
|
const p2, 0x7f0a03c4
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.\u2026.guilds_item_avatar_wrap)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroid/view/ViewGroup;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const p2, 0x7f0a03c2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.id.guilds_item_avatar)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
const p2, 0x7f0a03c3
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.\u2026.guilds_item_avatar_text)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroid/widget/TextView;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f0a03ca
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.id.guilds_item_mentions)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Landroid/widget/TextView;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemMentions:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f0a03d0
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.id.guilds_item_voice)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemVoice:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03c1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.\u2026_item_application_stream)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemApplicationStream:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03cf
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.id.guilds_item_unread)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemUnread:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03ce
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "itemView.findViewById(R.id.guilds_item_selected)"
|
|
|
|
invoke-static {p2, p3}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemSelected:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p2
|
|
|
|
const p3, 0x7f07005b
|
|
|
|
invoke-virtual {p2, p3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->defaultAvatarSize:I
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p2
|
|
|
|
const p3, 0x7f0700c3
|
|
|
|
invoke-virtual {p2, p3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result p2
|
|
|
|
iput p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->targetedAvatarSize:I
|
|
|
|
invoke-virtual {p1}, Landroid/view/View;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
const p2, 0x7f0700c2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->targetedAvatarMargin:I
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/ViewGroup;->setClipToOutline(Z)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {p1}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object p1
|
|
|
|
iget p1, p1, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->imageRequestSize:I
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "onLongPressed"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "onClicked"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "itemView"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOnClicked$p(Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;)Lkotlin/jvm/functions/Function1;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->onClicked:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getOnLongPressed$p(Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;)Lkotlin/jvm/functions/Function1;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->onLongPressed:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final configureDraggingAlpha()V
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->isDragging:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const/high16 v1, 0x3f000000 # 0.5f
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setAlpha(F)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const/high16 v1, 0x3f800000 # 1.0f
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setAlpha(F)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureGuildIconBackground(ZZZ)V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/ImageView;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f0700c5
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v0
|
|
|
|
int-to-float v0, v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
xor-int/lit8 v2, p1, 0x1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iget v3, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->overlayColorInFolder:I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget v3, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->overlayColor:I
|
|
|
|
:goto_0
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v0, v2, v3}, Lcom/discord/utilities/images/MGImages;->setCornerRadius(Landroid/widget/ImageView;FZLjava/lang/Integer;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const p2, 0x7f080169
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/ViewGroup;->setBackgroundResource(I)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const p2, 0x7f08011b
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/ViewGroup;->setBackgroundResource(I)V
|
|
|
|
:goto_1
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/ViewGroup;->setBackgroundTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
if-eqz p1, :cond_3
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const p2, 0x7f080166
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/ViewGroup;->setBackgroundResource(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/ViewGroup;->setBackgroundTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
const p3, 0x7f08010f
|
|
|
|
invoke-virtual {p1, p3}, Landroid/view/ViewGroup;->setBackgroundResource(I)V
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
const p1, 0x7f0400ea
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const p1, 0x7f0400e9
|
|
|
|
:goto_2
|
|
iget-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
invoke-static {p2, p1}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/view/View;I)I
|
|
|
|
move-result p1
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarContainer:Landroid/view/ViewGroup;
|
|
|
|
invoke-static {p1}, Landroid/content/res/ColorStateList;->valueOf(I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/view/ViewGroup;->setBackgroundTintList(Landroid/content/res/ColorStateList;)V
|
|
|
|
:goto_3
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureGuildIconImage(Lcom/discord/models/domain/ModelGuild;Z)V
|
|
.locals 18
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->canHaveAnimatedServerIcon()Z
|
|
|
|
move-result v1
|
|
|
|
const-string v2, "itemAvatar.hierarchy"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const-string v5, "a"
|
|
|
|
invoke-static {v1, v5, v3, v4}, Lt/a0/n;->startsWith$default(Ljava/lang/String;Ljava/lang/String;ZI)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-ne v1, v4, :cond_0
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v1}, Lcom/facebook/drawee/view/DraweeView;->getHierarchy()Le/j/g/h/b;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v4}, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;->b(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v1}, Lcom/facebook/drawee/view/DraweeView;->getHierarchy()Le/j/g/h/b;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;
|
|
|
|
invoke-static {v1, v2}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, v3}, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;->e(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v1}, Lcom/facebook/drawee/view/DraweeView;->getHierarchy()Le/j/g/h/b;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;
|
|
|
|
const v4, 0x7f080079
|
|
|
|
invoke-virtual {v1, v4}, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;->f(I)V
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v1}, Lcom/facebook/drawee/view/DraweeView;->getHierarchy()Le/j/g/h/b;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;
|
|
|
|
invoke-static {v1, v2}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/16 v2, 0x32
|
|
|
|
invoke-virtual {v1, v2}, Lcom/facebook/drawee/generic/GenericDraweeHierarchy;->e(I)V
|
|
|
|
:goto_0
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->hasIcon()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/16 v8, 0xa
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object/from16 v4, p1
|
|
|
|
move/from16 v6, p2
|
|
|
|
invoke-static/range {v4 .. v9}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "?size="
|
|
|
|
invoke-static {v2}, Le/e/b/a/a;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
iget v4, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->imageRequestSize:I
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
iget-object v9, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
iget v12, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->imageRequestSize:I
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x70
|
|
|
|
const/16 v17, 0x0
|
|
|
|
move v11, v12
|
|
|
|
invoke-static/range {v9 .. v17}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v1, v0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
const/16 v2, 0x8
|
|
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureGuildIconPositioning(Z)V
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "null cannot be cast to non-null type android.widget.FrameLayout.LayoutParams"
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
check-cast v0, Landroid/widget/FrameLayout$LayoutParams;
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/ImageView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
check-cast v2, Landroid/widget/FrameLayout$LayoutParams;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget v3, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->targetedAvatarMargin:I
|
|
|
|
invoke-virtual {v0, v3, v3, v1, v1}, Landroid/widget/FrameLayout$LayoutParams;->setMargins(IIII)V
|
|
|
|
iget v3, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->targetedAvatarSize:I
|
|
|
|
iput v3, v0, Landroid/widget/FrameLayout$LayoutParams;->height:I
|
|
|
|
iput v3, v0, Landroid/widget/FrameLayout$LayoutParams;->width:I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v0, v1, v1, v1, v1}, Landroid/widget/FrameLayout$LayoutParams;->setMargins(IIII)V
|
|
|
|
iget v3, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->defaultAvatarSize:I
|
|
|
|
iput v3, v0, Landroid/widget/FrameLayout$LayoutParams;->height:I
|
|
|
|
iput v3, v0, Landroid/widget/FrameLayout$LayoutParams;->width:I
|
|
|
|
:goto_0
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/high16 v4, 0x41000000 # 8.0f
|
|
|
|
invoke-virtual {p1, v3, v4}, Landroid/widget/TextView;->setTextSize(IF)V
|
|
|
|
iget p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->targetedAvatarMargin:I
|
|
|
|
invoke-virtual {v2, p1, p1, v1, v1}, Landroid/widget/FrameLayout$LayoutParams;->setMargins(IIII)V
|
|
|
|
iget p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->targetedAvatarSize:I
|
|
|
|
iput p1, v2, Landroid/widget/FrameLayout$LayoutParams;->height:I
|
|
|
|
iput p1, v2, Landroid/widget/FrameLayout$LayoutParams;->width:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
const/4 v3, 0x2
|
|
|
|
const/high16 v4, 0x41600000 # 14.0f
|
|
|
|
invoke-virtual {p1, v3, v4}, Landroid/widget/TextView;->setTextSize(IF)V
|
|
|
|
invoke-virtual {v2, v1, v1, v1, v1}, Landroid/widget/FrameLayout$LayoutParams;->setMargins(IIII)V
|
|
|
|
const/4 p1, -0x1
|
|
|
|
iput p1, v2, Landroid/widget/FrameLayout$LayoutParams;->height:I
|
|
|
|
iput p1, v2, Landroid/widget/FrameLayout$LayoutParams;->width:I
|
|
|
|
:goto_1
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatar:Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1, v2}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
new-instance p1, Lt/l;
|
|
|
|
invoke-direct {p1, v1}, Lt/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
new-instance p1, Lt/l;
|
|
|
|
invoke-direct {p1, v1}, Lt/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public canDrag()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isLurkingGuild()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public final configure(Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;)V
|
|
.locals 10
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_13
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isSelected()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isSelected()Z
|
|
|
|
move-result v5
|
|
|
|
if-eq v2, v5, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 v2, 0x1
|
|
|
|
:goto_2
|
|
if-eqz v1, :cond_4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v1, v5}, Lt/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/2addr v1, v3
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
:goto_3
|
|
const/4 v1, 0x1
|
|
|
|
:goto_4
|
|
iget-object v5, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isTargetedForFolderCreation()Z
|
|
|
|
move-result v5
|
|
|
|
invoke-static {v5}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v5
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
move-object v5, v0
|
|
|
|
:goto_5
|
|
if-eqz v5, :cond_7
|
|
|
|
iget-object v5, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isTargetedForFolderCreation()Z
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isTargetedForFolderCreation()Z
|
|
|
|
move-result v6
|
|
|
|
if-eq v5, v6, :cond_7
|
|
|
|
:cond_6
|
|
const/4 v5, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
const/4 v5, 0x0
|
|
|
|
:goto_6
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
iget-object v6, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v7, "itemView"
|
|
|
|
invoke-static {v6, v7}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6, v4}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v6, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
new-instance v7, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$configure$1;
|
|
|
|
invoke-direct {v7, p0, p1}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$configure$1;-><init>(Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;)V
|
|
|
|
invoke-virtual {v6, v7}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v6, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
new-instance v7, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$configure$2;
|
|
|
|
invoke-direct {v7, p0, p1}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder$configure$2;-><init>(Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;)V
|
|
|
|
invoke-virtual {v6, v7}, Landroid/view/View;->setOnLongClickListener(Landroid/view/View$OnLongClickListener;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz v6, :cond_9
|
|
|
|
invoke-interface {v6}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v6
|
|
|
|
if-lez v6, :cond_8
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_7
|
|
|
|
:cond_8
|
|
const/4 v6, 0x0
|
|
|
|
:goto_7
|
|
if-ne v6, v3, :cond_9
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v7, "ICON_UNSET"
|
|
|
|
invoke-static {v6, v7}, Lt/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
xor-int/2addr v6, v3
|
|
|
|
if-eqz v6, :cond_9
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_8
|
|
|
|
:cond_9
|
|
const/4 v6, 0x0
|
|
|
|
:goto_8
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isSelected()Z
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getFolderId()Ljava/lang/Long;
|
|
|
|
move-result-object v8
|
|
|
|
if-nez v8, :cond_b
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isTargetedForFolderCreation()Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_a
|
|
|
|
goto :goto_9
|
|
|
|
:cond_a
|
|
const/4 v8, 0x0
|
|
|
|
goto :goto_a
|
|
|
|
:cond_b
|
|
:goto_9
|
|
const/4 v8, 0x1
|
|
|
|
:goto_a
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v9}, Lcom/discord/models/domain/ModelGuild;->hasIcon()Z
|
|
|
|
move-result v9
|
|
|
|
invoke-direct {p0, v7, v8, v9}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->configureGuildIconBackground(ZZZ)V
|
|
|
|
if-eqz v5, :cond_c
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isTargetedForFolderCreation()Z
|
|
|
|
move-result v5
|
|
|
|
invoke-direct {p0, v5}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->configureGuildIconPositioning(Z)V
|
|
|
|
:cond_c
|
|
if-nez v1, :cond_d
|
|
|
|
if-eqz v2, :cond_e
|
|
|
|
:cond_d
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isSelected()Z
|
|
|
|
move-result v5
|
|
|
|
invoke-direct {p0, v1, v5}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->configureGuildIconImage(Lcom/discord/models/domain/ModelGuild;Z)V
|
|
|
|
:cond_e
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->configureDraggingAlpha()V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
if-eqz v6, :cond_f
|
|
|
|
move-object v5, v0
|
|
|
|
goto :goto_b
|
|
|
|
:cond_f
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelGuild;->getShortName()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
:goto_b
|
|
invoke-virtual {v1, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
if-eqz v2, :cond_11
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isSelected()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_10
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/TextView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f060266
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_c
|
|
|
|
:cond_10
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/TextView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f040101
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v1
|
|
|
|
:goto_c
|
|
iget-object v2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemAvatarText:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setTextColor(I)V
|
|
|
|
:cond_11
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemMentions:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getMentionCount()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p0, v1, v2}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;->configureMentionsCount(Landroid/widget/TextView;I)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemVoice:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isConnectedToVoice()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v5, 0x2
|
|
|
|
invoke-static {v1, v2, v4, v5, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemApplicationStream:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isConnectedToVoice()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_12
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getHasOngoingApplicationStream()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_12
|
|
|
|
goto :goto_d
|
|
|
|
:cond_12
|
|
const/4 v3, 0x0
|
|
|
|
:goto_d
|
|
invoke-static {v1, v3, v4, v5, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemUnread:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isUnread()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v1, v2, v4, v5, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->itemSelected:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isSelected()Z
|
|
|
|
move-result p1
|
|
|
|
invoke-static {v1, p1, v4, v5, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_13
|
|
const-string p1, "data"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getFolderId()Ljava/lang/Long;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->getFolderId()Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final isLastGuildInFolder()Ljava/lang/Boolean;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isLastGuildInFolder()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final isTargetedForFolderCreation()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/list/GuildListItem$GuildItem;->isTargetedForFolderCreation()Z
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public onDragEnded(Z)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;->onDragEnded(Z)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const-string v0, "itemView"
|
|
|
|
invoke-static {p1, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->isDragging:Z
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->configureDraggingAlpha()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDragStarted()V
|
|
.locals 1
|
|
|
|
invoke-super {p0}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;->onDragStarted()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->isDragging:Z
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$GuildViewHolder;->configureDraggingAlpha()V
|
|
|
|
return-void
|
|
.end method
|