2021-06-27 20:44:35 +00:00
|
|
|
package defpackage;
|
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
import android.content.Context;
|
2021-06-27 20:44:35 +00:00
|
|
|
import android.view.View;
|
2021-11-08 18:25:28 +00:00
|
|
|
import c.a.d.m;
|
|
|
|
import c.a.y.s;
|
|
|
|
import c.a.y.t;
|
|
|
|
import com.discord.R;
|
|
|
|
import com.discord.app.AppActivity;
|
|
|
|
import com.discord.stores.StoreInviteSettings;
|
2021-06-27 20:44:35 +00:00
|
|
|
import com.discord.stores.StoreStream;
|
2021-11-08 18:25:28 +00:00
|
|
|
import com.discord.utilities.intent.IntentUtils;
|
|
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
|
|
import com.discord.views.OverlayMenuView;
|
|
|
|
import java.util.Objects;
|
|
|
|
import kotlin.jvm.functions.Function0;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
2021-06-27 20:44:35 +00:00
|
|
|
/* compiled from: java-style lambda group */
|
|
|
|
/* renamed from: f reason: default package */
|
|
|
|
public final class f implements View.OnClickListener {
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ int j;
|
2021-11-08 18:25:28 +00:00
|
|
|
public final /* synthetic */ Object k;
|
2021-12-17 22:03:14 +00:00
|
|
|
public final /* synthetic */ Object l;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
public f(int i, Object obj, Object obj2) {
|
2021-12-17 22:03:14 +00:00
|
|
|
this.j = i;
|
|
|
|
this.k = obj;
|
|
|
|
this.l = obj2;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
|
|
public final void onClick(View view) {
|
2021-12-17 22:03:14 +00:00
|
|
|
int i = this.j;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (i == 0) {
|
2021-12-17 22:03:14 +00:00
|
|
|
OverlayMenuView overlayMenuView = (OverlayMenuView) this.k;
|
|
|
|
Long valueOf = Long.valueOf(((OverlayMenuView.a) this.l).f2273c.getChannel().h());
|
|
|
|
int i2 = OverlayMenuView.j;
|
2021-11-08 18:25:28 +00:00
|
|
|
Objects.requireNonNull(overlayMenuView);
|
|
|
|
if (valueOf != null) {
|
|
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(StoreInviteSettings.generateInvite$default(StoreStream.Companion.getInviteSettings(), valueOf.longValue(), null, 2, null), overlayMenuView, null, 2, null), OverlayMenuView.class, (Context) null, (Function1) null, new s(overlayMenuView), (Function0) null, (Function0) null, new t(overlayMenuView), 54, (Object) null);
|
|
|
|
} else {
|
|
|
|
m.g(overlayMenuView.getContext(), R.string.instant_invite_failed_to_generate, 0, null, 12);
|
|
|
|
}
|
2021-06-27 20:44:35 +00:00
|
|
|
} else if (i == 1) {
|
2021-12-17 22:03:14 +00:00
|
|
|
OverlayMenuView overlayMenuView2 = (OverlayMenuView) this.k;
|
|
|
|
Long valueOf2 = Long.valueOf(((OverlayMenuView.a) this.l).f2273c.getChannel().h());
|
|
|
|
int i3 = OverlayMenuView.j;
|
2021-11-08 18:25:28 +00:00
|
|
|
Objects.requireNonNull(overlayMenuView2);
|
|
|
|
overlayMenuView2.getContext().startActivity(IntentUtils.RouteBuilders.INSTANCE.connectVoice(valueOf2 != null ? valueOf2.longValue() : 0).setClass(overlayMenuView2.getContext(), AppActivity.Main.class).addFlags(268435456));
|
2021-12-17 22:03:14 +00:00
|
|
|
overlayMenuView2.m.mo1invoke();
|
2021-06-27 20:44:35 +00:00
|
|
|
} else {
|
|
|
|
throw null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|