531 lines
15 KiB
Smali
531 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, 0x7f0a03f2
|
|
|
|
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}, Lw/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, 0x7f0a03f1
|
|
|
|
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}, Lw/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, 0x7f0a03f8
|
|
|
|
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}, Lw/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, 0x7f0a03f9
|
|
|
|
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}, Lw/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, 0x7f0a03f4
|
|
|
|
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}, Lw/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, 0x7f0a03fa
|
|
|
|
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}, Lw/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, 0x7f0a03f3
|
|
|
|
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}, Lw/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}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lw/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 9
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
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 v0
|
|
|
|
const-wide v1, 0xff000000L
|
|
|
|
int-to-long v3, v0
|
|
|
|
add-long/2addr v3, v1
|
|
|
|
long-to-int v0, v3
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
iput-object v0, 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 v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getGuilds()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
iput v0, p0, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder;->numChildren:I
|
|
|
|
iget-object v0, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
new-instance v2, Lcom/discord/widgets/guilds/list/GuildListViewHolder$FolderViewHolder$configure$2;
|
|
|
|
invoke-direct {v2, 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 {v0, v2}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v3, 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 v4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isOpen()Z
|
|
|
|
move-result v6
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getGuilds()Ljava/util/List;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getColor()Ljava/lang/Integer;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual/range {v3 .. v8}, Lcom/discord/views/ServerFolderView;->a(JZLjava/util/List;Ljava/lang/Integer;)V
|
|
|
|
iget-object v0, 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 v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isAnyGuildSelected()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
const/16 v4, 0x8
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/16 v2, 0x8
|
|
|
|
:goto_2
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v0, 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 v2
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isUnread()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/4 v2, 0x0
|
|
|
|
:goto_3
|
|
if-eqz v2, :cond_5
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
const/16 v2, 0x8
|
|
|
|
:goto_4
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v0, 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 v2
|
|
|
|
if-nez v2, :cond_6
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->isAnyGuildConnectedToVoice()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
const/4 v3, 0x0
|
|
|
|
:goto_5
|
|
if-eqz v3, :cond_7
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
const/16 v2, 0x8
|
|
|
|
:goto_6
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v0, 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 v2
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
const/4 v4, 0x0
|
|
|
|
:cond_8
|
|
invoke-virtual {v0, v4}, Landroid/view/View;->setVisibility(I)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 v2
|
|
|
|
if-eqz v2, :cond_9
|
|
|
|
goto :goto_7
|
|
|
|
:cond_9
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/list/GuildListItem$FolderItem;->getMentionCount()I
|
|
|
|
move-result v1
|
|
|
|
:goto_7
|
|
invoke-virtual {p0, v0, v1}, Lcom/discord/widgets/guilds/list/GuildListViewHolder;->configureMentionsCount(Landroid/widget/TextView;I)V
|
|
|
|
return-void
|
|
|
|
:cond_a
|
|
const-string p1, "data"
|
|
|
|
invoke-static {p1}, Lw/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, 0x7f080173
|
|
|
|
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
|