596 lines
18 KiB
Smali
596 lines
18 KiB
Smali
.class public Lcom/discord/widgets/chat/input/WidgetChatInputEditText;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetChatInputEditText.java"
|
|
|
|
|
|
# instance fields
|
|
.field public channelId:J
|
|
|
|
.field public editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
.field public final emptyTextSubject:Lrx/subjects/Subject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/Subject<",
|
|
"Ljava/lang/Boolean;",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public lastTypingEmissionMillis:J
|
|
|
|
.field public mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputMentions<",
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public mentionsAdapter:Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;
|
|
|
|
.field public onSendListener:Lrx/functions/Action0;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/lytefast/flexinput/widget/FlexEditText;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sget-object v0, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->i0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->emptyTextSubject:Lrx/subjects/Subject;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
new-instance v0, Lf/a/o/b/a/u;
|
|
|
|
invoke-direct {v0, p0, p1}, Lf/a/o/b/a/u;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;Lcom/lytefast/flexinput/widget/FlexEditText;)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/lytefast/flexinput/widget/FlexEditText;->setOnSelectionChangedListener(Lkotlin/jvm/functions/Function2;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->init()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Ljava/lang/Boolean;Ljava/lang/Boolean;)Ljava/lang/Boolean;
|
|
.locals 0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$000(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)Lrx/subjects/Subject;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->emptyTextSubject:Lrx/subjects/Subject;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$100(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)J
|
|
.locals 2
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->lastTypingEmissionMillis:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public static synthetic access$102(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;J)J
|
|
.locals 0
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->lastTypingEmissionMillis:J
|
|
|
|
return-wide p1
|
|
.end method
|
|
|
|
.method public static synthetic b(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->onClickMentionItem(Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private init()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->setOnTextChangedListener()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->setSoftwareKeyboardSendBehavior()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->setHardwareKeyboardSendBehavior()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private onClickMentionItem(Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;->getDisplayTag()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;->insertMention(Landroid/widget/EditText;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;->getType()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getEmojis()Lcom/discord/stores/StoreEmoji;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;->getEmoji()Lcom/discord/models/domain/emoji/Emoji;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreEmoji;->onEmojiUsed(Lcom/discord/models/domain/emoji/Emoji;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private setHardwareKeyboardSendBehavior()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
new-instance v1, Lf/a/o/b/a/s;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/o/b/a/s;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/EditText;->setOnKeyListener(Landroid/view/View$OnKeyListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setOnTextChangedListener()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
new-instance v1, Lcom/discord/widgets/chat/input/WidgetChatInputEditText$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText$1;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setSoftwareKeyboardSendBehavior()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
new-instance v1, Lf/a/o/b/a/r;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/o/b/a/r;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/EditText;->setOnEditorActionListener(Landroid/widget/TextView$OnEditorActionListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic c(Ljava/util/List;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentionsAdapter:Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;->setData(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public clearLastTypingEmission()V
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
iput-wide v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->lastTypingEmissionMillis:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public configureMentionsDataSubscriptions(Lcom/discord/app/AppFragment;)V
|
|
.locals 9
|
|
|
|
invoke-static {}, Lcom/discord/widgets/chat/input/expression/WidgetExpressionTray;->observeIsExpressionTrayActive()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->emptyTextSubject:Lrx/subjects/Subject;
|
|
|
|
sget-object v2, Lf/a/o/b/a/p;->d:Lf/a/o/b/a/p;
|
|
|
|
invoke-static {v0, v1, v2}, Lrx/Observable;->j(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
invoke-virtual {v2}, Landroid/widget/EditText;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;->get(Landroid/content/Context;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "defaultValue"
|
|
|
|
invoke-static {v2, v3}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lf/a/b/j0;->d:Lf/a/b/j0;
|
|
|
|
new-instance v4, Lf/a/b/k0;
|
|
|
|
invoke-direct {v4, v2}, Lf/a/b/k0;-><init>(Lrx/Observable;)V
|
|
|
|
invoke-static {v3, v1, v4}, Lf/a/b/s;->q(Lkotlin/jvm/functions/Function1;Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1}, Lf/a/b/s;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
new-instance v1, Lf/a/o/b/a/g0;
|
|
|
|
invoke-direct {v1, v0}, Lf/a/o/b/a/g0;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputMentions;)V
|
|
|
|
const-string v4, "mentionsData"
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const-string v0, "onNext"
|
|
|
|
invoke-static {v1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v5, "errorTag"
|
|
|
|
invoke-static {v4, v5}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v6, Lf/a/b/z;
|
|
|
|
invoke-direct {v6, v1}, Lf/a/b/z;-><init>(Lrx/functions/Action1;)V
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {v6, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v4, v5}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "observable"
|
|
|
|
invoke-static {v2, v0}, Lb0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v8, Lf/a/b/d0;->d:Lf/a/b/d0;
|
|
|
|
move-object v5, v1
|
|
|
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe(Lrx/Observable;Landroid/content/Context;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;->getOnPartialToken()Lrx/subjects/Subject;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p1, v0, v1}, Lcom/discord/stores/StoreGuilds$Actions;->requestMembers(Lcom/discord/app/AppComponent;Lrx/Observable;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic d(Lcom/lytefast/flexinput/widget/FlexEditText;Ljava/lang/Integer;Ljava/lang/Integer;)Lkotlin/Unit;
|
|
.locals 0
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-virtual {p2, p1}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;->processMentions(Landroid/widget/EditText;)V
|
|
|
|
:cond_0
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public synthetic e(Landroid/view/View;ILandroid/view/KeyEvent;)Z
|
|
.locals 3
|
|
|
|
invoke-virtual {p3}, Landroid/view/KeyEvent;->getFlags()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
and-int/2addr p1, v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
const/16 v0, 0x42
|
|
|
|
if-ne p2, v0, :cond_1
|
|
|
|
const/4 p2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p2, 0x0
|
|
|
|
:goto_1
|
|
if-eqz p2, :cond_5
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
invoke-virtual {p3, v2}, Landroid/view/KeyEvent;->hasModifiers(I)Z
|
|
|
|
move-result p1
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserSettings()Lcom/discord/stores/StoreUserSettings;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreUserSettings;->getShiftEnterToSend()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
:cond_2
|
|
if-nez p2, :cond_5
|
|
|
|
if-nez p1, :cond_5
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->onSendListener:Lrx/functions/Action0;
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {p3}, Landroid/view/KeyEvent;->getAction()I
|
|
|
|
move-result p1
|
|
|
|
if-ne p1, v2, :cond_4
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->onSendListener:Lrx/functions/Action0;
|
|
|
|
invoke-interface {p1}, Lrx/functions/Action0;->call()V
|
|
|
|
:cond_4
|
|
return v2
|
|
|
|
:cond_5
|
|
return v1
|
|
.end method
|
|
|
|
.method public synthetic f(Landroid/widget/TextView;ILandroid/view/KeyEvent;)Z
|
|
.locals 0
|
|
|
|
and-int/lit16 p1, p2, 0xff
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->onSendListener:Lrx/functions/Action0;
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p3, 0x6
|
|
|
|
if-ne p1, p3, :cond_0
|
|
|
|
invoke-interface {p2}, Lrx/functions/Action0;->call()V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getMatchedContentWithMetaData()Lcom/discord/models/domain/ModelMessage$Content;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;->toStringSafe(Landroid/widget/TextView;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->trim()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1, v0}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;->getMentions(Ljava/lang/String;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;->replaceMatches(Ljava/lang/String;Ljava/util/List;)Lcom/discord/models/domain/ModelMessage$Content;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
new-instance v1, Lcom/discord/models/domain/ModelMessage$Content;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {v1, v0, v2}, Lcom/discord/models/domain/ModelMessage$Content;-><init>(Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public initMentions(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;
|
|
|
|
new-instance v1, Lf/a/o/b/a/t;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/o/b/a/t;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)V
|
|
|
|
invoke-direct {v0, p1, v1}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lrx/functions/Action1;)V
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentionsAdapter:Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;
|
|
|
|
new-instance p1, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;-><init>(Landroid/widget/EditText;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->mentions:Lcom/discord/widgets/chat/input/WidgetChatInputMentions;
|
|
|
|
new-instance v0, Lf/a/o/b/a/q;
|
|
|
|
invoke-direct {v0, p0}, Lf/a/o/b/a/q;-><init>(Lcom/discord/widgets/chat/input/WidgetChatInputEditText;)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/widgets/chat/input/WidgetChatInputMentions;->setOnTagsMatched(Lcom/discord/widgets/chat/input/WidgetChatInputMentions$OnTagsMatched;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public saveText()V
|
|
.locals 4
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getChat()Lcom/discord/stores/StoreChat;
|
|
|
|
move-result-object v0
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->channelId:J
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->editText:Lcom/lytefast/flexinput/widget/FlexEditText;
|
|
|
|
invoke-virtual {v3}, Landroidx/appcompat/widget/AppCompatEditText;->getText()Landroid/text/Editable;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lcom/discord/stores/StoreChat;->setTextChannelInput(JLjava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setChannelId(JZ)V
|
|
.locals 0
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->saveText()V
|
|
|
|
:cond_0
|
|
iput-wide p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->channelId:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setOnSendListener(Lrx/functions/Action0;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputEditText;->onSendListener:Lrx/functions/Action0;
|
|
|
|
return-void
|
|
.end method
|