discord-jadx/app/src/main/java/com/discord/widgets/channels/WidgetChannelPickerBottomSheet$Companion$registerForResult$1.java

52 lines
2.4 KiB
Java
Raw Normal View History

2021-08-03 07:33:18 +00:00
package com.discord.widgets.channels;
import android.os.Bundle;
import com.discord.widgets.channels.WidgetChannelPickerBottomSheet;
2021-11-02 06:38:17 +00:00
import d0.z.d.m;
import d0.z.d.o;
2021-08-03 07:33:18 +00:00
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
/* compiled from: WidgetChannelPickerBottomSheet.kt */
2022-03-07 09:34:54 +00:00
/* loaded from: classes2.dex */
2021-08-03 07:33:18 +00:00
public final class WidgetChannelPickerBottomSheet$Companion$registerForResult$1 extends o implements Function2<String, Bundle, Unit> {
public final /* synthetic */ Function3 $onChannelSelected;
public final /* synthetic */ Function0 $onCreateChannelSelected;
public final /* synthetic */ String $requestKey;
2022-03-07 09:34:54 +00:00
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
2021-08-03 07:33:18 +00:00
public WidgetChannelPickerBottomSheet$Companion$registerForResult$1(String str, Function0 function0, Function3 function3) {
super(2);
this.$requestKey = str;
this.$onCreateChannelSelected = function0;
this.$onChannelSelected = function3;
}
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Unit invoke(String str, Bundle bundle) {
2022-03-07 09:34:54 +00:00
invoke2(str, bundle);
2021-08-03 07:33:18 +00:00
return Unit.a;
}
2022-03-07 09:34:54 +00:00
/* renamed from: invoke reason: avoid collision after fix types in other method */
public final void invoke2(String str, Bundle bundle) {
2021-08-03 07:33:18 +00:00
m.checkNotNullParameter(str, "resultRequestKey");
m.checkNotNullParameter(bundle, "bundle");
if (m.areEqual(this.$requestKey, str)) {
2022-03-07 09:34:54 +00:00
long j = bundle.getLong("RESULT_EXTRA_CHANNEL_ID", -1L);
2021-08-03 07:33:18 +00:00
String string = bundle.getString("RESULT_EXTRA_CHANNEL_NAME", "");
int i = bundle.getInt("RESULT_EXTRA_CHANNEL_ICON_RES_ID", -1);
int ordinal = WidgetChannelPickerBottomSheet.SelectionType.Companion.fromInt(bundle.getInt("RESULT_EXTRA_SELECTION_TYPE", WidgetChannelPickerBottomSheet.SelectionType.UNKNOWN.ordinal())).ordinal();
if (ordinal == 1) {
2022-03-07 09:34:54 +00:00
this.$onCreateChannelSelected.invoke();
2021-08-03 07:33:18 +00:00
} else if (ordinal == 2 && j > 0) {
Function3 function3 = this.$onChannelSelected;
Long valueOf = Long.valueOf(j);
m.checkNotNullExpressionValue(string, "channelName");
function3.invoke(valueOf, string, Integer.valueOf(i));
}
}
}
}