107 lines
2.8 KiB
Smali
107 lines
2.8 KiB
Smali
.class public final Lcom/discord/workers/BackgroundMessageSendWorker;
|
|
.super Landroidx/work/Worker;
|
|
.source "BackgroundMessageSendWorker.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroidx/work/WorkerParameters;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Landroidx/work/Worker;-><init>(Landroid/content/Context;Landroidx/work/WorkerParameters;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "params"
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lk0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public doWork()Landroidx/work/ListenableWorker$Result;
|
|
.locals 2
|
|
|
|
invoke-virtual {p0}, Landroidx/work/ListenableWorker;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Landroid/app/Application;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Landroid/app/Application;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/stores/StoreStream$Companion;->initialize(Landroid/app/Application;)V
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMessages()Lcom/discord/stores/StoreMessages;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMessages;->observeInitResendFinished()Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/workers/BackgroundMessageSendWorker$a;->d:Lcom/discord/workers/BackgroundMessageSendWorker$a;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->w(Ls0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->V(I)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ls0/m/b;
|
|
|
|
invoke-direct {v1, v0}, Ls0/m/b;-><init>(Lrx/Observable;)V
|
|
|
|
invoke-virtual {v1}, Ls0/m/b;->a()Ljava/lang/Object;
|
|
|
|
invoke-static {}, Landroidx/work/ListenableWorker$Result;->success()Landroidx/work/ListenableWorker$Result;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Result.success()"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
invoke-static {}, Landroidx/work/ListenableWorker$Result;->failure()Landroidx/work/ListenableWorker$Result;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Result.failure()"
|
|
|
|
invoke-static {v0, v1}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|