72 lines
4.2 KiB
Java
72 lines
4.2 KiB
Java
package com.discord.views.channelsidebar;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.util.AttributeSet;
|
|
import android.view.LayoutInflater;
|
|
import android.view.View;
|
|
import android.widget.LinearLayout;
|
|
import androidx.core.content.ContextCompat;
|
|
import c.a.i.q;
|
|
import c.a.y.j0.a;
|
|
import c.a.y.j0.b;
|
|
import com.discord.utilities.drawable.DrawableCompat;
|
|
import com.google.android.material.button.MaterialButton;
|
|
import d0.z.d.m;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: GuildChannelSideBarActionsView.kt */
|
|
public final class GuildChannelSideBarActionsView extends LinearLayout {
|
|
public final q i;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GuildChannelSideBarActionsView(Context context, AttributeSet attributeSet) {
|
|
super(context, attributeSet);
|
|
m.checkNotNullParameter(context, "context");
|
|
LayoutInflater.from(getContext()).inflate(2131558516, this);
|
|
int i = 2131362382;
|
|
MaterialButton materialButton = (MaterialButton) findViewById(2131362382);
|
|
if (materialButton != null) {
|
|
i = 2131362383;
|
|
MaterialButton materialButton2 = (MaterialButton) findViewById(2131362383);
|
|
if (materialButton2 != null) {
|
|
i = 2131362384;
|
|
MaterialButton materialButton3 = (MaterialButton) findViewById(2131362384);
|
|
if (materialButton3 != null) {
|
|
i = 2131362385;
|
|
MaterialButton materialButton4 = (MaterialButton) findViewById(2131362385);
|
|
if (materialButton4 != null) {
|
|
q qVar = new q(this, materialButton, materialButton2, materialButton3, materialButton4);
|
|
m.checkNotNullExpressionValue(qVar, "GuildChannelSideBarActio…ater.from(context), this)");
|
|
this.i = qVar;
|
|
a(p.i, p.j, p.k, p.l, false, false, false);
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(getResources().getResourceName(i)));
|
|
}
|
|
|
|
public final void a(Function1<? super View, Unit> function1, Function1<? super View, Unit> function12, Function1<? super View, Unit> function13, Function1<? super View, Unit> function14, boolean z2, boolean z3, boolean z4) {
|
|
m.checkNotNullParameter(function1, "onSearchClicked");
|
|
m.checkNotNullParameter(function12, "onNotificationsClicked");
|
|
m.checkNotNullParameter(function13, "onPinsClicked");
|
|
m.checkNotNullParameter(function14, "onSettingsClicked");
|
|
int themedDrawableRes$default = z2 ? DrawableCompat.getThemedDrawableRes$default(this, 2130969458, 0, 2, (Object) null) : DrawableCompat.getThemedDrawableRes$default(this, 2130969457, 0, 2, (Object) null);
|
|
int themedDrawableRes$default2 = z3 ? DrawableCompat.getThemedDrawableRes$default(this, 2130969455, 0, 2, (Object) null) : DrawableCompat.getThemedDrawableRes$default(this, 2130969456, 0, 2, (Object) null);
|
|
this.i.d.setOnClickListener(new a(function1));
|
|
this.i.e.setOnClickListener(new a(function14));
|
|
MaterialButton materialButton = this.i.f144c;
|
|
DrawableCompat.setCompoundDrawablesCompat(materialButton, (Drawable) null, ContextCompat.getDrawable(materialButton.getContext(), themedDrawableRes$default), (Drawable) null, (Drawable) null);
|
|
materialButton.setOnClickListener(new b(function13));
|
|
MaterialButton materialButton2 = this.i.f144c;
|
|
m.checkNotNullExpressionValue(materialButton2, "binding.channelSidebarActionsPins");
|
|
materialButton2.setEnabled(!z4);
|
|
MaterialButton materialButton3 = this.i.b;
|
|
DrawableCompat.setCompoundDrawablesCompat(materialButton3, (Drawable) null, ContextCompat.getDrawable(materialButton3.getContext(), themedDrawableRes$default2), (Drawable) null, (Drawable) null);
|
|
materialButton3.setOnClickListener(new b(function12));
|
|
materialButton3.setContentDescription(z3 ? materialButton3.getContext().getString(2131891740) : materialButton3.getContext().getString(2131891739));
|
|
}
|
|
}
|