78 lines
3.5 KiB
Java
78 lines
3.5 KiB
Java
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 b.d.b.a.a;
|
|
import com.discord.R;
|
|
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 */
|
|
/* loaded from: classes2.dex */
|
|
public final class WidgetUnknownStickerSheet extends AppBottomSheet {
|
|
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.b0(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 */
|
|
/* loaded from: classes2.dex */
|
|
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() {
|
|
return R.layout.widget_unknown_sticker_sheet;
|
|
}
|
|
|
|
@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().f2659b.d(stickerPartial, 0);
|
|
TextView textView = getBinding().c;
|
|
m.checkNotNullExpressionValue(textView, "binding.unknownStickerSheetStickerName");
|
|
textView.setText(stickerPartial.e());
|
|
}
|
|
}
|