2021-08-04 23:47:20 +00:00
|
|
|
package com.discord.widgets.guildscheduledevent;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.util.AttributeSet;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.constraintlayout.widget.ConstraintLayout;
|
|
|
|
import androidx.core.content.ContextCompat;
|
2021-08-11 06:37:47 +00:00
|
|
|
import c.a.k.b;
|
2021-08-09 22:51:56 +00:00
|
|
|
import com.discord.R;
|
2021-08-04 23:47:20 +00:00
|
|
|
import com.discord.api.channel.Channel;
|
|
|
|
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
|
2021-08-20 02:22:46 +00:00
|
|
|
import com.discord.databinding.GuildScheduledEventBottomButtonViewBinding;
|
2021-08-04 23:47:20 +00:00
|
|
|
import com.discord.databinding.GuildScheduledEventItemViewBinding;
|
2021-08-20 02:22:46 +00:00
|
|
|
import com.discord.models.guild.Guild;
|
2021-08-26 06:35:19 +00:00
|
|
|
import com.discord.utilities.color.ColorCompat;
|
2021-08-04 23:47:20 +00:00
|
|
|
import com.discord.utilities.drawable.DrawableCompat;
|
2021-08-20 02:22:46 +00:00
|
|
|
import com.discord.utilities.extensions.SimpleDraweeViewExtensionsKt;
|
|
|
|
import com.discord.utilities.icon.IconUtils;
|
2021-08-14 06:40:53 +00:00
|
|
|
import com.discord.utilities.view.text.LinkifiedTextView;
|
2021-08-04 23:47:20 +00:00
|
|
|
import com.discord.widgets.guildscheduledevent.GuildScheduledEventListItem;
|
2021-08-20 02:22:46 +00:00
|
|
|
import com.facebook.drawee.view.SimpleDraweeView;
|
2021-08-31 06:34:54 +00:00
|
|
|
import d0.g;
|
2021-08-04 23:47:20 +00:00
|
|
|
import d0.z.d.m;
|
2021-08-31 06:34:54 +00:00
|
|
|
import kotlin.Lazy;
|
2021-08-04 23:47:20 +00:00
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
/* compiled from: GuildScheduledEventItemView.kt */
|
|
|
|
public final class GuildScheduledEventItemView extends ConstraintLayout {
|
|
|
|
private final GuildScheduledEventItemViewBinding binding;
|
2021-08-31 06:34:54 +00:00
|
|
|
private final Lazy descriptionParser$delegate;
|
2021-08-04 23:47:20 +00:00
|
|
|
|
|
|
|
public GuildScheduledEventItemView(Context context) {
|
|
|
|
this(context, null, 0, 6, null);
|
|
|
|
}
|
|
|
|
|
|
|
|
public GuildScheduledEventItemView(Context context, AttributeSet attributeSet) {
|
|
|
|
this(context, attributeSet, 0, 4, null);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public GuildScheduledEventItemView(Context context, AttributeSet attributeSet, int i) {
|
|
|
|
super(context, attributeSet, i);
|
|
|
|
m.checkNotNullParameter(context, "context");
|
2021-08-09 22:51:56 +00:00
|
|
|
View inflate = LayoutInflater.from(context).inflate(R.layout.guild_scheduled_event_item_view, (ViewGroup) this, false);
|
2021-08-04 23:47:20 +00:00
|
|
|
addView(inflate);
|
2021-08-20 02:22:46 +00:00
|
|
|
int i2 = R.id.guild_scheduled_event_list_item_buttom_view;
|
|
|
|
GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = (GuildScheduledEventBottomButtonView) inflate.findViewById(R.id.guild_scheduled_event_list_item_buttom_view);
|
|
|
|
if (guildScheduledEventBottomButtonView != null) {
|
|
|
|
i2 = R.id.guild_scheduled_event_list_item_channel_guild_container;
|
|
|
|
ConstraintLayout constraintLayout = (ConstraintLayout) inflate.findViewById(R.id.guild_scheduled_event_list_item_channel_guild_container);
|
|
|
|
if (constraintLayout != null) {
|
|
|
|
i2 = R.id.guild_scheduled_event_list_item_date_view;
|
|
|
|
GuildScheduledEventDateView guildScheduledEventDateView = (GuildScheduledEventDateView) inflate.findViewById(R.id.guild_scheduled_event_list_item_date_view);
|
|
|
|
if (guildScheduledEventDateView != null) {
|
2021-08-10 21:19:22 +00:00
|
|
|
i2 = R.id.guild_scheduled_event_list_item_desc_text;
|
2021-08-14 06:40:53 +00:00
|
|
|
LinkifiedTextView linkifiedTextView = (LinkifiedTextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_desc_text);
|
|
|
|
if (linkifiedTextView != null) {
|
2021-08-20 02:22:46 +00:00
|
|
|
i2 = R.id.guild_scheduled_event_list_item_guild_channel_name;
|
|
|
|
TextView textView = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_guild_channel_name);
|
|
|
|
if (textView != null) {
|
|
|
|
i2 = R.id.guild_scheduled_event_list_item_guild_icon;
|
|
|
|
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) inflate.findViewById(R.id.guild_scheduled_event_list_item_guild_icon);
|
|
|
|
if (simpleDraweeView != null) {
|
|
|
|
i2 = R.id.guild_scheduled_event_list_item_guild_icon_placeholder_text;
|
|
|
|
TextView textView2 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_guild_icon_placeholder_text);
|
|
|
|
if (textView2 != null) {
|
|
|
|
i2 = R.id.guild_scheduled_event_list_item_guild_name;
|
|
|
|
TextView textView3 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_guild_name);
|
|
|
|
if (textView3 != null) {
|
|
|
|
i2 = R.id.guild_scheduled_event_list_item_rsvp_text;
|
|
|
|
TextView textView4 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_rsvp_text);
|
|
|
|
if (textView4 != null) {
|
2021-08-20 05:39:29 +00:00
|
|
|
i2 = R.id.guild_scheduled_event_list_item_title_text;
|
|
|
|
TextView textView5 = (TextView) inflate.findViewById(R.id.guild_scheduled_event_list_item_title_text);
|
|
|
|
if (textView5 != null) {
|
|
|
|
i2 = R.id.standalone_channel_icon;
|
|
|
|
ImageView imageView = (ImageView) inflate.findViewById(R.id.standalone_channel_icon);
|
|
|
|
if (imageView != null) {
|
|
|
|
i2 = R.id.standalone_channel_name;
|
|
|
|
TextView textView6 = (TextView) inflate.findViewById(R.id.standalone_channel_name);
|
2021-08-14 06:40:53 +00:00
|
|
|
if (textView6 != null) {
|
2021-08-20 05:39:29 +00:00
|
|
|
GuildScheduledEventItemViewBinding guildScheduledEventItemViewBinding = new GuildScheduledEventItemViewBinding((ConstraintLayout) inflate, guildScheduledEventBottomButtonView, constraintLayout, guildScheduledEventDateView, linkifiedTextView, textView, simpleDraweeView, textView2, textView3, textView4, textView5, imageView, textView6);
|
2021-08-13 06:23:11 +00:00
|
|
|
m.checkNotNullExpressionValue(guildScheduledEventItemViewBinding, "GuildScheduledEventItemV…rom(context), this, true)");
|
|
|
|
this.binding = guildScheduledEventItemViewBinding;
|
2021-08-31 06:34:54 +00:00
|
|
|
this.descriptionParser$delegate = g.lazy(new GuildScheduledEventItemView$descriptionParser$2(this));
|
2021-08-13 06:23:11 +00:00
|
|
|
return;
|
|
|
|
}
|
2021-08-10 21:19:22 +00:00
|
|
|
}
|
|
|
|
}
|
2021-08-04 23:47:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
throw new NullPointerException("Missing required view with ID: ".concat(inflate.getResources().getResourceName(i2)));
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
|
|
public /* synthetic */ GuildScheduledEventItemView(Context context, AttributeSet attributeSet, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this(context, (i2 & 2) != 0 ? null : attributeSet, (i2 & 4) != 0 ? 0 : i);
|
|
|
|
}
|
|
|
|
|
2021-08-31 06:34:54 +00:00
|
|
|
public static final /* synthetic */ GuildScheduledEventItemViewBinding access$getBinding$p(GuildScheduledEventItemView guildScheduledEventItemView) {
|
|
|
|
return guildScheduledEventItemView.binding;
|
2021-08-14 06:40:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private final void configureDescription(String str) {
|
2021-08-31 06:34:54 +00:00
|
|
|
getDescriptionParser().configureDescription(str);
|
2021-08-14 06:40:53 +00:00
|
|
|
}
|
|
|
|
|
2021-08-20 02:22:46 +00:00
|
|
|
public static /* synthetic */ void configureInChatList$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) {
|
|
|
|
guildScheduledEventItemView.configureInChatList(guildScheduledEvent, channel, guild, z2, z3, (i & 32) != 0 ? GuildScheduledEventItemView$configureInChatList$1.INSTANCE : function0, (i & 64) != 0 ? GuildScheduledEventItemView$configureInChatList$2.INSTANCE : function02, function03);
|
2021-08-04 23:47:20 +00:00
|
|
|
}
|
|
|
|
|
2021-08-20 05:39:29 +00:00
|
|
|
private final void configureInternal(GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) {
|
2021-08-20 02:22:46 +00:00
|
|
|
GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = this.binding.b;
|
|
|
|
m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventListItemButtomView");
|
2021-08-04 23:47:20 +00:00
|
|
|
int i = 0;
|
2021-08-20 02:22:46 +00:00
|
|
|
guildScheduledEventBottomButtonView.setVisibility(0);
|
|
|
|
this.binding.b.configure(guildScheduledEvent, z2, z4, z3, function0, function02, function03);
|
|
|
|
TextView textView = this.binding.j;
|
|
|
|
Integer l = guildScheduledEvent.l();
|
|
|
|
if (l != null) {
|
|
|
|
textView.setText(String.valueOf(l.intValue()));
|
2021-08-18 06:27:30 +00:00
|
|
|
} else {
|
|
|
|
i = 4;
|
|
|
|
}
|
2021-08-20 02:22:46 +00:00
|
|
|
textView.setVisibility(i);
|
2021-08-28 06:29:07 +00:00
|
|
|
this.binding.d.configure(guildScheduledEvent);
|
2021-08-20 05:39:29 +00:00
|
|
|
TextView textView2 = this.binding.k;
|
2021-08-20 02:22:46 +00:00
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.guildScheduledEventListItemTitleText");
|
|
|
|
textView2.setText(guildScheduledEvent.h());
|
2021-08-14 06:40:53 +00:00
|
|
|
configureDescription(guildScheduledEvent.c());
|
2021-08-20 05:39:29 +00:00
|
|
|
configureLocation(guildScheduledEventLocationInfo, guild);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ void configureInternal$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEvent guildScheduledEvent, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, boolean z2, boolean z3, boolean z4, Function0 function0, Function0 function02, Function0 function03, int i, Object obj) {
|
|
|
|
guildScheduledEventItemView.configureInternal(guildScheduledEvent, guildScheduledEventLocationInfo, guild, z2, z3, z4, (i & 64) != 0 ? GuildScheduledEventItemView$configureInternal$1.INSTANCE : function0, (i & 128) != 0 ? GuildScheduledEventItemView$configureInternal$2.INSTANCE : function02, (i & 256) != 0 ? GuildScheduledEventItemView$configureInternal$3.INSTANCE : function03);
|
2021-08-04 23:47:20 +00:00
|
|
|
}
|
|
|
|
|
2021-08-20 05:39:29 +00:00
|
|
|
private final void configureLocation(GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild) {
|
|
|
|
int i = 8;
|
|
|
|
if (guild != null) {
|
2021-09-04 06:18:33 +00:00
|
|
|
ConstraintLayout constraintLayout = this.binding.f1636c;
|
2021-08-20 05:39:29 +00:00
|
|
|
m.checkNotNullExpressionValue(constraintLayout, "binding.guildScheduledEv…ItemChannelGuildContainer");
|
|
|
|
constraintLayout.setVisibility(0);
|
|
|
|
ImageView imageView = this.binding.l;
|
|
|
|
m.checkNotNullExpressionValue(imageView, "binding.standaloneChannelIcon");
|
|
|
|
imageView.setVisibility(8);
|
|
|
|
TextView textView = this.binding.m;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.standaloneChannelName");
|
|
|
|
textView.setVisibility(8);
|
|
|
|
SimpleDraweeView simpleDraweeView = this.binding.g;
|
|
|
|
m.checkNotNullExpressionValue(simpleDraweeView, "binding.guildScheduledEventListItemGuildIcon");
|
|
|
|
simpleDraweeView.setVisibility(0);
|
|
|
|
TextView textView2 = this.binding.h;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.guildScheduledEv…mGuildIconPlaceholderText");
|
|
|
|
textView2.setVisibility(0);
|
|
|
|
TextView textView3 = this.binding.i;
|
|
|
|
m.checkNotNullExpressionValue(textView3, "binding.guildScheduledEventListItemGuildName");
|
|
|
|
textView3.setVisibility(0);
|
|
|
|
TextView textView4 = this.binding.f;
|
|
|
|
m.checkNotNullExpressionValue(textView4, "binding.guildScheduledEv…tListItemGuildChannelName");
|
|
|
|
textView4.setVisibility(0);
|
|
|
|
TextView textView5 = this.binding.h;
|
|
|
|
textView5.setText(guild.getShortName());
|
|
|
|
if (!guild.hasIcon()) {
|
|
|
|
i = 0;
|
|
|
|
}
|
|
|
|
textView5.setVisibility(i);
|
|
|
|
SimpleDraweeView simpleDraweeView2 = this.binding.g;
|
|
|
|
m.checkNotNullExpressionValue(simpleDraweeView2, "binding.guildScheduledEventListItemGuildIcon");
|
|
|
|
SimpleDraweeViewExtensionsKt.setGuildIcon$default(simpleDraweeView2, true, guild, (float) getResources().getDimensionPixelSize(R.dimen.guild_scheduled_event_icon_corner_radius), Integer.valueOf(IconUtils.getMediaProxySize(getResources().getDimensionPixelSize(R.dimen.avatar_size_standard))), null, null, null, false, null, 496, null);
|
|
|
|
TextView textView6 = this.binding.i;
|
|
|
|
m.checkNotNullExpressionValue(textView6, "binding.guildScheduledEventListItemGuildName");
|
|
|
|
textView6.setText(guild.getName());
|
|
|
|
TextView textView7 = this.binding.f;
|
|
|
|
m.checkNotNullExpressionValue(textView7, "binding.guildScheduledEv…tListItemGuildChannelName");
|
|
|
|
textView7.setText(guildScheduledEventLocationInfo.getLocationName());
|
|
|
|
return;
|
|
|
|
}
|
2021-09-04 06:18:33 +00:00
|
|
|
ConstraintLayout constraintLayout2 = this.binding.f1636c;
|
2021-08-20 05:39:29 +00:00
|
|
|
m.checkNotNullExpressionValue(constraintLayout2, "binding.guildScheduledEv…ItemChannelGuildContainer");
|
|
|
|
constraintLayout2.setVisibility(0);
|
|
|
|
SimpleDraweeView simpleDraweeView3 = this.binding.g;
|
|
|
|
m.checkNotNullExpressionValue(simpleDraweeView3, "binding.guildScheduledEventListItemGuildIcon");
|
|
|
|
simpleDraweeView3.setVisibility(8);
|
|
|
|
TextView textView8 = this.binding.h;
|
|
|
|
m.checkNotNullExpressionValue(textView8, "binding.guildScheduledEv…mGuildIconPlaceholderText");
|
|
|
|
textView8.setVisibility(8);
|
|
|
|
TextView textView9 = this.binding.i;
|
|
|
|
m.checkNotNullExpressionValue(textView9, "binding.guildScheduledEventListItemGuildName");
|
|
|
|
textView9.setVisibility(8);
|
|
|
|
TextView textView10 = this.binding.f;
|
|
|
|
m.checkNotNullExpressionValue(textView10, "binding.guildScheduledEv…tListItemGuildChannelName");
|
|
|
|
textView10.setVisibility(8);
|
|
|
|
ImageView imageView2 = this.binding.l;
|
|
|
|
imageView2.setVisibility(0);
|
|
|
|
imageView2.setImageResource(guildScheduledEventLocationInfo.getLocationIcon());
|
|
|
|
TextView textView11 = this.binding.m;
|
|
|
|
textView11.setVisibility(0);
|
|
|
|
textView11.setText(guildScheduledEventLocationInfo.getLocationName());
|
|
|
|
m.checkNotNullExpressionValue(textView11, "binding.standaloneChanne…getLocationName()\n }");
|
|
|
|
}
|
|
|
|
|
|
|
|
public static /* synthetic */ void configureLocation$default(GuildScheduledEventItemView guildScheduledEventItemView, GuildScheduledEventLocationInfo guildScheduledEventLocationInfo, Guild guild, int i, Object obj) {
|
|
|
|
if ((i & 2) != 0) {
|
|
|
|
guild = null;
|
|
|
|
}
|
|
|
|
guildScheduledEventItemView.configureLocation(guildScheduledEventLocationInfo, guild);
|
2021-08-11 06:37:47 +00:00
|
|
|
}
|
|
|
|
|
2021-08-10 21:19:22 +00:00
|
|
|
public final void configureAsPreview(GuildScheduledEventModel guildScheduledEventModel, Channel channel) {
|
2021-08-04 23:47:20 +00:00
|
|
|
m.checkNotNullParameter(guildScheduledEventModel, "eventModel");
|
2021-08-20 02:22:46 +00:00
|
|
|
long millis = GuildScheduledEventPickerDateTime.INSTANCE.toMillis(guildScheduledEventModel.getStartDate(), guildScheduledEventModel.getStartTime());
|
2021-08-04 23:47:20 +00:00
|
|
|
ConstraintLayout constraintLayout = this.binding.a;
|
|
|
|
m.checkNotNullExpressionValue(constraintLayout, "binding.root");
|
2021-08-26 06:35:19 +00:00
|
|
|
ColorCompat colorCompat = ColorCompat.INSTANCE;
|
|
|
|
constraintLayout.setBackgroundTintList(colorCompat.createDefaultColorStateList(ColorCompat.getThemedColor(getContext(), (int) R.attr.colorBackgroundFloating)));
|
|
|
|
TextView textView = this.binding.j;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.guildScheduledEventListItemRsvpText");
|
|
|
|
textView.setBackgroundTintList(colorCompat.createDefaultColorStateList(ColorCompat.getThemedColor(getContext(), (int) R.attr.colorBackgroundTertiary)));
|
|
|
|
ContextCompat.getDrawable(getContext(), R.drawable.bg_guild_scheduled_list_item_preview);
|
|
|
|
TextView textView2 = this.binding.j;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "binding.guildScheduledEventListItemRsvpText");
|
|
|
|
textView2.setBackground(ContextCompat.getDrawable(getContext(), DrawableCompat.getThemedDrawableRes$default(this, (int) R.attr.colorBackgroundTertiary, 0, 2, (Object) null)));
|
2021-08-20 02:22:46 +00:00
|
|
|
GuildScheduledEventBottomButtonView guildScheduledEventBottomButtonView = this.binding.b;
|
|
|
|
m.checkNotNullExpressionValue(guildScheduledEventBottomButtonView, "binding.guildScheduledEventListItemButtomView");
|
|
|
|
guildScheduledEventBottomButtonView.setVisibility(8);
|
2021-08-26 06:35:19 +00:00
|
|
|
TextView textView3 = this.binding.j;
|
|
|
|
m.checkNotNullExpressionValue(textView3, "binding.guildScheduledEventListItemRsvpText");
|
|
|
|
textView3.setVisibility(4);
|
|
|
|
TextView textView4 = this.binding.k;
|
|
|
|
m.checkNotNullExpressionValue(textView4, "binding.guildScheduledEventListItemTitleText");
|
|
|
|
textView4.setText(guildScheduledEventModel.getName());
|
2021-08-14 06:40:53 +00:00
|
|
|
configureDescription(guildScheduledEventModel.getDescription());
|
2021-08-20 02:22:46 +00:00
|
|
|
this.binding.d.configure(millis);
|
2021-08-20 05:39:29 +00:00
|
|
|
configureLocation$default(this, GuildScheduledEventLocationInfo.Companion.buildLocationInfo(guildScheduledEventModel, channel), null, 2, null);
|
2021-08-04 23:47:20 +00:00
|
|
|
}
|
2021-08-11 06:37:47 +00:00
|
|
|
|
2021-08-20 02:22:46 +00:00
|
|
|
public final void configureInChatList(GuildScheduledEvent guildScheduledEvent, Channel channel, Guild guild, boolean z2, boolean z3, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) {
|
2021-08-12 06:36:45 +00:00
|
|
|
m.checkNotNullParameter(guildScheduledEvent, "guildScheduledEvent");
|
2021-08-11 06:37:47 +00:00
|
|
|
m.checkNotNullParameter(function0, "rsvpButtonClickListener");
|
|
|
|
m.checkNotNullParameter(function02, "joinServerButtonClickListener");
|
2021-08-13 06:23:11 +00:00
|
|
|
m.checkNotNullParameter(function03, "shareButtonClickListener");
|
2021-08-20 05:39:29 +00:00
|
|
|
configureInternal(guildScheduledEvent, GuildScheduledEventLocationInfo.Companion.buildLocationInfo(guildScheduledEvent, channel), guild, z3, false, true, function0, function02, function03);
|
2021-08-11 06:37:47 +00:00
|
|
|
ConstraintLayout constraintLayout = this.binding.a;
|
|
|
|
m.checkNotNullExpressionValue(constraintLayout, "binding.root");
|
2021-08-26 06:35:19 +00:00
|
|
|
ColorCompat colorCompat = ColorCompat.INSTANCE;
|
|
|
|
constraintLayout.setBackgroundTintList(colorCompat.createDefaultColorStateList(ColorCompat.getThemedColor(getContext(), (int) R.attr.colorBackgroundSecondary)));
|
|
|
|
TextView textView = this.binding.j;
|
|
|
|
m.checkNotNullExpressionValue(textView, "binding.guildScheduledEventListItemRsvpText");
|
|
|
|
textView.setBackgroundTintList(colorCompat.createDefaultColorStateList(ColorCompat.getThemedColor(getContext(), (int) R.attr.colorBackgroundTertiary)));
|
2021-08-20 02:22:46 +00:00
|
|
|
GuildScheduledEventBottomButtonViewBinding binding = this.binding.b.getBinding();
|
2021-08-26 06:35:19 +00:00
|
|
|
TextView textView2 = binding.f;
|
|
|
|
m.checkNotNullExpressionValue(textView2, "buttonBinding.guildSched…ottomStartEventButtonText");
|
2021-08-11 06:37:47 +00:00
|
|
|
Context context = getContext();
|
|
|
|
m.checkNotNullExpressionValue(context, "context");
|
2021-08-26 06:35:19 +00:00
|
|
|
int i = 0;
|
|
|
|
textView2.setText(b.h(context, R.string.guild_event_invite_embed_join_server_button_label, new Object[0], null, 4));
|
|
|
|
TextView textView3 = binding.f;
|
|
|
|
m.checkNotNullExpressionValue(textView3, "buttonBinding.guildSched…ottomStartEventButtonText");
|
|
|
|
textView3.setVisibility(z2 ^ true ? 0 : 8);
|
2021-08-20 02:22:46 +00:00
|
|
|
ImageView imageView = binding.e;
|
|
|
|
m.checkNotNullExpressionValue(imageView, "buttonBinding.guildSched…entBottomStartEventButton");
|
2021-08-11 06:37:47 +00:00
|
|
|
imageView.setVisibility(z2 ^ true ? 0 : 8);
|
2021-09-04 06:18:33 +00:00
|
|
|
TextView textView4 = binding.f1634c;
|
2021-08-26 06:35:19 +00:00
|
|
|
m.checkNotNullExpressionValue(textView4, "buttonBinding.guildSched…ottomInterestedButtonText");
|
2021-08-31 06:34:54 +00:00
|
|
|
textView4.setVisibility(z2 ? 0 : 8);
|
2021-08-20 02:22:46 +00:00
|
|
|
ImageView imageView2 = binding.b;
|
|
|
|
m.checkNotNullExpressionValue(imageView2, "buttonBinding.guildSched…entBottomInterestedButton");
|
2021-08-11 06:37:47 +00:00
|
|
|
if (!z2) {
|
|
|
|
i = 8;
|
|
|
|
}
|
|
|
|
imageView2.setVisibility(i);
|
|
|
|
}
|
|
|
|
|
2021-08-13 06:23:11 +00:00
|
|
|
public final void configureInEventList(GuildScheduledEventListItem.Event event, Function0<Unit> function0, Function0<Unit> function02, Function0<Unit> function03) {
|
2021-08-11 06:37:47 +00:00
|
|
|
m.checkNotNullParameter(event, "item");
|
|
|
|
m.checkNotNullParameter(function0, "rsvpButtonClickListener");
|
|
|
|
m.checkNotNullParameter(function02, "eventStartButtonClickListener");
|
2021-08-13 06:23:11 +00:00
|
|
|
m.checkNotNullParameter(function03, "shareButtonClickListener");
|
2021-08-20 05:39:29 +00:00
|
|
|
configureInternal(event.getEvent(), GuildScheduledEventLocationInfo.Companion.buildLocationInfo(event.getEvent(), event.getChannel()), null, event.isRsvped(), event.getCanStartEvent(), event.getCanShare(), function0, function02, function03);
|
2021-08-11 06:37:47 +00:00
|
|
|
}
|
2021-08-31 06:34:54 +00:00
|
|
|
|
|
|
|
public final GuildScheduledEventDescriptionParser getDescriptionParser() {
|
|
|
|
return (GuildScheduledEventDescriptionParser) this.descriptionParser$delegate.getValue();
|
|
|
|
}
|
2021-08-04 23:47:20 +00:00
|
|
|
}
|