35 lines
1.6 KiB
Java
35 lines
1.6 KiB
Java
|
package com.discord.stores;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import androidx.work.Constraints;
|
||
|
import androidx.work.ExistingWorkPolicy;
|
||
|
import androidx.work.NetworkType;
|
||
|
import androidx.work.OneTimeWorkRequest;
|
||
|
import androidx.work.WorkManager;
|
||
|
import com.discord.workers.BackgroundMessageSendWorker;
|
||
|
import d0.z.d.m;
|
||
|
import d0.z.d.o;
|
||
|
import java.util.concurrent.TimeUnit;
|
||
|
import kotlin.Unit;
|
||
|
import kotlin.jvm.functions.Function0;
|
||
|
/* compiled from: StoreMessages.kt */
|
||
|
public final class StoreMessages$sendMessage$4 extends o implements Function0<Unit> {
|
||
|
public final /* synthetic */ StoreMessages this$0;
|
||
|
|
||
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
||
|
public StoreMessages$sendMessage$4(StoreMessages storeMessages) {
|
||
|
super(0);
|
||
|
this.this$0 = storeMessages;
|
||
|
}
|
||
|
|
||
|
@Override // kotlin.jvm.functions.Function0
|
||
|
/* renamed from: invoke */
|
||
|
public final void mo1invoke() {
|
||
|
Context access$getContext$p = StoreMessages.access$getContext$p(this.this$0);
|
||
|
m.checkNotNullParameter(access$getContext$p, "context");
|
||
|
OneTimeWorkRequest build = new OneTimeWorkRequest.Builder(BackgroundMessageSendWorker.class).setInitialDelay(120000, TimeUnit.MILLISECONDS).setConstraints(new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build()).build();
|
||
|
m.checkNotNullExpressionValue(build, "OneTimeWorkRequestBuilde… )\n .build()");
|
||
|
WorkManager.getInstance(access$getContext$p).enqueueUniqueWork("BACKGROUND_MESSAGE_SENDING", ExistingWorkPolicy.REPLACE, build);
|
||
|
}
|
||
|
}
|