566 lines
14 KiB
Smali
566 lines
14 KiB
Smali
.class public final Lcom/discord/views/VoiceUserView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "VoiceUserView.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/views/VoiceUserView$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic i:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public f:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
.field public final g:Lcom/discord/utilities/anim/RingAnimator;
|
|
|
|
.field public h:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lw/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/views/VoiceUserView;
|
|
|
|
invoke-static {v2}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "avatar"
|
|
|
|
const-string v4, "getAvatar()Lcom/facebook/drawee/view/SimpleDraweeView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lw/u/b/u;-><init>(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/views/VoiceUserView;
|
|
|
|
invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "username"
|
|
|
|
const-string v5, "getUsername()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;-><init>(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/views/VoiceUserView;->i:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x6
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/views/VoiceUserView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 6
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/views/VoiceUserView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
const p3, 0x7f0a0984
|
|
|
|
invoke-static {p0, p3}, Lx/a/a2/w;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p3
|
|
|
|
iput-object p3, p0, Lcom/discord/views/VoiceUserView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p3, 0x7f0a098d
|
|
|
|
invoke-static {p0, p3}, Lx/a/a2/w;->a(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p3
|
|
|
|
iput-object p3, p0, Lcom/discord/views/VoiceUserView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
new-instance p3, Lcom/discord/utilities/anim/RingAnimator;
|
|
|
|
new-instance v0, Lcom/discord/views/VoiceUserView$b;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/views/VoiceUserView$b;-><init>(Lcom/discord/views/VoiceUserView;)V
|
|
|
|
const v1, 0x3f866666 # 1.05f
|
|
|
|
invoke-direct {p3, p0, v0, v1, v1}, Lcom/discord/utilities/anim/RingAnimator;-><init>(Landroid/view/View;Lkotlin/jvm/functions/Function0;FF)V
|
|
|
|
iput-object p3, p0, Lcom/discord/views/VoiceUserView;->g:Lcom/discord/utilities/anim/RingAnimator;
|
|
|
|
const p3, 0x7f0d0117
|
|
|
|
invoke-static {p1, p3, p0}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
sget-object p3, Lcom/discord/R$a;->VoiceUserView:[I
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, p2, p3, v0, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
invoke-virtual {p1, v0, p2}, Landroid/content/res/TypedArray;->getDimension(IF)F
|
|
|
|
move-result p2
|
|
|
|
float-to-int p2, p2
|
|
|
|
invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
|
|
|
|
invoke-virtual {p0, p2}, Lcom/discord/views/VoiceUserView;->setAvatarSize(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/views/VoiceUserView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/discord/views/VoiceUserView;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;II)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
const p2, 0x7f07005c
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/views/VoiceUserView;->a(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getAvatar()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/VoiceUserView;->d:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/VoiceUserView;->i:[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, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getUsername()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/VoiceUserView;->e:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/views/VoiceUserView;->i:[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/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final setVoiceState(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
.locals 1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isSpeaking()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object p1, Lcom/discord/views/VoiceUserView$a;->e:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isRinging()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
sget-object p1, Lcom/discord/views/VoiceUserView$a;->g:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
sget-object p1, Lcom/discord/views/VoiceUserView$a;->h:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getVoiceState()Lcom/discord/models/domain/ModelVoice$State;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->isSelfMute()Z
|
|
|
|
move-result p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz p1, :cond_4
|
|
|
|
sget-object p1, Lcom/discord/views/VoiceUserView$a;->f:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
sget-object p1, Lcom/discord/views/VoiceUserView$a;->d:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
:goto_1
|
|
invoke-direct {p0, p1}, Lcom/discord/views/VoiceUserView;->setVoiceState(Lcom/discord/views/VoiceUserView$a;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final setVoiceState(Lcom/discord/views/VoiceUserView$a;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/views/VoiceUserView;->f:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iput-object p1, p0, Lcom/discord/views/VoiceUserView;->f:Lcom/discord/views/VoiceUserView$a;
|
|
|
|
sget-object v0, Le/a/j/g0;->a:[I
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
aget v0, v0, v1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
const/4 v2, 0x2
|
|
|
|
if-eq v0, v2, :cond_1
|
|
|
|
const v0, 0x106000d
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const v0, 0x7f0801aa
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const v0, 0x7f0801ab
|
|
|
|
:goto_0
|
|
invoke-virtual {p0, v0}, Landroid/widget/FrameLayout;->setBackgroundResource(I)V
|
|
|
|
sget-object v0, Le/a/j/g0;->b:[I
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
aget p1, v0, p1
|
|
|
|
if-eq p1, v1, :cond_3
|
|
|
|
const/high16 p1, 0x3f800000 # 1.0f
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const p1, 0x3e99999a # 0.3f
|
|
|
|
:goto_1
|
|
invoke-direct {p0}, Lcom/discord/views/VoiceUserView;->getAvatar()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setAlpha(F)V
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/FrameLayout;->setAlpha(F)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/VoiceUserView;->g:Lcom/discord/utilities/anim/RingAnimator;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/anim/RingAnimator;->onUpdate()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;I)V
|
|
.locals 8
|
|
.param p2 # I
|
|
.annotation build Landroidx/annotation/DimenRes;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/views/VoiceUserView;->h:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-static {v0, p1}, Lw/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iput-object p1, p0, Lcom/discord/views/VoiceUserView;->h:Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/VoiceUserView;->getAvatar()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/16 v6, 0x18
|
|
|
|
const/4 v7, 0x0
|
|
|
|
move v3, p2
|
|
|
|
invoke-static/range {v1 .. v7}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Lcom/discord/models/domain/ModelUser;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/VoiceUserView;->getUsername()Landroid/widget/TextView;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getDisplayName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/views/VoiceUserView;->setVoiceState(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "voiceUser"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final setAvatarSize(I)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/views/VoiceUserView$c;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/views/VoiceUserView$c;-><init>(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/VoiceUserView;->getAvatar()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/views/VoiceUserView$c;->invoke(Landroid/view/View;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/VoiceUserView;->getUsername()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/views/VoiceUserView$c;->invoke(Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setSelected(Z)V
|
|
.locals 7
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->isSelected()Z
|
|
|
|
move-result v0
|
|
|
|
if-eq v0, p1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->setSelected(Z)V
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/discord/views/VoiceUserView;->getUsername()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Landroid/widget/FrameLayout;->isSelected()Z
|
|
|
|
move-result v2
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/view/extensions/ViewExtensions;->fadeBy$default(Landroid/view/View;ZJILjava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setVoiceUser(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const v0, 0x7f07005c
|
|
|
|
invoke-virtual {p0, p1, v0}, Lcom/discord/views/VoiceUserView;->a(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;I)V
|
|
|
|
return-void
|
|
.end method
|