133 lines
3.8 KiB
Smali
133 lines
3.8 KiB
Smali
.class public final Lcom/discord/widgets/settings/premium/WidgetSettingsGifting$configureUI$2;
|
|
.super Lt/u/b/k;
|
|
.source "WidgetSettingsGifting.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;->configureUI(Lcom/discord/widgets/settings/premium/WidgetSettingsGiftingViewModel$ViewState;)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lt/u/b/k;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic this$0:Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsGifting$configureUI$2;->this$0:Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
invoke-direct {p0, p1}, Lt/u/b/k;-><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, Ljava/lang/String;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/settings/premium/WidgetSettingsGifting$configureUI$2;->invoke(Ljava/lang/String;)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final invoke(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsGifting$configureUI$2;->this$0:Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;
|
|
|
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v2, "clipboard"
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
instance-of v2, v1, Landroid/content/ClipboardManager;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object v0, v1
|
|
|
|
:goto_1
|
|
check-cast v0, Landroid/content/ClipboardManager;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
sget-object v1, Lcom/discord/utilities/gifting/GiftingUtils;->INSTANCE:Lcom/discord/utilities/gifting/GiftingUtils;
|
|
|
|
invoke-virtual {v1, p1}, Lcom/discord/utilities/gifting/GiftingUtils;->generateGiftUrl(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, ""
|
|
|
|
invoke-static {v2, v1}, Landroid/content/ClipData;->newPlainText(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Landroid/content/ClipData;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/ClipboardManager;->setPrimaryClip(Landroid/content/ClipData;)V
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/premium/WidgetSettingsGifting$configureUI$2;->this$0:Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;->access$getViewModel$p(Lcom/discord/widgets/settings/premium/WidgetSettingsGifting;)Lcom/discord/widgets/settings/premium/WidgetSettingsGiftingViewModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/widgets/settings/premium/WidgetSettingsGiftingViewModel;->handleCopyClicked(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string p1, "giftCode"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|