220 lines
7.2 KiB
Smali
220 lines
7.2 KiB
Smali
.class public final Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;
|
|
.super Lj0/o/c/i;
|
|
.source "WidgetIncomingShare.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/share/WidgetIncomingShare;->onSendClicked(Landroid/content/Context;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemDataPayload;Lcom/discord/widgets/chat/list/ViewEmbedGameInvite$Model;Lcom/discord/widgets/share/WidgetIncomingShare$ContentModel;ZIZ)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lj0/o/c/i;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lkotlin/Pair<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"+",
|
|
"Lcom/discord/utilities/messagesend/MessageResult;",
|
|
">;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $context:Landroid/content/Context;
|
|
|
|
.field public final synthetic $data:Ljava/util/List;
|
|
|
|
.field public final synthetic $receiver:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemDataPayload;
|
|
|
|
.field public final synthetic this$0:Lcom/discord/widgets/share/WidgetIncomingShare;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/share/WidgetIncomingShare;Ljava/util/List;Landroid/content/Context;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemDataPayload;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->this$0:Lcom/discord/widgets/share/WidgetIncomingShare;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$data:Ljava/util/List;
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$context:Landroid/content/Context;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$receiver:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemDataPayload;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
invoke-direct {p0, p1}, Lj0/o/c/i;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lkotlin/Pair;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->invoke(Lkotlin/Pair;)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final invoke(Lkotlin/Pair;)V
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/Pair<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"+",
|
|
"Lcom/discord/utilities/messagesend/MessageResult;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p1, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lcom/discord/models/domain/ModelUser;
|
|
|
|
iget-object p1, p1, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
check-cast p1, Lcom/discord/utilities/messagesend/MessageResult;
|
|
|
|
instance-of v1, p1, Lcom/discord/utilities/messagesend/MessageResult$Success;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->this$0:Lcom/discord/widgets/share/WidgetIncomingShare;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/share/WidgetIncomingShare;->access$onSendCompleted(Lcom/discord/widgets/share/WidgetIncomingShare;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$data:Ljava/util/List;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-static {p1}, Lj0/j/l;->firstOrNull(Ljava/util/List;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/net/Uri;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AnalyticsTracker;->INSTANCE:Lcom/discord/utilities/analytics/AnalyticsTracker;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/analytics/AnalyticsTracker;->externalShare(Landroid/net/Uri;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
instance-of v1, p1, Lcom/discord/utilities/messagesend/MessageResult$Slowmode;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
check-cast p1, Lcom/discord/utilities/messagesend/MessageResult$Slowmode;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/messagesend/MessageResult$Slowmode;->getCooldownMs()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, 0x3e8
|
|
|
|
div-long/2addr v0, v2
|
|
|
|
long-to-int p1, v0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ge p1, v0, :cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$context:Landroid/content/Context;
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "context.resources"
|
|
|
|
invoke-static {v1, v2}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$context:Landroid/content/Context;
|
|
|
|
const v3, 0x7f100024
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
aput-object v4, v0, v5
|
|
|
|
invoke-static {v1, v2, v3, p1, v0}, Lcom/discord/utilities/resources/StringResourceUtilsKt;->getQuantityString(Landroid/content/res/Resources;Landroid/content/Context;II[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->$context:Landroid/content/Context;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/16 v2, 0xc
|
|
|
|
invoke-static {v0, p1, v5, v1, v2}, Lf/a/b/p;->k(Landroid/content/Context;Ljava/lang/CharSequence;ILcom/discord/utilities/view/ToastManager;I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
instance-of v1, p1, Lcom/discord/utilities/messagesend/MessageResult$UnknownFailure;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/SendUtils;->INSTANCE:Lcom/discord/utilities/rest/SendUtils;
|
|
|
|
check-cast p1, Lcom/discord/utilities/messagesend/MessageResult$UnknownFailure;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/messagesend/MessageResult$UnknownFailure;->getError()Lcom/discord/utilities/error/Error;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;->this$0:Lcom/discord/widgets/share/WidgetIncomingShare;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
new-instance v3, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3$2;
|
|
|
|
invoke-direct {v3, p0, v0}, Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3$2;-><init>(Lcom/discord/widgets/share/WidgetIncomingShare$onSendClicked$3;Lcom/discord/models/domain/ModelUser;)V
|
|
|
|
invoke-virtual {v1, p1, v2, v3}, Lcom/discord/utilities/rest/SendUtils;->handleSendError(Lcom/discord/utilities/error/Error;Landroid/content/Context;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
nop
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return-void
|
|
.end method
|