2021-07-04 15:26:29 +00:00
|
|
|
package com.discord.widgets.stickers;
|
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
import c.d.b.a.a;
|
|
|
|
import com.discord.api.sticker.StickerPartial;
|
|
|
|
import com.discord.app.AppBottomSheet;
|
|
|
|
import com.discord.databinding.WidgetUnknownStickerSheetBinding;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
|
|
import d0.z.d.m;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
|
|
import kotlin.reflect.KProperty;
|
|
|
|
/* compiled from: WidgetUnknownStickerSheet.kt */
|
|
|
|
public final class WidgetUnknownStickerSheet extends AppBottomSheet {
|
|
|
|
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.W(WidgetUnknownStickerSheet.class, "binding", "getBinding()Lcom/discord/databinding/WidgetUnknownStickerSheetBinding;", 0)};
|
|
|
|
public static final Companion Companion = new Companion(null);
|
|
|
|
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetUnknownStickerSheet$binding$2.INSTANCE, null, 2, null);
|
|
|
|
|
|
|
|
/* compiled from: WidgetUnknownStickerSheet.kt */
|
|
|
|
public static final class Companion {
|
|
|
|
private Companion() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
|
|
this();
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void show(FragmentManager fragmentManager, StickerPartial stickerPartial) {
|
|
|
|
m.checkNotNullParameter(fragmentManager, "fragmentManager");
|
|
|
|
m.checkNotNullParameter(stickerPartial, "sticker");
|
|
|
|
WidgetUnknownStickerSheet widgetUnknownStickerSheet = new WidgetUnknownStickerSheet();
|
|
|
|
Bundle bundle = new Bundle();
|
|
|
|
bundle.putSerializable("com.discord.intent.extra.EXTRA_STICKER", stickerPartial);
|
|
|
|
widgetUnknownStickerSheet.setArguments(bundle);
|
|
|
|
widgetUnknownStickerSheet.show(fragmentManager, WidgetUnknownStickerSheet.class.getName());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public WidgetUnknownStickerSheet() {
|
|
|
|
super(false, 1, null);
|
|
|
|
}
|
|
|
|
|
|
|
|
private final WidgetUnknownStickerSheetBinding getBinding() {
|
|
|
|
return (WidgetUnknownStickerSheetBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static final void show(FragmentManager fragmentManager, StickerPartial stickerPartial) {
|
|
|
|
Companion.show(fragmentManager, stickerPartial);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppBottomSheet
|
|
|
|
public int getContentViewResId() {
|
2021-07-13 20:23:20 +00:00
|
|
|
return 2131559279;
|
2021-07-04 15:26:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.discord.app.AppBottomSheet, androidx.fragment.app.Fragment
|
|
|
|
public void onViewCreated(View view, Bundle bundle) {
|
|
|
|
m.checkNotNullParameter(view, "view");
|
|
|
|
super.onViewCreated(view, bundle);
|
|
|
|
Serializable serializable = getArgumentsOrDefault().getSerializable("com.discord.intent.extra.EXTRA_STICKER");
|
|
|
|
Objects.requireNonNull(serializable, "null cannot be cast to non-null type com.discord.api.sticker.StickerPartial");
|
|
|
|
StickerPartial stickerPartial = (StickerPartial) serializable;
|
|
|
|
getBinding().b.c(stickerPartial, 0);
|
2021-07-13 20:23:20 +00:00
|
|
|
TextView textView = getBinding().f1995c;
|
2021-07-04 15:26:29 +00:00
|
|
|
m.checkNotNullExpressionValue(textView, "binding.unknownStickerSheetStickerName");
|
|
|
|
textView.setText(stickerPartial.d());
|
|
|
|
}
|
|
|
|
}
|