52 lines
2.5 KiB
Java
52 lines
2.5 KiB
Java
package com.discord.widgets.channels;
|
|
|
|
import android.os.Bundle;
|
|
import com.discord.widgets.channels.WidgetChannelPickerBottomSheet;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.functions.Function3;
|
|
/* compiled from: WidgetChannelPickerBottomSheet.kt */
|
|
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;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChannelPickerBottomSheet$Companion$registerForResult$1(String str, Function0 function0, Function3 function3) {
|
|
super(2);
|
|
this.$requestKey = str;
|
|
this.$onCreateChannelSelected = function0;
|
|
this.$onChannelSelected = function3;
|
|
}
|
|
|
|
/* 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, java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public /* bridge */ /* synthetic */ Unit invoke(String str, Bundle bundle) {
|
|
invoke(str, bundle);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(String str, Bundle bundle) {
|
|
m.checkNotNullParameter(str, "resultRequestKey");
|
|
m.checkNotNullParameter(bundle, "bundle");
|
|
if (m.areEqual(this.$requestKey, str)) {
|
|
long j = bundle.getLong("RESULT_EXTRA_CHANNEL_ID", -1);
|
|
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) {
|
|
this.$onCreateChannelSelected.mo1invoke();
|
|
} 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));
|
|
}
|
|
}
|
|
}
|
|
}
|