discord-jadx/app/src/main/java/com/discord/stores/StoreAnalytics$trackOpenGif...

35 lines
1.8 KiB
Java

package com.discord.stores;
import com.discord.models.domain.ModelGift;
import com.discord.stores.StoreGifting;
import com.discord.utilities.analytics.AnalyticsTracker;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreAnalytics.kt */
public final class StoreAnalytics$trackOpenGiftAcceptModal$1 extends o implements Function0<Unit> {
public final /* synthetic */ long $channelId;
public final /* synthetic */ String $giftCode;
public final /* synthetic */ String $location;
public final /* synthetic */ StoreAnalytics this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreAnalytics$trackOpenGiftAcceptModal$1(StoreAnalytics storeAnalytics, String str, long j, String str2) {
super(0);
this.this$0 = storeAnalytics;
this.$giftCode = str;
this.$channelId = j;
this.$location = str2;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreGifting.GiftState giftState = StoreAnalytics.access$getStores$p(this.this$0).getGifting$app_productionBetaRelease().getKnownGifts().get(this.$giftCode);
ModelGift gift = giftState instanceof StoreGifting.GiftState.Resolved ? ((StoreGifting.GiftState.Resolved) giftState).getGift() : giftState instanceof StoreGifting.GiftState.Redeeming ? ((StoreGifting.GiftState.Redeeming) giftState).getGift() : giftState instanceof StoreGifting.GiftState.RedeemedFailed ? ((StoreGifting.GiftState.RedeemedFailed) giftState).getGift() : null;
if (gift != null) {
AnalyticsTracker.openGiftModal(gift, StoreAnalytics.access$getStores$p(this.this$0).getChannels$app_productionBetaRelease().findChannelByIdInternal$app_productionBetaRelease(this.$channelId), this.$location);
}
}
}