72 lines
3.5 KiB
Java
72 lines
3.5 KiB
Java
package com.discord.widgets.chat.list.adapter;
|
|
|
|
import android.graphics.Shader;
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
import android.graphics.drawable.Drawable;
|
|
import android.view.View;
|
|
import android.widget.ImageView;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import com.discord.databinding.WidgetChatListAdapterItemMentionFooterBinding;
|
|
import com.discord.widgets.chat.list.entries.ChatListEntry;
|
|
import d0.z.d.m;
|
|
import java.util.Objects;
|
|
/* compiled from: WidgetChatListAdapterItemMentionFooter.kt */
|
|
public final class WidgetChatListAdapterItemMentionFooter extends WidgetChatListItem {
|
|
private final WidgetChatListAdapterItemMentionFooterBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatListAdapterItemMentionFooter(WidgetChatListAdapter widgetChatListAdapter) {
|
|
super(2131558952, widgetChatListAdapter);
|
|
m.checkNotNullParameter(widgetChatListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i = 2131362599;
|
|
View findViewById = view.findViewById(2131362599);
|
|
if (findViewById != null) {
|
|
i = 2131362600;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362600);
|
|
if (imageView != null) {
|
|
i = 2131362601;
|
|
TextView textView = (TextView) view.findViewById(2131362601);
|
|
if (textView != null) {
|
|
i = 2131365425;
|
|
View findViewById2 = view.findViewById(2131365425);
|
|
if (findViewById2 != null) {
|
|
WidgetChatListAdapterItemMentionFooterBinding widgetChatListAdapterItemMentionFooterBinding = new WidgetChatListAdapterItemMentionFooterBinding((LinearLayout) view, findViewById, imageView, textView, findViewById2);
|
|
m.checkNotNullExpressionValue(widgetChatListAdapterItemMentionFooterBinding, "WidgetChatListAdapterIte…terBinding.bind(itemView)");
|
|
this.binding = widgetChatListAdapterItemMentionFooterBinding;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i)));
|
|
}
|
|
|
|
private final void tileBackgroundBitmapDrawable(WidgetChatListAdapterItemMentionFooterBinding widgetChatListAdapterItemMentionFooterBinding) {
|
|
View view = widgetChatListAdapterItemMentionFooterBinding.f1744c;
|
|
m.checkNotNullExpressionValue(view, "tile");
|
|
Drawable background = view.getBackground();
|
|
Objects.requireNonNull(background, "null cannot be cast to non-null type android.graphics.drawable.BitmapDrawable");
|
|
BitmapDrawable bitmapDrawable = (BitmapDrawable) background;
|
|
bitmapDrawable.mutate();
|
|
Shader.TileMode tileMode = Shader.TileMode.REPEAT;
|
|
bitmapDrawable.setTileModeXY(tileMode, tileMode);
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.list.adapter.WidgetChatListItem
|
|
public void onConfigure(int i, ChatListEntry chatListEntry) {
|
|
m.checkNotNullParameter(chatListEntry, "data");
|
|
super.onConfigure(i, chatListEntry);
|
|
int i2 = 0;
|
|
boolean z2 = ((WidgetChatListAdapter) this.adapter).getData().getList().size() == 1;
|
|
View view = this.binding.b;
|
|
m.checkNotNullExpressionValue(view, "binding.chatListItemMentionFooterDivider");
|
|
if (!(!z2)) {
|
|
i2 = 8;
|
|
}
|
|
view.setVisibility(i2);
|
|
tileBackgroundBitmapDrawable(this.binding);
|
|
}
|
|
}
|