PhotoViewerCaptionEnterView$4.smali
.class Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;
.super Ljava/lang/Object;
.source "PhotoViewerCaptionEnterView.java"
# interfaces
.implements Landroid/text/TextWatcher;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;-><init>(Landroid/content/Context;Lim/tpelyyftgw/ui/components/SizeNotifierFrameLayoutPhoto;Landroid/view/View;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field processChange:Z
.field final synthetic this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method constructor <init>(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)V
.registers 3
.param p1, "this$0" # Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
.line 235
iput-object p1, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 236
const/4 v0, 0x0
iput-boolean v0, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->processChange:Z
return-void
.end method
# virtual methods
.method public afterTextChanged(Landroid/text/Editable;)V
.registers 7
.param p1, "editable" # Landroid/text/Editable;
.line 260
iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$300(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)I
move-result v0
iget-object v1, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$400(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)Lim/tpelyyftgw/ui/components/EditTextCaption;
move-result-object v1
invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/EditTextCaption;->length()I
move-result v1
sub-int/2addr v0, v1
.line 261
.local v0, "charactersLeft":I
const/4 v1, 0x0
const/16 v2, 0x80
if-gt v0, v2, :cond_2b
.line 262
iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
const/4 v3, 0x1
new-array v3, v3, [Ljava/lang/Object;
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v3, v1
const-string v4, "%d"
invoke-static {v4, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$502(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;Ljava/lang/String;)Ljava/lang/String;
goto :goto_31
.line 264
:cond_2b
iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
const/4 v3, 0x0
invoke-static {v2, v3}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$502(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;Ljava/lang/String;)Ljava/lang/String;
.line 266
:goto_31
iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-virtual {v2}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->invalidate()V
.line 267
iget-object v2, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v2}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$100(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)Z
move-result v2
if-eqz v2, :cond_3f
.line 268
return-void
.line 270
:cond_3f
iget-boolean v2, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->processChange:Z
if-eqz v2, :cond_74
.line 271
invoke-interface {p1}, Landroid/text/Editable;->length()I
move-result v2
const-class v3, Landroid/text/style/ImageSpan;
invoke-interface {p1, v1, v2, v3}, Landroid/text/Editable;->getSpans(IILjava/lang/Class;)[Ljava/lang/Object;
move-result-object v2
check-cast v2, [Landroid/text/style/ImageSpan;
.line 272
.local v2, "spans":[Landroid/text/style/ImageSpan;
const/4 v3, 0x0
.local v3, "i":I
:goto_50
array-length v4, v2
if-ge v3, v4, :cond_5b
.line 273
aget-object v4, v2, v3
invoke-interface {p1, v4}, Landroid/text/Editable;->removeSpan(Ljava/lang/Object;)V
.line 272
add-int/lit8 v3, v3, 0x1
goto :goto_50
.line 275
.end local v3 # "i":I
:cond_5b
iget-object v3, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v3}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$400(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)Lim/tpelyyftgw/ui/components/EditTextCaption;
move-result-object v3
invoke-virtual {v3}, Lim/tpelyyftgw/ui/components/EditTextCaption;->getPaint()Landroid/text/TextPaint;
move-result-object v3
invoke-virtual {v3}, Landroid/text/TextPaint;->getFontMetricsInt()Landroid/graphics/Paint$FontMetricsInt;
move-result-object v3
const/high16 v4, 0x41a00000 # 20.0f
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
invoke-static {p1, v3, v4, v1}, Lim/tpelyyftgw/messenger/Emoji;->replaceEmoji(Ljava/lang/CharSequence;Landroid/graphics/Paint$FontMetricsInt;IZ)Ljava/lang/CharSequence;
.line 276
iput-boolean v1, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->processChange:Z
.line 278
.end local v2 # "spans":[Landroid/text/style/ImageSpan;
:cond_74
return-void
.end method
.method public beforeTextChanged(Ljava/lang/CharSequence;III)V
.registers 5
.param p1, "charSequence" # Ljava/lang/CharSequence;
.param p2, "i" # I
.param p3, "i2" # I
.param p4, "i3" # I
.line 241
return-void
.end method
.method public onTextChanged(Ljava/lang/CharSequence;III)V
.registers 7
.param p1, "charSequence" # Ljava/lang/CharSequence;
.param p2, "start" # I
.param p3, "before" # I
.param p4, "count" # I
.line 245
iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$100(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)Z
move-result v0
if-eqz v0, :cond_9
.line 246
return-void
.line 249
:cond_9
iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$200(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$PhotoViewerCaptionEnterViewDelegate;
move-result-object v0
if-eqz v0, :cond_1a
.line 250
iget-object v0, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->this$0:Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;->access$200(Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView;)Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$PhotoViewerCaptionEnterViewDelegate;
move-result-object v0
invoke-interface {v0, p1}, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$PhotoViewerCaptionEnterViewDelegate;->onTextChanged(Ljava/lang/CharSequence;)V
.line 253
:cond_1a
if-eq p3, p4, :cond_23
sub-int v0, p4, p3
const/4 v1, 0x1
if-le v0, v1, :cond_23
.line 254
iput-boolean v1, p0, Lim/tpelyyftgw/ui/components/PhotoViewerCaptionEnterView$4;->processChange:Z
.line 256
:cond_23
return-void
.end method