2021-06-27 20:44:35 +00:00
|
|
|
package com.discord.widgets.stickers;
|
|
|
|
|
|
|
|
import android.view.View;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
|
|
|
import com.discord.api.premium.PremiumTier;
|
|
|
|
import com.discord.api.sticker.Sticker;
|
|
|
|
import com.discord.models.sticker.dto.ModelStickerPack;
|
|
|
|
import com.discord.widgets.chat.input.expression.ExpressionPickerEvent;
|
|
|
|
import com.discord.widgets.chat.input.expression.ExpressionPickerEventBus;
|
|
|
|
import com.discord.widgets.chat.input.sticker.StickerPackStoreSheetViewType;
|
|
|
|
import com.discord.widgets.chat.input.sticker.WidgetStickerPackStoreSheet;
|
|
|
|
import d0.z.d.m;
|
|
|
|
/* compiled from: WidgetStickerSheet.kt */
|
|
|
|
public final class WidgetStickerSheet$configureUI$4 implements View.OnClickListener {
|
|
|
|
public final /* synthetic */ boolean $isPackEnabled;
|
|
|
|
public final /* synthetic */ String $location;
|
|
|
|
public final /* synthetic */ PremiumTier $meUserPremiumTier;
|
|
|
|
public final /* synthetic */ Sticker $sticker;
|
|
|
|
public final /* synthetic */ ModelStickerPack $stickerPack;
|
|
|
|
public final /* synthetic */ WidgetStickerSheet this$0;
|
|
|
|
|
|
|
|
public WidgetStickerSheet$configureUI$4(WidgetStickerSheet widgetStickerSheet, boolean z2, PremiumTier premiumTier, Sticker sticker, String str, ModelStickerPack modelStickerPack) {
|
|
|
|
this.this$0 = widgetStickerSheet;
|
|
|
|
this.$isPackEnabled = z2;
|
|
|
|
this.$meUserPremiumTier = premiumTier;
|
|
|
|
this.$sticker = sticker;
|
|
|
|
this.$location = str;
|
|
|
|
this.$stickerPack = modelStickerPack;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
|
|
|
if (!this.$isPackEnabled || this.$meUserPremiumTier != PremiumTier.TIER_2) {
|
|
|
|
WidgetStickerPackStoreSheet.Companion companion = WidgetStickerPackStoreSheet.Companion;
|
|
|
|
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
|
|
|
|
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
|
|
|
|
companion.show(parentFragmentManager, this.$sticker, StickerPackStoreSheetViewType.STICKER_POPOUT_VIEW_ALL, this.$location, StickerPurchaseLocation.Companion.getPopoutPurchaseLocation(this.$stickerPack.canBePurchased()));
|
|
|
|
} else {
|
2021-07-03 23:36:06 +00:00
|
|
|
ExpressionPickerEventBus.Companion.getINSTANCE().emitEvent(new ExpressionPickerEvent.OpenStickerPicker(this.$sticker.i(), null, false, 2, null));
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
this.this$0.dismiss();
|
|
|
|
}
|
|
|
|
}
|