ChatAttachAlert$1.smali

.class Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;
.super Lim/tpelyyftgw/ui/components/ChatAttachAlert$BasePhotoProvider;
.source "ChatAttachAlert.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lim/tpelyyftgw/ui/components/ChatAttachAlert;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method constructor <init>(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)V
    .registers 3
    .param p1, "this$0"    # Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    .line 361
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    const/4 v0, 0x0

    invoke-direct {p0, p1, v0}, Lim/tpelyyftgw/ui/components/ChatAttachAlert$BasePhotoProvider;-><init>(Lim/tpelyyftgw/ui/components/ChatAttachAlert;Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;)V

    return-void
.end method


# virtual methods
.method public cancelButtonPressed()Z
    .registers 2

    .line 439
    const/4 v0, 0x0

    return v0
.end method

.method public getPlaceForPhoto(Lim/tpelyyftgw/messenger/MessageObject;Lim/tpelyyftgw/tgnet/TLRPC$FileLocation;IZ)Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;
    .registers 10
    .param p1, "messageObject"    # Lim/tpelyyftgw/messenger/MessageObject;
    .param p2, "fileLocation"    # Lim/tpelyyftgw/tgnet/TLRPC$FileLocation;
    .param p3, "index"    # I
    .param p4, "needPreview"    # Z

    .line 364
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v0, p3}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1000(Lim/tpelyyftgw/ui/components/ChatAttachAlert;I)Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;

    move-result-object v0

    .line 365
    .local v0, "cell":Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;
    if-eqz v0, :cond_56

    .line 366
    const/4 v1, 0x2

    new-array v1, v1, [I

    .line 367
    .local v1, "coords":[I
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v2

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/BackupImageView;->getLocationInWindow([I)V

    .line 368
    sget v2, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v3, 0x1a

    const/4 v4, 0x0

    if-ge v2, v3, :cond_24

    .line 369
    aget v2, v1, v4

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v3}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1100(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)I

    move-result v3

    sub-int/2addr v2, v3

    aput v2, v1, v4

    .line 371
    :cond_24
    new-instance v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;

    invoke-direct {v2}, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;-><init>()V

    .line 372
    .local v2, "object":Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;
    aget v3, v1, v4

    iput v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->viewX:I

    .line 373
    const/4 v3, 0x1

    aget v3, v1, v3

    iput v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->viewY:I

    .line 374
    iget-object v3, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v3}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$500(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)Lim/tpelyyftgw/ui/components/RecyclerListView;

    move-result-object v3

    iput-object v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->parentView:Landroid/view/View;

    .line 375
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v3

    invoke-virtual {v3}, Lim/tpelyyftgw/ui/components/BackupImageView;->getImageReceiver()Lim/tpelyyftgw/messenger/ImageReceiver;

    move-result-object v3

    iput-object v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;

    .line 376
    iget-object v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;

    invoke-virtual {v3}, Lim/tpelyyftgw/messenger/ImageReceiver;->getBitmapSafe()Lim/tpelyyftgw/messenger/ImageReceiver$BitmapHolder;

    move-result-object v3

    iput-object v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->thumb:Lim/tpelyyftgw/messenger/ImageReceiver$BitmapHolder;

    .line 377
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getScale()F

    move-result v3

    iput v3, v2, Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;->scale:F

    .line 378
    invoke-virtual {v0, v4}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->showCheck(Z)V

    .line 379
    return-object v2

    .line 381
    .end local v1    # "coords":[I
    .end local v2    # "object":Lim/tpelyyftgw/ui/PhotoViewer$PlaceProviderObject;
    :cond_56
    const/4 v1, 0x0

    return-object v1
.end method

.method public getThumbForPhoto(Lim/tpelyyftgw/messenger/MessageObject;Lim/tpelyyftgw/tgnet/TLRPC$FileLocation;I)Lim/tpelyyftgw/messenger/ImageReceiver$BitmapHolder;
    .registers 6
    .param p1, "messageObject"    # Lim/tpelyyftgw/messenger/MessageObject;
    .param p2, "fileLocation"    # Lim/tpelyyftgw/tgnet/TLRPC$FileLocation;
    .param p3, "index"    # I

    .line 410
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v0, p3}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1000(Lim/tpelyyftgw/ui/components/ChatAttachAlert;I)Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;

    move-result-object v0

    .line 411
    .local v0, "cell":Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;
    if-eqz v0, :cond_15

    .line 412
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v1

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/BackupImageView;->getImageReceiver()Lim/tpelyyftgw/messenger/ImageReceiver;

    move-result-object v1

    invoke-virtual {v1}, Lim/tpelyyftgw/messenger/ImageReceiver;->getBitmapSafe()Lim/tpelyyftgw/messenger/ImageReceiver$BitmapHolder;

    move-result-object v1

    return-object v1

    .line 414
    :cond_15
    const/4 v1, 0x0

    return-object v1
.end method

.method public sendButtonPressed(ILim/tpelyyftgw/messenger/VideoEditedInfo;ZI)V
    .registers 9
    .param p1, "index"    # I
    .param p2, "videoEditedInfo"    # Lim/tpelyyftgw/messenger/VideoEditedInfo;
    .param p3, "notify"    # Z
    .param p4, "scheduleDate"    # I

    .line 444
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v0, p1}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$000(Lim/tpelyyftgw/ui/components/ChatAttachAlert;I)Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;

    move-result-object v0

    .line 445
    .local v0, "photoEntry":Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;
    if-eqz v0, :cond_a

    .line 446
    iput-object p2, v0, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->editedInfo:Lim/tpelyyftgw/messenger/VideoEditedInfo;

    .line 448
    :cond_a
    invoke-static {}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$100()Ljava/util/HashMap;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/HashMap;->isEmpty()Z

    move-result v1

    if-eqz v1, :cond_1c

    if-eqz v0, :cond_1c

    .line 449
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    const/4 v2, -0x1

    invoke-static {v1, v0, v2}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$300(Lim/tpelyyftgw/ui/components/ChatAttachAlert;Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;I)I

    .line 451
    :cond_1c
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v1}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1200(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)V

    .line 452
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v1}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1300(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)Lim/tpelyyftgw/ui/components/ChatAttachAlert$ChatAttachViewDelegate;

    move-result-object v1

    const/4 v2, 0x7

    const/4 v3, 0x1

    invoke-interface {v1, v2, v3, p3, p4}, Lim/tpelyyftgw/ui/components/ChatAttachAlert$ChatAttachViewDelegate;->didPressedButton(IZZI)V

    .line 453
    return-void
.end method

.method public updatePhotoAtIndex(I)V
    .registers 9
    .param p1, "index"    # I

    .line 386
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v0, p1}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1000(Lim/tpelyyftgw/ui/components/ChatAttachAlert;I)Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;

    move-result-object v0

    .line 387
    .local v0, "cell":Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;
    if-eqz v0, :cond_91

    .line 388
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v1

    const/4 v2, 0x0

    const/4 v3, 0x1

    invoke-virtual {v1, v2, v3}, Lim/tpelyyftgw/ui/components/BackupImageView;->setOrientation(IZ)V

    .line 389
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v1, p1}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$000(Lim/tpelyyftgw/ui/components/ChatAttachAlert;I)Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;

    move-result-object v1

    .line 390
    .local v1, "photoEntry":Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;
    if-nez v1, :cond_1a

    .line 391
    return-void

    .line 393
    :cond_1a
    iget-object v2, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->thumbPath:Ljava/lang/String;

    const/4 v4, 0x0

    if-eqz v2, :cond_2b

    .line 394
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v2

    iget-object v3, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->thumbPath:Ljava/lang/String;

    sget-object v5, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_attachEmptyDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2, v3, v4, v5}, Lim/tpelyyftgw/ui/components/BackupImageView;->setImage(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    goto :goto_91

    .line 395
    :cond_2b
    iget-object v2, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->path:Ljava/lang/String;

    if-eqz v2, :cond_88

    .line 396
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v2

    iget v5, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->orientation:I

    invoke-virtual {v2, v5, v3}, Lim/tpelyyftgw/ui/components/BackupImageView;->setOrientation(IZ)V

    .line 397
    iget-boolean v2, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->isVideo:Z

    const-string v3, ":"

    if-eqz v2, :cond_63

    .line 398
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v2

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "vthumb://"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v6, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->imageId:I

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->path:Ljava/lang/String;

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    sget-object v5, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_attachEmptyDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2, v3, v4, v5}, Lim/tpelyyftgw/ui/components/BackupImageView;->setImage(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    goto :goto_91

    .line 400
    :cond_63
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v2

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "thumb://"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v6, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->imageId:I

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v3, v1, Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;->path:Ljava/lang/String;

    invoke-virtual {v5, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    sget-object v5, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_attachEmptyDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2, v3, v4, v5}, Lim/tpelyyftgw/ui/components/BackupImageView;->setImage(Ljava/lang/String;Ljava/lang/String;Landroid/graphics/drawable/Drawable;)V

    goto :goto_91

    .line 403
    :cond_88
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->getImageView()Lim/tpelyyftgw/ui/components/BackupImageView;

    move-result-object v2

    sget-object v3, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_attachEmptyDrawable:Landroid/graphics/drawable/Drawable;

    invoke-virtual {v2, v3}, Lim/tpelyyftgw/ui/components/BackupImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 406
    .end local v1    # "photoEntry":Lim/tpelyyftgw/messenger/MediaController$PhotoEntry;
    :cond_91
    :goto_91
    return-void
.end method

.method public willHidePhotoViewer()V
    .registers 6

    .line 427
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$500(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)Lim/tpelyyftgw/ui/components/RecyclerListView;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/RecyclerListView;->getChildCount()I

    move-result v0

    .line 428
    .local v0, "count":I
    const/4 v1, 0x0

    .local v1, "a":I
    :goto_b
    if-ge v1, v0, :cond_25

    .line 429
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v2}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$500(Lim/tpelyyftgw/ui/components/ChatAttachAlert;)Lim/tpelyyftgw/ui/components/RecyclerListView;

    move-result-object v2

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/RecyclerListView;->getChildAt(I)Landroid/view/View;

    move-result-object v2

    .line 430
    .local v2, "view":Landroid/view/View;
    instance-of v3, v2, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;

    if-eqz v3, :cond_22

    .line 431
    move-object v3, v2

    check-cast v3, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;

    .line 432
    .local v3, "cell":Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;
    const/4 v4, 0x1

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->showCheck(Z)V

    .line 428
    .end local v2    # "view":Landroid/view/View;
    .end local v3    # "cell":Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;
    :cond_22
    add-int/lit8 v1, v1, 0x1

    goto :goto_b

    .line 435
    .end local v1    # "a":I
    :cond_25
    return-void
.end method

.method public willSwitchFromPhoto(Lim/tpelyyftgw/messenger/MessageObject;Lim/tpelyyftgw/tgnet/TLRPC$FileLocation;I)V
    .registers 6
    .param p1, "messageObject"    # Lim/tpelyyftgw/messenger/MessageObject;
    .param p2, "fileLocation"    # Lim/tpelyyftgw/tgnet/TLRPC$FileLocation;
    .param p3, "index"    # I

    .line 419
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatAttachAlert$1;->this$0:Lim/tpelyyftgw/ui/components/ChatAttachAlert;

    invoke-static {v0, p3}, Lim/tpelyyftgw/ui/components/ChatAttachAlert;->access$1000(Lim/tpelyyftgw/ui/components/ChatAttachAlert;I)Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;

    move-result-object v0

    .line 420
    .local v0, "cell":Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;
    if-eqz v0, :cond_c

    .line 421
    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/cells/PhotoAttachPhotoCell;->showCheck(Z)V

    .line 423
    :cond_c
    return-void
.end method