2021-06-27 20:44:35 +00:00
|
|
|
package com.discord.widgets.chat.list.adapter;
|
|
|
|
|
|
|
|
import com.discord.api.sticker.BaseSticker;
|
|
|
|
import com.discord.api.sticker.Sticker;
|
|
|
|
import com.discord.api.sticker.StickerPartial;
|
2021-07-03 23:36:06 +00:00
|
|
|
import com.discord.models.message.Message;
|
|
|
|
import com.discord.widgets.stickers.WidgetGuildStickerSheet;
|
2021-06-27 20:44:35 +00:00
|
|
|
import com.discord.widgets.stickers.WidgetStickerSheet;
|
|
|
|
import d0.z.d.o;
|
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
/* compiled from: WidgetChatListAdapterEventsHandler.kt */
|
|
|
|
public final class WidgetChatListAdapterEventsHandler$onStickerClicked$1 extends o implements Function1<BaseSticker, Unit> {
|
2021-06-27 20:53:42 +00:00
|
|
|
public final /* synthetic */ Message $message;
|
2021-06-27 20:44:35 +00:00
|
|
|
public final /* synthetic */ BaseSticker $sticker;
|
|
|
|
public final /* synthetic */ WidgetChatListAdapterEventsHandler this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
2021-06-27 20:53:42 +00:00
|
|
|
public WidgetChatListAdapterEventsHandler$onStickerClicked$1(WidgetChatListAdapterEventsHandler widgetChatListAdapterEventsHandler, BaseSticker baseSticker, Message message) {
|
2021-06-27 20:44:35 +00:00
|
|
|
super(1);
|
|
|
|
this.this$0 = widgetChatListAdapterEventsHandler;
|
|
|
|
this.$sticker = baseSticker;
|
2021-06-27 20:53:42 +00:00
|
|
|
this.$message = message;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
|
|
public /* bridge */ /* synthetic */ Unit invoke(BaseSticker baseSticker) {
|
|
|
|
invoke(baseSticker);
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void invoke(BaseSticker baseSticker) {
|
|
|
|
if (baseSticker == null) {
|
|
|
|
baseSticker = this.$sticker;
|
|
|
|
}
|
|
|
|
if (!(baseSticker instanceof StickerPartial)) {
|
|
|
|
Objects.requireNonNull(baseSticker, "null cannot be cast to non-null type com.discord.api.sticker.Sticker");
|
|
|
|
Sticker sticker = (Sticker) baseSticker;
|
2021-07-03 23:36:06 +00:00
|
|
|
int ordinal = sticker.k().ordinal();
|
|
|
|
if (ordinal == 1) {
|
|
|
|
WidgetStickerSheet.Companion.show(WidgetChatListAdapterEventsHandler.access$getFragmentManager$p(this.this$0), sticker, this.$message.getChannelId());
|
|
|
|
} else if (ordinal == 2) {
|
|
|
|
WidgetGuildStickerSheet.Companion.show(WidgetChatListAdapterEventsHandler.access$getFragmentManager$p(this.this$0), sticker);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|