discord-jadx/app/src/main/java/com/discord/stores/StoreUserTyping$setUserTypi...

82 lines
3.9 KiB
Java

package com.discord.stores;
import com.discord.models.domain.ModelTypingResponse;
import com.discord.stores.StoreSlowMode;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: StoreUserTyping.kt */
public final class StoreUserTyping$setUserTyping$1 extends o implements Function1<ModelTypingResponse, Unit> {
public final /* synthetic */ long $channelId;
public final /* synthetic */ StoreUserTyping this$0;
/* compiled from: StoreUserTyping.kt */
/* renamed from: com.discord.stores.StoreUserTyping$setUserTyping$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ long $messageSendCooldownSecs;
public final /* synthetic */ StoreUserTyping$setUserTyping$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreUserTyping$setUserTyping$1 storeUserTyping$setUserTyping$1, long j) {
super(0);
this.this$0 = storeUserTyping$setUserTyping$1;
this.$messageSendCooldownSecs = j;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreStream.Companion.getSlowMode().onCooldown(this.this$0.$channelId, this.$messageSendCooldownSecs, StoreSlowMode.Type.MessageSend.INSTANCE);
}
}
/* compiled from: StoreUserTyping.kt */
/* renamed from: com.discord.stores.StoreUserTyping$setUserTyping$1$2 reason: invalid class name */
public static final class AnonymousClass2 extends o implements Function0<Unit> {
public final /* synthetic */ long $threadCreateCooldown;
public final /* synthetic */ StoreUserTyping$setUserTyping$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass2(StoreUserTyping$setUserTyping$1 storeUserTyping$setUserTyping$1, long j) {
super(0);
this.this$0 = storeUserTyping$setUserTyping$1;
this.$threadCreateCooldown = j;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreStream.Companion.getSlowMode().onCooldown(this.this$0.$channelId, this.$threadCreateCooldown, StoreSlowMode.Type.ThreadCreate.INSTANCE);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreUserTyping$setUserTyping$1(StoreUserTyping storeUserTyping, long j) {
super(1);
this.this$0 = storeUserTyping;
this.$channelId = j;
}
/* 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(ModelTypingResponse modelTypingResponse) {
invoke(modelTypingResponse);
return Unit.a;
}
public final void invoke(ModelTypingResponse modelTypingResponse) {
Long threadCreateCooldownMs;
Long messageSendCooldownMs;
long longValue = (modelTypingResponse == null || (messageSendCooldownMs = modelTypingResponse.getMessageSendCooldownMs()) == null) ? 0 : messageSendCooldownMs.longValue();
if (longValue > 0) {
StoreUserTyping.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this, longValue));
}
long longValue2 = (modelTypingResponse == null || (threadCreateCooldownMs = modelTypingResponse.getThreadCreateCooldownMs()) == null) ? 0 : threadCreateCooldownMs.longValue();
if (longValue2 > 0) {
StoreUserTyping.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass2(this, longValue2));
}
}
}