discord-jadx/app/src/main/java/com/discord/widgets/settings/WidgetSettings$Model$Compan...

20 lines
947 B
Java

package com.discord.widgets.settings;
import com.discord.api.premium.OutboundPromotion;
import com.discord.stores.StoreOutboundPromotions;
import j0.k.b;
import java.util.List;
/* compiled from: WidgetSettings.kt */
public final class WidgetSettings$Model$Companion$get$1<T, R> implements b<StoreOutboundPromotions.State, Integer> {
public static final WidgetSettings$Model$Companion$get$1 INSTANCE = new WidgetSettings$Model$Companion$get$1();
public final Integer call(StoreOutboundPromotions.State state) {
List<OutboundPromotion> validActivePromotions;
if (!(state instanceof StoreOutboundPromotions.State.Loaded)) {
state = null;
}
StoreOutboundPromotions.State.Loaded loaded = (StoreOutboundPromotions.State.Loaded) state;
return Integer.valueOf((loaded == null || (validActivePromotions = loaded.getValidActivePromotions()) == null) ? 0 : validActivePromotions.size());
}
}