147 lines
4.8 KiB
Smali
147 lines
4.8 KiB
Smali
.class public final Lcom/discord/widgets/guilds/invite/GuildInviteUiHelperKt;
|
|
.super Ljava/lang/Object;
|
|
.source "GuildInviteUiHelper.kt"
|
|
|
|
|
|
# direct methods
|
|
.method public static final copyLinkClick(Landroid/content/Context;Lcom/discord/models/domain/ModelInvite;Landroid/content/Intent;)V
|
|
.locals 1
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "mostRecentIntent"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "com.discord.intent.ORIGIN_SOURCE"
|
|
|
|
invoke-virtual {p2, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
const-string p2, ""
|
|
|
|
:cond_0
|
|
invoke-static {p1, p2}, Lcom/discord/utilities/analytics/AnalyticsTracker;->inviteCopied(Lcom/discord/models/domain/ModelInvite;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "context.resources"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1, p2}, Lcom/discord/widgets/guilds/invite/GuildInviteUiHelperKt;->getInviteLink(Lcom/discord/models/domain/ModelInvite;Landroid/content/res/Resources;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/lang/CharSequence;
|
|
|
|
const p2, 0x7f120a30
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/app/h;->b(Landroid/content/Context;Ljava/lang/CharSequence;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static final getInviteLink(Lcom/discord/models/domain/ModelInvite;Landroid/content/res/Resources;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "https://discord.gg"
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, v0}, Lcom/discord/models/domain/ModelInvite;->toLink(Landroid/content/res/Resources;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string p1, "inviteModel.toLink(resou\u2026 BuildConfig.HOST_INVITE)"
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final shareLinkClick(Landroid/content/Context;Lcom/discord/models/domain/ModelInvite;Z)V
|
|
.locals 2
|
|
|
|
const-string v0, "invite"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/analytics/AnalyticsTracker;->inviteShareClicked(Lcom/discord/models/domain/ModelInvite;)V
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "context.resources"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1, v0}, Lcom/discord/widgets/guilds/invite/GuildInviteUiHelperKt;->getInviteLink(Lcom/discord/models/domain/ModelInvite;Landroid/content/res/Resources;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f1209cb
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "\n"
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
const-string p2, "if (isInTreatment)\n \u2026 else\n inviteLink"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p2
|
|
|
|
const v0, 0x7f12118e
|
|
|
|
invoke-virtual {p2, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "context.resources.getStr\u2026ip_instant_invite_title3)"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p0, p1, p2}, Lcom/discord/utilities/intent/IntentUtils;->performChooserSendIntent(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|