40 lines
1.8 KiB
Java
40 lines
1.8 KiB
Java
package com.discord.gateway;
|
|
|
|
import com.discord.gateway.GatewayDiscovery;
|
|
import d0.z.d.o;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: GatewayDiscovery.kt */
|
|
public final class GatewayDiscovery$discoverGatewayUrl$2 extends o implements Function1<String, Unit> {
|
|
public final /* synthetic */ GatewayDiscovery$discoverGatewayUrl$1 $handleFailure$1;
|
|
public final /* synthetic */ Function1 $onSuccess;
|
|
public final /* synthetic */ GatewayDiscovery this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public GatewayDiscovery$discoverGatewayUrl$2(GatewayDiscovery gatewayDiscovery, GatewayDiscovery$discoverGatewayUrl$1 gatewayDiscovery$discoverGatewayUrl$1, Function1 function1) {
|
|
super(1);
|
|
this.this$0 = gatewayDiscovery;
|
|
this.$handleFailure$1 = gatewayDiscovery$discoverGatewayUrl$1;
|
|
this.$onSuccess = function1;
|
|
}
|
|
|
|
/* 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(String str) {
|
|
invoke(str);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(String str) {
|
|
if (str == null) {
|
|
this.$handleFailure$1.invoke(new Throwable("Malformed gateway url."));
|
|
return;
|
|
}
|
|
GatewayDiscovery.access$setGatewayUrl$p(this.this$0, str);
|
|
GatewayDiscovery.Cache.INSTANCE.setGatewayUrl(str);
|
|
Function1 access$getLog$p = GatewayDiscovery.access$getLog$p(this.this$0);
|
|
access$getLog$p.invoke("Discovered gateway url: " + str);
|
|
this.$onSuccess.invoke(str);
|
|
}
|
|
}
|