discord-jadx/app/src/main/java/com/discord/stores/StoreAuthentication$getShou...

23 lines
1.1 KiB
Java

package com.discord.stores;
import com.discord.api.channel.Channel;
import com.discord.models.user.MeUser;
import com.discord.stores.StoreNavigation;
import com.discord.utilities.time.TimeUtils;
import rx.functions.Func3;
/* compiled from: StoreAuthentication.kt */
public final class StoreAuthentication$getShouldShowAgeGate$1<T1, T2, T3, R> implements Func3<MeUser, String, Channel, StoreNavigation.AgeGate> {
public static final StoreAuthentication$getShouldShowAgeGate$1 INSTANCE = new StoreAuthentication$getShouldShowAgeGate$1();
public final StoreNavigation.AgeGate call(MeUser meUser, String str, Channel channel) {
long parseUTCDate = TimeUtils.parseUTCDate("2021-02-05T12:00:00+0000");
if (!meUser.getHasBirthday() && (meUser.getId() >>> 22) + 1420070400000L > parseUTCDate) {
return StoreNavigation.AgeGate.REGISTER_AGE_GATE;
}
if (str != null || meUser.getHasBirthday() || channel == null || !channel.o()) {
return null;
}
return StoreNavigation.AgeGate.NSFW_CHANNEL_AGE_GATE;
}
}