632 lines
20 KiB
Smali
632 lines
20 KiB
Smali
.class public final Lcom/discord/widgets/friends/WidgetFriendsAdd;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetFriendsAdd.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
|
|
.field public static final PATTERN_USERNAME:Lkotlin/text/Regex;
|
|
|
|
|
|
# instance fields
|
|
.field public hasTrackedSuggestionCount:Z
|
|
|
|
.field public final inputEditText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final inputEditTextWrap$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final send$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lw/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/widgets/friends/WidgetFriendsAdd;
|
|
|
|
invoke-static {v2}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "inputEditText"
|
|
|
|
const-string v4, "getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lw/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Lw/u/b/w;->a:Lw/u/b/x;
|
|
|
|
invoke-virtual {v2, v1}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Lw/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/friends/WidgetFriendsAdd;
|
|
|
|
invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "inputEditTextWrap"
|
|
|
|
const-string v5, "getInputEditTextWrap()Lcom/google/android/material/textfield/TextInputLayout;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lw/u/b/w;->a:Lw/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Lw/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/friends/WidgetFriendsAdd;
|
|
|
|
invoke-static {v3}, Lw/u/b/w;->getOrCreateKotlinClass(Ljava/lang/Class;)Lw/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "send"
|
|
|
|
const-string v5, "getSend()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lw/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lw/u/b/w;->a:Lw/u/b/x;
|
|
|
|
invoke-virtual {v3, v2}, Lw/u/b/x;->property1(Lw/u/b/t;)Lw/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->Companion:Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
|
|
new-instance v0, Lkotlin/text/Regex;
|
|
|
|
const-string v1, "^(.*)#(\\d{4})$"
|
|
|
|
invoke-direct {v0, v1}, Lkotlin/text/Regex;-><init>(Ljava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->PATTERN_USERNAME:Lkotlin/text/Regex;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
const v0, 0x7f0a032d
|
|
|
|
invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->inputEditText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a032e
|
|
|
|
invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->inputEditTextWrap$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a032c
|
|
|
|
invoke-static {p0, v0}, Lx/a/a2/w;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->send$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$extractTargetAndSendFriendRequest(Lcom/discord/widgets/friends/WidgetFriendsAdd;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->extractTargetAndSendFriendRequest()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getInputEditText$p(Lcom/discord/widgets/friends/WidgetFriendsAdd;)Landroidx/appcompat/widget/AppCompatEditText;
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getInputEditTextWrap$p(Lcom/discord/widgets/friends/WidgetFriendsAdd;)Lcom/google/android/material/textfield/TextInputLayout;
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditTextWrap()Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getPATTERN_USERNAME$cp()Lkotlin/text/Regex;
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->PATTERN_USERNAME:Lkotlin/text/Regex;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getSend$p(Lcom/discord/widgets/friends/WidgetFriendsAdd;)Landroid/widget/TextView;
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getSend()Landroid/widget/TextView;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final extractTargetAndSendFriendRequest()V
|
|
.locals 5
|
|
|
|
sget-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->Companion:Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, ""
|
|
|
|
:goto_0
|
|
invoke-static {v0, v1}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;->access$extractUsernameAndDiscriminator(Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;Ljava/lang/CharSequence;)Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion$UserNameDiscriminator;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion$UserNameDiscriminator;->getDiscriminator()Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion$UserNameDiscriminator;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion$UserNameDiscriminator;->getDiscriminator()Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0, v1, v0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->sendFriendRequest(Ljava/lang/String;I)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditTextWrap()Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f130213
|
|
|
|
invoke-virtual {v1, v2}, Lcom/google/android/material/textfield/TextInputLayout;->setErrorTextAppearance(I)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditTextWrap()Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f120089
|
|
|
|
const/4 v3, 0x1
|
|
|
|
new-array v3, v3, [Ljava/lang/Object;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion$UserNameDiscriminator;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v3, v4
|
|
|
|
invoke-virtual {p0, v2, v3}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Lcom/google/android/material/textfield/TextInputLayout;->setError(Ljava/lang/CharSequence;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AnalyticsTracker;->INSTANCE:Lcom/discord/utilities/analytics/AnalyticsTracker;
|
|
|
|
const-string v1, "Invalid Username"
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/analytics/AnalyticsTracker;->friendRequestFailed(Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->inputEditText$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/friends/WidgetFriendsAdd;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getInputEditTextWrap()Lcom/google/android/material/textfield/TextInputLayout;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->inputEditTextWrap$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/friends/WidgetFriendsAdd;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getSend()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->send$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/friends/WidgetFriendsAdd;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final sendFriendRequest(Ljava/lang/String;I)V
|
|
.locals 2
|
|
|
|
sget-object v0, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Search - Add Friend Search"
|
|
|
|
invoke-virtual {v0, v1, p1, p2}, Lcom/discord/utilities/rest/RestAPI;->sendRelationshipRequest(Ljava/lang/String;Ljava/lang/String;I)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
invoke-static {p2, p0, v0, v1, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Lcom/discord/widgets/friends/WidgetFriendsAdd$sendFriendRequest$1;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/discord/widgets/friends/WidgetFriendsAdd$sendFriendRequest$1;-><init>(Lcom/discord/widgets/friends/WidgetFriendsAdd;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/discord/widgets/friends/WidgetFriendsAdd$sendFriendRequest$2;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$sendFriendRequest$2;-><init>(Lcom/discord/widgets/friends/WidgetFriendsAdd;)V
|
|
|
|
invoke-static {v0, p1, v1}, Le/a/b/k;->a(Lrx/functions/Action1;Landroid/content/Context;Lrx/functions/Action1;)Lrx/Observable$c;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final show(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->Companion:Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v3, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;->show$default(Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final show(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->Companion:Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;
|
|
|
|
invoke-virtual {v0, p0, p1, p2}, Lcom/discord/widgets/friends/WidgetFriendsAdd$Companion;->show(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d017f
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
const/4 p1, 0x3
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, v1, v0, p1, v0}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled$default(Lcom/discord/app/AppFragment;ZLjava/lang/Integer;ILjava/lang/Object;)Landroidx/appcompat/widget/Toolbar;
|
|
|
|
const p1, 0x7f1206d9
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->setActionBarTitle(I)Lkotlin/Unit;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getSend()Landroid/widget/TextView;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v2, Lcom/discord/widgets/friends/WidgetFriendsAdd$onViewBound$1;
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$onViewBound$1;-><init>(Lcom/discord/widgets/friends/WidgetFriendsAdd;)V
|
|
|
|
invoke-virtual {p1, v2}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v2, Lcom/discord/widgets/friends/WidgetFriendsAdd$onViewBound$2;
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$onViewBound$2;-><init>(Lcom/discord/widgets/friends/WidgetFriendsAdd;)V
|
|
|
|
invoke-static {p1, p0, v2}, Lcom/discord/utilities/view/text/TextWatcherKt;->addBindedTextWatcher(Landroid/widget/TextView;Landroidx/fragment/app/Fragment;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v2, Lcom/discord/widgets/friends/WidgetFriendsAdd$onViewBound$3;
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd$onViewBound$3;-><init>(Lcom/discord/widgets/friends/WidgetFriendsAdd;)V
|
|
|
|
invoke-virtual {p1, v2}, Landroid/widget/EditText;->setOnEditorActionListener(Landroid/widget/TextView$OnEditorActionListener;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, "android.intent.extra.TEXT"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {v0}, Lw/a0/n;->isBlank(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
:cond_2
|
|
if-nez v1, :cond_3
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/EditText;->setSelection(I)V
|
|
|
|
:cond_3
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {p1}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
const/16 v0, 0x30
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/Window;->setSoftInputMode(I)V
|
|
|
|
:cond_4
|
|
return-void
|
|
|
|
:cond_5
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/friends/WidgetFriendsAdd;->getInputEditText()Landroidx/appcompat/widget/AppCompatEditText;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-ne v0, v2, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_1
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->hasTrackedSuggestionCount:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iput-boolean v2, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->hasTrackedSuggestionCount:Z
|
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/AnalyticsTracker;->INSTANCE:Lcom/discord/utilities/analytics/AnalyticsTracker;
|
|
|
|
const-string v1, "Add Friends Suggestions"
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/analytics/AnalyticsTracker;->friendAddViewed(Ljava/lang/String;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public setUserVisibleHint(Z)V
|
|
.locals 0
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->setUserVisibleHint(Z)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/friends/WidgetFriendsAdd;->hasTrackedSuggestionCount:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|