501 lines
15 KiB
Smali
501 lines
15 KiB
Smali
.class public final Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;
|
|
.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 = "FolderViewHolder"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public color:Ljava/lang/Integer;
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public data:Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;
|
|
|
|
.field public isDragging:Z
|
|
|
|
.field public final itemFolder:Lcom/discord/views/ServerFolderView;
|
|
|
|
.field public final itemFolderContainer:Landroid/view/View;
|
|
|
|
.field public final itemHighlight:Landroid/view/View;
|
|
|
|
.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 numChildren:I
|
|
|
|
.field public final onClicked:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/view/View;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/view/View;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;-><init>(Landroid/view/View;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->onClicked:Lkotlin/jvm/functions/Function1;
|
|
|
|
const p2, 0x7f0a03af
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "view.findViewById(R.id.g\u2026ds_item_folder_container)"
|
|
|
|
invoke-static {p2, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemFolderContainer:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03ae
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "view.findViewById(R.id.guilds_item_folder)"
|
|
|
|
invoke-static {p2, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p2, Lcom/discord/views/ServerFolderView;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemFolder:Lcom/discord/views/ServerFolderView;
|
|
|
|
const p2, 0x7f0a03b5
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "view.findViewById(R.id.guilds_item_selected)"
|
|
|
|
invoke-static {p2, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemSelected:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03b6
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "view.findViewById(R.id.guilds_item_unread)"
|
|
|
|
invoke-static {p2, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemUnread:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03b2
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "view.findViewById(R.id.guilds_item_mentions)"
|
|
|
|
invoke-static {p2, v0}, 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$FolderViewHolder;->itemMentions:Landroid/widget/TextView;
|
|
|
|
const p2, 0x7f0a03b7
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "view.findViewById(R.id.guilds_item_voice)"
|
|
|
|
invoke-static {p2, v0}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemVoice:Landroid/view/View;
|
|
|
|
const p2, 0x7f0a03b1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "view.findViewById(R.id.guilds_item_highlight)"
|
|
|
|
invoke-static {p1, p2}, Lt/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemHighlight:Landroid/view/View;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemFolderContainer:Landroid/view/View;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Landroid/view/View;->setClipToOutline(Z)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "onClicked"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "view"
|
|
|
|
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$FolderViewHolder;)Lkotlin/jvm/functions/Function1;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->onClicked:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public canDrag()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()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$FolderItem;)V
|
|
.locals 10
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->data:Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getColor()Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
const-wide v2, 0xff000000L
|
|
|
|
int-to-long v4, v1
|
|
|
|
add-long/2addr v4, v2
|
|
|
|
long-to-int v1, v4
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
iput-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->color:Ljava/lang/Integer;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getGuilds()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
iput v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->numChildren:I
|
|
|
|
iget-object v1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
new-instance v3, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder$configure$2;
|
|
|
|
invoke-direct {v3, p0, p1}, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder$configure$2;-><init>(Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;)V
|
|
|
|
invoke-virtual {v1, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v4, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemFolder:Lcom/discord/views/ServerFolderView;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getFolderId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getGuilds()Ljava/util/List;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getColor()Ljava/lang/Integer;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual/range {v4 .. v9}, Lcom/discord/views/ServerFolderView;->a(JZLjava/util/List;Ljava/lang/Integer;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemSelected:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isAnyGuildSelected()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v3, 0x0
|
|
|
|
:goto_2
|
|
const/4 v5, 0x2
|
|
|
|
invoke-static {v1, v3, v2, 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$FolderViewHolder;->itemUnread:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isUnread()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
const/4 v3, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v3, 0x0
|
|
|
|
:goto_3
|
|
invoke-static {v1, v3, v2, 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$FolderViewHolder;->itemVoice:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isAnyGuildConnectedToVoice()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
const/4 v4, 0x0
|
|
|
|
:goto_4
|
|
invoke-static {v1, v4, v2, 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$FolderViewHolder;->itemHighlight:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isTargetedForFolderAddition()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v1, v3, v2, v5, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setVisibilityBy$default(Landroid/view/View;ZIILjava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemMentions:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getMentionCount()I
|
|
|
|
move-result v2
|
|
|
|
:goto_5
|
|
invoke-virtual {p0, v0, v2}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;->configureMentionsCount(Landroid/widget/TextView;I)V
|
|
|
|
return-void
|
|
|
|
:cond_6
|
|
const-string p1, "data"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getColor()Ljava/lang/Integer;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->color:Ljava/lang/Integer;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getNumChildren()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->numChildren:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onDragEnded(Z)V
|
|
.locals 1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->isDragging:Z
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemFolder:Lcom/discord/views/ServerFolderView;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/LinearLayout;->setBackground(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onDragStarted()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->isDragging:Z
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->itemFolder:Lcom/discord/views/ServerFolderView;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/LinearLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f08015e
|
|
|
|
invoke-static {v1, v2}, Landroidx/core/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setBackground(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setColor(Ljava/lang/Integer;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->color:Ljava/lang/Integer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final shouldDrawDecoration()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->isDragging:Z
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
return v0
|
|
.end method
|