discord-jadx/app/src/main/java/com/discord/widgets/voice/fullscreen/WidgetCallFullscreen$config...

47 lines
3.0 KiB
Java

package com.discord.widgets.voice.fullscreen;
import androidx.fragment.app.FragmentManager;
import com.discord.api.channel.ChannelUtils;
import com.discord.api.guildscheduledevent.GuildScheduledEvent;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilities;
import com.discord.utilities.stage.StageChannelUtils;
import com.discord.widgets.guildscheduledevent.WidgetEndGuildScheduledEventBottomSheet;
import com.discord.widgets.stage.sheet.WidgetEndStageBottomSheet;
import com.discord.widgets.voice.fullscreen.WidgetCallFullscreenViewModel;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
/* compiled from: WidgetCallFullscreen.kt */
public final class WidgetCallFullscreen$configureBottomControls$1 extends o implements Function0<Unit> {
public final /* synthetic */ WidgetCallFullscreenViewModel.ViewState.Valid $viewState;
public final /* synthetic */ WidgetCallFullscreen this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetCallFullscreen$configureBottomControls$1(WidgetCallFullscreen widgetCallFullscreen, WidgetCallFullscreenViewModel.ViewState.Valid valid) {
super(0);
this.this$0 = widgetCallFullscreen;
this.$viewState = valid;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
GuildScheduledEvent guildScheduledEventToEndForCall$default;
long access$getChannelId = WidgetCallFullscreen.access$getChannelId(this.this$0);
if (StageChannelUtils.shouldShowEndStageBottomSheet$default(StageChannelUtils.INSTANCE, access$getChannelId, null, null, null, null, 30, null)) {
WidgetEndStageBottomSheet.Companion companion = WidgetEndStageBottomSheet.Companion;
FragmentManager parentFragmentManager = this.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager, "parentFragmentManager");
companion.show(parentFragmentManager, "END_STAGE_REQUEST_KEY", access$getChannelId);
} else if (!ChannelUtils.E(this.$viewState.getCallModel().getChannel()) || (guildScheduledEventToEndForCall$default = GuildScheduledEventUtilities.Companion.getGuildScheduledEventToEndForCall$default(GuildScheduledEventUtilities.Companion, this.$viewState.getCallModel(), this.$viewState.getChannelPermissions(), null, 4, null)) == null) {
WidgetCallFullscreen.finishActivity$default(this.this$0, false, this.$viewState.isTextInVoiceEnabled(), 1, null);
} else {
WidgetEndGuildScheduledEventBottomSheet.Companion companion2 = WidgetEndGuildScheduledEventBottomSheet.Companion;
FragmentManager parentFragmentManager2 = this.this$0.getParentFragmentManager();
m.checkNotNullExpressionValue(parentFragmentManager2, "parentFragmentManager");
companion2.show(parentFragmentManager2, "END_EVENT_REQUEST_KEY", guildScheduledEventToEndForCall$default.h(), guildScheduledEventToEndForCall$default.i());
}
}
}