58 lines
3.2 KiB
Java
58 lines
3.2 KiB
Java
package com.discord.widgets.chat.list.adapter;
|
|
|
|
import android.content.Context;
|
|
import android.view.View;
|
|
import android.widget.FrameLayout;
|
|
import com.discord.databinding.WidgetChatListAdapterItemStickerBinding;
|
|
import com.discord.utilities.dsti.StickerUtils;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import com.discord.views.sticker.StickerView;
|
|
import com.discord.widgets.chat.list.entries.ChatListEntry;
|
|
import com.discord.widgets.chat.list.entries.StickerEntry;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
import rx.Observable;
|
|
import rx.Subscription;
|
|
/* compiled from: WidgetChatListAdapterItemSticker.kt */
|
|
public final class WidgetChatListAdapterItemSticker extends WidgetChatListItem {
|
|
private final WidgetChatListAdapterItemStickerBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatListAdapterItemSticker(WidgetChatListAdapter widgetChatListAdapter) {
|
|
super(2131558958, widgetChatListAdapter);
|
|
m.checkNotNullParameter(widgetChatListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
StickerView stickerView = (StickerView) view.findViewById(2131362537);
|
|
if (stickerView != null) {
|
|
WidgetChatListAdapterItemStickerBinding widgetChatListAdapterItemStickerBinding = new WidgetChatListAdapterItemStickerBinding((FrameLayout) view, stickerView);
|
|
m.checkNotNullExpressionValue(widgetChatListAdapterItemStickerBinding, "WidgetChatListAdapterIte…kerBinding.bind(itemView)");
|
|
this.binding = widgetChatListAdapterItemStickerBinding;
|
|
return;
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(2131362537)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChatListAdapter access$getAdapter$p(WidgetChatListAdapterItemSticker widgetChatListAdapterItemSticker) {
|
|
return (WidgetChatListAdapter) widgetChatListAdapterItemSticker.adapter;
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChatListAdapterItemStickerBinding access$getBinding$p(WidgetChatListAdapterItemSticker widgetChatListAdapterItemSticker) {
|
|
return widgetChatListAdapterItemSticker.binding;
|
|
}
|
|
|
|
@Override // com.discord.utilities.mg_recycler.MGRecyclerViewHolder
|
|
public Subscription getSubscription() {
|
|
return this.binding.b.getSubscription();
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.list.adapter.WidgetChatListItem
|
|
public void onConfigure(int i, ChatListEntry chatListEntry) {
|
|
m.checkNotNullParameter(chatListEntry, "data");
|
|
super.onConfigure(i, chatListEntry);
|
|
StickerEntry stickerEntry = (StickerEntry) chatListEntry;
|
|
Observable Z = StickerUtils.getGuildOrStandardSticker$default(StickerUtils.INSTANCE, stickerEntry.getSticker().c(), false, 2, null).Z(1);
|
|
m.checkNotNullExpressionValue(Z, "StickerUtils.getGuildOrS…kerId())\n .take(1)");
|
|
ObservableExtensionsKt.appSubscribe$default(Z, WidgetChatListAdapterItemSticker.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetChatListAdapterItemSticker$onConfigure$1(this, stickerEntry, chatListEntry), 62, (Object) null);
|
|
}
|
|
}
|