2021-06-27 20:44:35 +00:00
|
|
|
package com.discord.widgets.voice.fullscreen;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.view.MenuItem;
|
|
|
|
import androidx.fragment.app.FragmentManager;
|
2021-08-09 22:50:01 +00:00
|
|
|
import com.discord.R;
|
2021-06-27 20:44:35 +00:00
|
|
|
import com.discord.utilities.streams.StreamContext;
|
|
|
|
import com.discord.utilities.voice.DiscordOverlayService;
|
|
|
|
import com.discord.widgets.voice.fullscreen.WidgetCallFullscreenViewModel;
|
|
|
|
import com.discord.widgets.voice.sheet.WidgetVoiceBottomSheet;
|
|
|
|
import com.discord.widgets.voice.sheet.WidgetVoiceSettingsBottomSheet;
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.z.d.m;
|
|
|
|
import d0.z.d.o;
|
2021-06-27 20:44:35 +00:00
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
import rx.functions.Action2;
|
|
|
|
/* compiled from: WidgetCallFullscreen.kt */
|
|
|
|
public final class WidgetCallFullscreen$configureMenu$1<T1, T2> implements Action2<MenuItem, Context> {
|
|
|
|
public final /* synthetic */ WidgetCallFullscreenViewModel.ViewState.Valid $viewState;
|
|
|
|
public final /* synthetic */ WidgetCallFullscreen this$0;
|
|
|
|
|
|
|
|
/* compiled from: WidgetCallFullscreen.kt */
|
|
|
|
/* renamed from: com.discord.widgets.voice.fullscreen.WidgetCallFullscreen$configureMenu$1$1 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass1 extends o implements Function1<StreamContext, Unit> {
|
|
|
|
public final /* synthetic */ WidgetCallFullscreen$configureMenu$1 this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public AnonymousClass1(WidgetCallFullscreen$configureMenu$1 widgetCallFullscreen$configureMenu$1) {
|
|
|
|
super(1);
|
|
|
|
this.this$0 = widgetCallFullscreen$configureMenu$1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
|
|
@Override // kotlin.jvm.functions.Function1
|
|
|
|
public /* bridge */ /* synthetic */ Unit invoke(StreamContext streamContext) {
|
|
|
|
invoke(streamContext);
|
|
|
|
return Unit.a;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void invoke(StreamContext streamContext) {
|
|
|
|
m.checkNotNullParameter(streamContext, "streamContext");
|
|
|
|
WidgetCallFullscreen.access$getViewModel$p(this.this$0.this$0).targetAndFocusStream(streamContext.getStream().getEncodedStreamKey());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public WidgetCallFullscreen$configureMenu$1(WidgetCallFullscreen widgetCallFullscreen, WidgetCallFullscreenViewModel.ViewState.Valid valid) {
|
|
|
|
this.this$0 = widgetCallFullscreen;
|
|
|
|
this.$viewState = valid;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final void call(MenuItem menuItem, Context context) {
|
|
|
|
m.checkNotNullExpressionValue(menuItem, "menuItem");
|
|
|
|
switch (menuItem.getItemId()) {
|
2022-01-19 20:19:48 +00:00
|
|
|
case R.id.menu_call_overlay_launcher /* 2131364292 */:
|
2021-06-27 20:44:35 +00:00
|
|
|
DiscordOverlayService.Companion companion = DiscordOverlayService.Companion;
|
|
|
|
m.checkNotNullExpressionValue(context, "context");
|
|
|
|
companion.launchForConnect(context);
|
|
|
|
return;
|
2022-01-19 20:19:48 +00:00
|
|
|
case R.id.menu_call_switch_camera /* 2131364293 */:
|
2021-06-27 20:44:35 +00:00
|
|
|
WidgetCallFullscreen.access$getViewModel$p(this.this$0).switchCameraInputPressed();
|
|
|
|
return;
|
2022-01-19 20:19:48 +00:00
|
|
|
case R.id.menu_call_video_list /* 2131364294 */:
|
2021-06-27 20:44:35 +00:00
|
|
|
WidgetVoiceBottomSheet.Companion companion2 = WidgetVoiceBottomSheet.Companion;
|
|
|
|
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
|
|
|
|
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
|
2021-07-13 20:48:29 +00:00
|
|
|
companion2.show(parentFragmentManager, this.$viewState.getCallModel().getChannel().h(), false, WidgetVoiceBottomSheet.FeatureContext.FULLSCREEN_CALL).setOnStreamPreviewClickedListener(new AnonymousClass1(this));
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
2022-01-19 20:19:48 +00:00
|
|
|
case R.id.menu_call_voice_settings /* 2131364295 */:
|
2021-06-27 20:44:35 +00:00
|
|
|
WidgetVoiceSettingsBottomSheet.Companion companion3 = WidgetVoiceSettingsBottomSheet.Companion;
|
2021-07-13 20:48:29 +00:00
|
|
|
Long valueOf = Long.valueOf(this.$viewState.getCallModel().getChannel().h());
|
2021-06-27 20:44:35 +00:00
|
|
|
FragmentManager parentFragmentManager2 = this.this$0.getParentFragmentManager();
|
|
|
|
m.checkNotNullExpressionValue(parentFragmentManager2, "parentFragmentManager");
|
|
|
|
companion3.show(valueOf, parentFragmentManager2);
|
|
|
|
return;
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|