2021-07-24 02:37:17 +00:00
|
|
|
package com.discord.views;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.util.AttributeSet;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.animation.Animation;
|
|
|
|
import android.view.animation.AnimationUtils;
|
|
|
|
import android.widget.GridLayout;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import androidx.annotation.AnimRes;
|
2021-07-28 07:39:21 +00:00
|
|
|
import c.a.i.z2;
|
2021-07-24 02:37:17 +00:00
|
|
|
import com.discord.utilities.accessibility.AccessibilityUtils;
|
|
|
|
import d0.z.d.m;
|
|
|
|
/* compiled from: ServerFolderView.kt */
|
|
|
|
public final class ServerFolderView extends LinearLayout {
|
|
|
|
public static final /* synthetic */ int i = 0;
|
2021-07-28 07:39:21 +00:00
|
|
|
public final z2 j;
|
2021-07-24 02:37:17 +00:00
|
|
|
public Long k;
|
|
|
|
public boolean l;
|
|
|
|
|
|
|
|
/* compiled from: ServerFolderView.kt */
|
|
|
|
public static final class a implements Animation.AnimationListener {
|
|
|
|
public final /* synthetic */ ServerFolderView i;
|
|
|
|
|
|
|
|
public a(ServerFolderView serverFolderView) {
|
|
|
|
this.i = serverFolderView;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.animation.Animation.AnimationListener
|
|
|
|
public void onAnimationEnd(Animation animation) {
|
|
|
|
ServerFolderView serverFolderView = this.i;
|
|
|
|
int i = ServerFolderView.i;
|
|
|
|
serverFolderView.a();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.animation.Animation.AnimationListener
|
|
|
|
public void onAnimationRepeat(Animation animation) {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.animation.Animation.AnimationListener
|
|
|
|
public void onAnimationStart(Animation animation) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public ServerFolderView(Context context, AttributeSet attributeSet) {
|
|
|
|
super(context, attributeSet, 0);
|
|
|
|
m.checkNotNullParameter(context, "context");
|
2021-07-28 07:39:21 +00:00
|
|
|
LayoutInflater.from(context).inflate(2131558806, this);
|
|
|
|
int i2 = 2131363287;
|
|
|
|
ImageView imageView = (ImageView) findViewById(2131363287);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (imageView != null) {
|
2021-07-28 07:39:21 +00:00
|
|
|
i2 = 2131363560;
|
|
|
|
GuildView guildView = (GuildView) findViewById(2131363560);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (guildView != null) {
|
2021-07-28 07:39:21 +00:00
|
|
|
i2 = 2131363561;
|
|
|
|
GuildView guildView2 = (GuildView) findViewById(2131363561);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (guildView2 != null) {
|
2021-07-28 07:39:21 +00:00
|
|
|
i2 = 2131363562;
|
|
|
|
GuildView guildView3 = (GuildView) findViewById(2131363562);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (guildView3 != null) {
|
2021-07-28 07:39:21 +00:00
|
|
|
i2 = 2131363563;
|
|
|
|
GuildView guildView4 = (GuildView) findViewById(2131363563);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (guildView4 != null) {
|
2021-07-28 07:39:21 +00:00
|
|
|
i2 = 2131363564;
|
|
|
|
GridLayout gridLayout = (GridLayout) findViewById(2131363564);
|
2021-07-24 02:37:17 +00:00
|
|
|
if (gridLayout != null) {
|
2021-07-28 07:39:21 +00:00
|
|
|
z2 z2Var = new z2(this, imageView, guildView, guildView2, guildView3, guildView4, gridLayout);
|
|
|
|
m.checkNotNullExpressionValue(z2Var, "ViewServerFolderBinding.…ater.from(context), this)");
|
|
|
|
this.j = z2Var;
|
2021-07-24 02:37:17 +00:00
|
|
|
setOrientation(1);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i2)));
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void a() {
|
|
|
|
if (this.l) {
|
|
|
|
ImageView imageView = this.j.b;
|
|
|
|
m.checkNotNullExpressionValue(imageView, "binding.folderViewFolderImage");
|
|
|
|
imageView.setVisibility(0);
|
|
|
|
GridLayout gridLayout = this.j.g;
|
|
|
|
m.checkNotNullExpressionValue(gridLayout, "binding.guildViews");
|
|
|
|
gridLayout.setVisibility(8);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
ImageView imageView2 = this.j.b;
|
|
|
|
m.checkNotNullExpressionValue(imageView2, "binding.folderViewFolderImage");
|
|
|
|
imageView2.setVisibility(8);
|
|
|
|
GridLayout gridLayout2 = this.j.g;
|
|
|
|
m.checkNotNullExpressionValue(gridLayout2, "binding.guildViews");
|
|
|
|
gridLayout2.setVisibility(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void b(@AnimRes int i2) {
|
|
|
|
Animation loadAnimation = AnimationUtils.loadAnimation(getContext(), i2);
|
|
|
|
loadAnimation.setAnimationListener(new a(this));
|
|
|
|
if (AccessibilityUtils.INSTANCE.isReducedMotionEnabled()) {
|
|
|
|
m.checkNotNullExpressionValue(loadAnimation, "animation");
|
|
|
|
loadAnimation.setDuration(0);
|
|
|
|
}
|
|
|
|
ImageView imageView = this.j.b;
|
|
|
|
m.checkNotNullExpressionValue(imageView, "binding.folderViewFolderImage");
|
|
|
|
imageView.setVisibility(0);
|
|
|
|
GridLayout gridLayout = this.j.g;
|
|
|
|
m.checkNotNullExpressionValue(gridLayout, "binding.guildViews");
|
|
|
|
gridLayout.setVisibility(0);
|
|
|
|
this.j.b.startAnimation(loadAnimation);
|
|
|
|
}
|
|
|
|
}
|