discord-jadx/app/src/main/java/com/discord/stores/StoreMediaSettings$init$1.java

56 lines
2.5 KiB
Java

package com.discord.stores;
import com.airbnb.lottie.parser.AnimatableValueParser;
import com.discord.api.channel.Channel;
import com.discord.utilities.permissions.PermissionUtils;
import d0.z.d.m;
import j0.k.b;
import j0.l.e.j;
import rx.Observable;
/* compiled from: StoreMediaSettings.kt */
public final class StoreMediaSettings$init$1<T, R> implements b<Long, Observable<? extends Boolean>> {
public final /* synthetic */ StoreMediaSettings this$0;
/* compiled from: StoreMediaSettings.kt */
/* renamed from: com.discord.stores.StoreMediaSettings$init$1$1 reason: invalid class name */
public static final class AnonymousClass1<T, R> implements b<Channel, Observable<? extends Boolean>> {
public final /* synthetic */ Long $id;
public final /* synthetic */ StoreMediaSettings$init$1 this$0;
/* compiled from: StoreMediaSettings.kt */
/* renamed from: com.discord.stores.StoreMediaSettings$init$1$1$1 reason: invalid class name */
public static final class AnonymousClass1<T, R> implements b<Long, Boolean> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
public final Boolean call(Long l) {
return Boolean.valueOf(PermissionUtils.can(33554432, l));
}
}
public AnonymousClass1(StoreMediaSettings$init$1 storeMediaSettings$init$1, Long l) {
this.this$0 = storeMediaSettings$init$1;
this.$id = l;
}
public final Observable<? extends Boolean> call(Channel channel) {
if (channel == null || AnimatableValueParser.t1(channel) || AnimatableValueParser.w1(channel)) {
return new j(Boolean.TRUE);
}
StorePermissions access$getStorePermissions$p = StoreMediaSettings.access$getStorePermissions$p(this.this$0.this$0);
Long l = this.$id;
m.checkNotNullExpressionValue(l, "id");
return access$getStorePermissions$p.observePermissionsForChannel(l.longValue()).F(AnonymousClass1.INSTANCE);
}
}
public StoreMediaSettings$init$1(StoreMediaSettings storeMediaSettings) {
this.this$0 = storeMediaSettings;
}
public final Observable<? extends Boolean> call(Long l) {
StoreChannels access$getStoreChannels$p = StoreMediaSettings.access$getStoreChannels$p(this.this$0);
m.checkNotNullExpressionValue(l, "id");
return access$getStoreChannels$p.observeChannel(l.longValue()).Y(new AnonymousClass1(this, l));
}
}