2021-12-17 21:59:34 +00:00
|
|
|
package b.a.y;
|
2021-07-24 02:37:17 +00:00
|
|
|
|
2021-08-10 21:19:22 +00:00
|
|
|
import com.discord.api.channel.Channel;
|
|
|
|
import com.discord.models.guild.Guild;
|
|
|
|
import com.discord.rtcconnection.RtcConnection;
|
|
|
|
import com.discord.stores.StoreStream;
|
2021-07-24 02:37:17 +00:00
|
|
|
import com.discord.views.OverlayMenuView;
|
2021-08-10 21:19:22 +00:00
|
|
|
import com.discord.widgets.voice.model.CallModel;
|
2021-11-02 06:38:17 +00:00
|
|
|
import j0.k.b;
|
2021-12-02 18:53:44 +00:00
|
|
|
import j0.l.e.k;
|
2021-08-10 21:19:22 +00:00
|
|
|
import rx.Observable;
|
|
|
|
import rx.functions.Func4;
|
2021-07-24 02:37:17 +00:00
|
|
|
/* compiled from: OverlayMenuView.kt */
|
2022-03-07 09:34:54 +00:00
|
|
|
/* loaded from: classes2.dex */
|
2021-08-10 21:19:22 +00:00
|
|
|
public final class r<T, R> implements b<Channel, Observable<? extends OverlayMenuView.a>> {
|
2021-12-02 18:53:44 +00:00
|
|
|
public static final r j = new r();
|
2021-07-24 02:37:17 +00:00
|
|
|
|
2021-11-02 06:38:17 +00:00
|
|
|
@Override // j0.k.b
|
2021-08-10 21:19:22 +00:00
|
|
|
public Observable<? extends OverlayMenuView.a> call(Channel channel) {
|
|
|
|
Channel channel2 = channel;
|
|
|
|
if (channel2 == null) {
|
2021-12-02 18:53:44 +00:00
|
|
|
return new k(null);
|
2021-08-10 21:19:22 +00:00
|
|
|
}
|
|
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
2022-03-21 18:52:30 +00:00
|
|
|
Observable<Long> observePermissionsForChannel = companion.getPermissions().observePermissionsForChannel(channel2.j());
|
|
|
|
Observable<Guild> observeGuild = companion.getGuilds().observeGuild(channel2.h());
|
|
|
|
Observable<CallModel> observable = CallModel.Companion.get(channel2.j());
|
2021-08-10 21:19:22 +00:00
|
|
|
Observable<RtcConnection.Quality> quality = companion.getRtcConnection().getQuality();
|
2021-12-02 18:53:44 +00:00
|
|
|
q qVar = q.j;
|
2022-03-07 09:34:54 +00:00
|
|
|
Object obj = qVar;
|
2021-08-10 21:19:22 +00:00
|
|
|
if (qVar != null) {
|
2022-03-07 09:34:54 +00:00
|
|
|
obj = new u(qVar);
|
2021-08-10 21:19:22 +00:00
|
|
|
}
|
2022-03-07 09:34:54 +00:00
|
|
|
return Observable.h(observePermissionsForChannel, observeGuild, observable, quality, (Func4) obj);
|
2021-07-24 02:37:17 +00:00
|
|
|
}
|
|
|
|
}
|