SharingLiveLocationCell.smali

.class public Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;
.super Landroid/widget/FrameLayout;
.source "SharingLiveLocationCell.java"


# instance fields
.field private avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

.field private avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

.field private currentAccount:I

.field private currentInfo:Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

.field private distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

.field private invalidateRunnable:Ljava/lang/Runnable;

.field private liveLocation:Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;

.field private location:Landroid/location/Location;

.field private nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

.field private rect:Landroid/graphics/RectF;


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

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;ZI)V
    .registers 16
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "distance"    # Z
    .param p3, "padding"    # I

    .line 64
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 47
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->rect:Landroid/graphics/RectF;

    .line 51
    new-instance v0, Landroid/location/Location;

    const-string v1, "network"

    invoke-direct {v0, v1}, Landroid/location/Location;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    .line 55
    new-instance v0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell$1;

    invoke-direct {v0, p0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell$1;-><init>(Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    .line 66
    new-instance v0, Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/components/BackupImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    .line 67
    const/high16 v1, 0x41a00000    # 20.0f

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/BackupImageView;->setRoundRadius(I)V

    .line 70
    new-instance v0, Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-direct {v0}, Lim/tpelyyftgw/ui/components/AvatarDrawable;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 72
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    .line 73
    const/16 v1, 0x10

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextSize(I)V

    .line 74
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const-string/jumbo v1, "windowBackgroundWhiteBlackText"

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V

    .line 75
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const-string v1, "fonts/rmedium.ttf"

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->getTypeface(Ljava/lang/String;)Landroid/graphics/Typeface;

    move-result-object v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 76
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/4 v2, 0x5

    const/4 v3, 0x3

    if-eqz v1, :cond_5e

    const/4 v1, 0x5

    goto :goto_5f

    :cond_5e
    const/4 v1, 0x3

    :goto_5f
    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setGravity(I)V

    .line 78
    const/4 v0, 0x0

    const/high16 v1, 0x41880000    # 17.0f

    if-eqz p2, :cond_10c

    .line 79
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    const/high16 v5, 0x42200000    # 40.0f

    const/high16 v6, 0x42200000    # 40.0f

    sget-boolean v7, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v7, :cond_73

    const/4 v7, 0x5

    goto :goto_74

    :cond_73
    const/4 v7, 0x3

    :goto_74
    or-int/lit8 v7, v7, 0x30

    sget-boolean v8, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v8, :cond_7c

    const/4 v8, 0x0

    goto :goto_7e

    :cond_7c
    const/high16 v8, 0x41880000    # 17.0f

    :goto_7e
    const/high16 v9, 0x41500000    # 13.0f

    sget-boolean v10, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v10, :cond_87

    const/high16 v10, 0x41880000    # 17.0f

    goto :goto_88

    :cond_87
    const/4 v10, 0x0

    :goto_88
    const/4 v11, 0x0

    invoke-static/range {v5 .. v11}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v0

    invoke-virtual {p0, v4, v0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 80
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/high16 v4, -0x40800000    # -1.0f

    const/high16 v5, 0x41a00000    # 20.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_9c

    const/4 v1, 0x5

    goto :goto_9d

    :cond_9c
    const/4 v1, 0x3

    :goto_9d
    or-int/lit8 v6, v1, 0x30

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/high16 v11, 0x42920000    # 73.0f

    if-eqz v1, :cond_a8

    int-to-float v1, p3

    move v7, v1

    goto :goto_aa

    :cond_a8
    const/high16 v7, 0x42920000    # 73.0f

    :goto_aa
    const/high16 v8, 0x41400000    # 12.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_b3

    const/high16 v9, 0x42920000    # 73.0f

    goto :goto_b5

    :cond_b3
    int-to-float v1, p3

    move v9, v1

    :goto_b5
    const/4 v10, 0x0

    invoke-static/range {v4 .. v10}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 82
    new-instance v0, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-direct {v0, p1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    .line 83
    const/16 v1, 0xe

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextSize(I)V

    .line 84
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const-string/jumbo v1, "windowBackgroundWhiteGrayText2"

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setTextColor(I)V

    .line 85
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_dd

    const/4 v1, 0x5

    goto :goto_de

    :cond_dd
    const/4 v1, 0x3

    :goto_de
    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setGravity(I)V

    .line 87
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/high16 v4, -0x40800000    # -1.0f

    const/high16 v5, 0x41a00000    # 20.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_ec

    goto :goto_ed

    :cond_ec
    const/4 v2, 0x3

    :goto_ed
    or-int/lit8 v6, v2, 0x30

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_f6

    int-to-float v1, p3

    move v7, v1

    goto :goto_f8

    :cond_f6
    const/high16 v7, 0x42920000    # 73.0f

    :goto_f8
    const/high16 v8, 0x42140000    # 37.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_101

    const/high16 v9, 0x42920000    # 73.0f

    goto :goto_103

    :cond_101
    int-to-float v11, p3

    move v9, v11

    :goto_103
    const/4 v10, 0x0

    invoke-static/range {v4 .. v10}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_161

    .line 89
    :cond_10c
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    const/high16 v5, 0x42200000    # 40.0f

    const/high16 v6, 0x42200000    # 40.0f

    sget-boolean v7, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v7, :cond_118

    const/4 v7, 0x5

    goto :goto_119

    :cond_118
    const/4 v7, 0x3

    :goto_119
    or-int/lit8 v7, v7, 0x30

    sget-boolean v8, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v8, :cond_121

    const/4 v8, 0x0

    goto :goto_123

    :cond_121
    const/high16 v8, 0x41880000    # 17.0f

    :goto_123
    const/high16 v9, 0x40e00000    # 7.0f

    sget-boolean v10, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v10, :cond_12c

    const/high16 v10, 0x41880000    # 17.0f

    goto :goto_12d

    :cond_12c
    const/4 v10, 0x0

    :goto_12d
    const/4 v11, 0x0

    invoke-static/range {v5 .. v11}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v0

    invoke-virtual {p0, v4, v0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 90
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/high16 v4, -0x40000000    # -2.0f

    const/high16 v5, -0x40000000    # -2.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_140

    goto :goto_141

    :cond_140
    const/4 v2, 0x3

    :goto_141
    or-int/lit8 v6, v2, 0x30

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/high16 v2, 0x42940000    # 74.0f

    if-eqz v1, :cond_14c

    int-to-float v1, p3

    move v7, v1

    goto :goto_14e

    :cond_14c
    const/high16 v7, 0x42940000    # 74.0f

    :goto_14e
    const/high16 v8, 0x41880000    # 17.0f

    sget-boolean v1, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    if-eqz v1, :cond_157

    const/high16 v9, 0x42940000    # 74.0f

    goto :goto_159

    :cond_157
    int-to-float v1, p3

    move v9, v1

    :goto_159
    const/4 v10, 0x0

    invoke-static/range {v4 .. v10}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 93
    :goto_161
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->setWillNotDraw(Z)V

    .line 94
    return-void
.end method

.method static synthetic access$000(Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;)Landroid/graphics/RectF;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;

    .line 40
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->rect:Landroid/graphics/RectF;

    return-object v0
.end method

.method static synthetic access$100(Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;)Ljava/lang/Runnable;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;

    .line 40
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    return-object v0
.end method


# virtual methods
.method protected onAttachedToWindow()V
    .registers 2

    .line 109
    invoke-super {p0}, Landroid/widget/FrameLayout;->onAttachedToWindow()V

    .line 110
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;)V

    .line 111
    return-void
.end method

.method protected onDetachedFromWindow()V
    .registers 2

    .line 103
    invoke-super {p0}, Landroid/widget/FrameLayout;->onDetachedFromWindow()V

    .line 104
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->invalidateRunnable:Ljava/lang/Runnable;

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->cancelRunOnUIThread(Ljava/lang/Runnable;)V

    .line 105
    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .registers 14
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .line 261
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentInfo:Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    if-nez v0, :cond_9

    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->liveLocation:Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;

    if-nez v0, :cond_9

    .line 262
    return-void

    .line 266
    :cond_9
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentInfo:Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    if-eqz v0, :cond_14

    .line 267
    iget v0, v0, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->stopTime:I

    .line 268
    .local v0, "stopTime":I
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentInfo:Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    iget v1, v1, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->period:I

    .local v1, "period":I
    goto :goto_2b

    .line 270
    .end local v0    # "stopTime":I
    .end local v1    # "period":I
    :cond_14
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->liveLocation:Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;

    iget-object v0, v0, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->object:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v0, v0, Lim/tpelyyftgw/tgnet/TLRPC$Message;->date:I

    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->liveLocation:Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;

    iget-object v1, v1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->object:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->period:I

    add-int/2addr v0, v1

    .line 271
    .restart local v0    # "stopTime":I
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->liveLocation:Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;

    iget-object v1, v1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->object:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->period:I

    .line 273
    .restart local v1    # "period":I
    :goto_2b
    iget v2, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v2}, Lim/tpelyyftgw/tgnet/ConnectionsManager;->getInstance(I)Lim/tpelyyftgw/tgnet/ConnectionsManager;

    move-result-object v2

    invoke-virtual {v2}, Lim/tpelyyftgw/tgnet/ConnectionsManager;->getCurrentTime()I

    move-result v2

    .line 274
    .local v2, "currentTime":I
    if-ge v0, v2, :cond_38

    .line 275
    return-void

    .line 277
    :cond_38
    sub-int v3, v0, v2

    invoke-static {v3}, Ljava/lang/Math;->abs(I)I

    move-result v3

    int-to-float v3, v3

    int-to-float v4, v1

    div-float/2addr v3, v4

    .line 278
    .local v3, "progress":F
    sget-boolean v4, Lim/tpelyyftgw/messenger/LocaleController;->isRTL:Z

    const/high16 v5, 0x42400000    # 48.0f

    const/high16 v6, 0x42280000    # 42.0f

    const/high16 v7, 0x41900000    # 18.0f

    const/high16 v8, 0x41400000    # 12.0f

    const/high16 v9, 0x41500000    # 13.0f

    const/high16 v10, 0x422c0000    # 43.0f

    if-eqz v4, :cond_79

    .line 279
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->rect:Landroid/graphics/RectF;

    invoke-static {v9}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v9

    int-to-float v9, v9

    iget-object v11, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz v11, :cond_5d

    goto :goto_5f

    :cond_5d
    const/high16 v7, 0x41400000    # 12.0f

    :goto_5f
    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    int-to-float v7, v7

    invoke-static {v10}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v8

    int-to-float v8, v8

    iget-object v10, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz v10, :cond_6e

    goto :goto_70

    :cond_6e
    const/high16 v5, 0x42280000    # 42.0f

    :goto_70
    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    int-to-float v5, v5

    invoke-virtual {v4, v9, v7, v8, v5}, Landroid/graphics/RectF;->set(FFFF)V

    goto :goto_aa

    .line 281
    :cond_79
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->rect:Landroid/graphics/RectF;

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->getMeasuredWidth()I

    move-result v11

    invoke-static {v10}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v10

    sub-int/2addr v11, v10

    int-to-float v10, v11

    iget-object v11, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz v11, :cond_8a

    goto :goto_8c

    :cond_8a
    const/high16 v7, 0x41400000    # 12.0f

    :goto_8c
    invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    int-to-float v7, v7

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->getMeasuredWidth()I

    move-result v8

    invoke-static {v9}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v9

    sub-int/2addr v8, v9

    int-to-float v8, v8

    iget-object v9, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz v9, :cond_a0

    goto :goto_a2

    :cond_a0
    const/high16 v5, 0x42280000    # 42.0f

    :goto_a2
    invoke-static {v5}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v5

    int-to-float v5, v5

    invoke-virtual {v4, v10, v7, v8, v5}, Landroid/graphics/RectF;->set(FFFF)V

    .line 285
    :goto_aa
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-nez v4, :cond_b5

    .line 286
    const-string v4, "dialog_liveLocationProgress"

    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    .local v4, "color":I
    goto :goto_bb

    .line 288
    .end local v4    # "color":I
    :cond_b5
    const-string v4, "location_liveLocationProgress"

    invoke-static {v4}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v4

    .line 290
    .restart local v4    # "color":I
    :goto_bb
    sget-object v5, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_radialProgress2Paint:Landroid/graphics/Paint;

    invoke-virtual {v5, v4}, Landroid/graphics/Paint;->setColor(I)V

    .line 291
    sget-object v5, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_livePaint:Landroid/text/TextPaint;

    invoke-virtual {v5, v4}, Landroid/text/TextPaint;->setColor(I)V

    .line 293
    iget-object v7, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->rect:Landroid/graphics/RectF;

    const/high16 v8, -0x3d4c0000    # -90.0f

    const/high16 v5, -0x3c4c0000    # -360.0f

    mul-float v9, v3, v5

    const/4 v10, 0x0

    sget-object v11, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_radialProgress2Paint:Landroid/graphics/Paint;

    move-object v6, p1

    invoke-virtual/range {v6 .. v11}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    .line 295
    sub-int v5, v0, v2

    invoke-static {v5}, Lim/tpelyyftgw/messenger/LocaleController;->formatLocationLeftTime(I)Ljava/lang/String;

    move-result-object v5

    .line 297
    .local v5, "text":Ljava/lang/String;
    sget-object v6, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_livePaint:Landroid/text/TextPaint;

    invoke-virtual {v6, v5}, Landroid/text/TextPaint;->measureText(Ljava/lang/String;)F

    move-result v6

    .line 299
    .local v6, "size":F
    iget-object v7, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->rect:Landroid/graphics/RectF;

    invoke-virtual {v7}, Landroid/graphics/RectF;->centerX()F

    move-result v7

    const/high16 v8, 0x40000000    # 2.0f

    div-float v8, v6, v8

    sub-float/2addr v7, v8

    iget-object v8, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz v8, :cond_f2

    const/high16 v8, 0x42140000    # 37.0f

    goto :goto_f4

    :cond_f2
    const/high16 v8, 0x41f80000    # 31.0f

    :goto_f4
    invoke-static {v8}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v8

    int-to-float v8, v8

    sget-object v9, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_livePaint:Landroid/text/TextPaint;

    invoke-virtual {p1, v5, v7, v8, v9}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 300
    return-void
.end method

.method protected onMeasure(II)V
    .registers 6
    .param p1, "widthMeasureSpec"    # I
    .param p2, "heightMeasureSpec"    # I

    .line 98
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    const/high16 v1, 0x40000000    # 2.0f

    invoke-static {v0, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v0

    iget-object v2, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    if-eqz v2, :cond_11

    const/high16 v2, 0x42840000    # 66.0f

    goto :goto_13

    :cond_11
    const/high16 v2, 0x42580000    # 54.0f

    :goto_13
    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    invoke-static {v2, v1}, Landroid/view/View$MeasureSpec;->makeMeasureSpec(II)I

    move-result v1

    invoke-super {p0, v0, v1}, Landroid/widget/FrameLayout;->onMeasure(II)V

    .line 99
    return-void
.end method

.method public setDialog(JLim/tpelyyftgw/tgnet/TLRPC$TL_channelLocation;)V
    .registers 12
    .param p1, "dialogId"    # J
    .param p3, "chatLocation"    # Lim/tpelyyftgw/tgnet/TLRPC$TL_channelLocation;

    .line 114
    sget v0, Lim/tpelyyftgw/messenger/UserConfig;->selectedAccount:I

    iput v0, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    .line 115
    iget-object v0, p3, Lim/tpelyyftgw/tgnet/TLRPC$TL_channelLocation;->address:Ljava/lang/String;

    .line 116
    .local v0, "address":Ljava/lang/String;
    const-string v1, ""

    .line 117
    .local v1, "name":Ljava/lang/String;
    const/4 v2, 0x0

    iput-object v2, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 118
    long-to-int v2, p1

    .line 119
    .local v2, "lowerId":I
    const-string v3, "50_50"

    const/4 v4, 0x0

    if-lez v2, :cond_38

    .line 120
    iget v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v5}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v5

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Lim/tpelyyftgw/messenger/MessagesController;->getUser(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$User;

    move-result-object v5

    .line 121
    .local v5, "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    if-eqz v5, :cond_37

    .line 122
    new-instance v6, Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-direct {v6, v5}, Lim/tpelyyftgw/ui/components/AvatarDrawable;-><init>(Lim/tpelyyftgw/tgnet/TLRPC$User;)V

    iput-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 123
    invoke-static {v5}, Lim/tpelyyftgw/messenger/UserObject;->getName(Lim/tpelyyftgw/tgnet/TLRPC$User;)Ljava/lang/String;

    move-result-object v1

    .line 124
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v5, v4}, Lim/tpelyyftgw/messenger/ImageLocation;->getForUser(Lim/tpelyyftgw/tgnet/TLRPC$User;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v4

    iget-object v7, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 126
    .end local v5    # "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    :cond_37
    goto :goto_5d

    .line 127
    :cond_38
    iget v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v5}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v5

    neg-int v6, v2

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Lim/tpelyyftgw/messenger/MessagesController;->getChat(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$Chat;

    move-result-object v5

    .line 128
    .local v5, "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    if-eqz v5, :cond_5d

    .line 129
    new-instance v6, Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-direct {v6, v5}, Lim/tpelyyftgw/ui/components/AvatarDrawable;-><init>(Lim/tpelyyftgw/tgnet/TLRPC$Chat;)V

    iput-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 130
    iget-object v1, v5, Lim/tpelyyftgw/tgnet/TLRPC$Chat;->title:Ljava/lang/String;

    .line 131
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v5, v4}, Lim/tpelyyftgw/messenger/ImageLocation;->getForChat(Lim/tpelyyftgw/tgnet/TLRPC$Chat;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v4

    iget-object v7, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 134
    .end local v5    # "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    :cond_5d
    :goto_5d
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v3, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 136
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    iget-object v4, p3, Lim/tpelyyftgw/tgnet/TLRPC$TL_channelLocation;->geo_point:Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;

    iget-wide v4, v4, Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;->lat:D

    invoke-virtual {v3, v4, v5}, Landroid/location/Location;->setLatitude(D)V

    .line 137
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    iget-object v4, p3, Lim/tpelyyftgw/tgnet/TLRPC$TL_channelLocation;->geo_point:Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;

    iget-wide v4, v4, Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;->_long:D

    invoke-virtual {v3, v4, v5}, Landroid/location/Location;->setLongitude(D)V

    .line 138
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v3, v0}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 139
    return-void
.end method

.method public setDialog(Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;)V
    .registers 9
    .param p1, "info"    # Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    .line 240
    iput-object p1, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentInfo:Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;

    .line 241
    iget-wide v0, p1, Lim/tpelyyftgw/messenger/LocationController$SharingLocationInfo;->did:J

    long-to-int v1, v0

    .line 242
    .local v1, "lower_id":I
    const-string v0, "50_50"

    const/4 v2, 0x0

    if-lez v1, :cond_38

    .line 243
    iget v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v3

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MessagesController;->getUser(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$User;

    move-result-object v3

    .line 244
    .local v3, "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    if-eqz v3, :cond_37

    .line 245
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-virtual {v4, v3}, Lim/tpelyyftgw/ui/components/AvatarDrawable;->setInfo(Lim/tpelyyftgw/tgnet/TLRPC$User;)V

    .line 246
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    iget-object v5, v3, Lim/tpelyyftgw/tgnet/TLRPC$User;->first_name:Ljava/lang/String;

    iget-object v6, v3, Lim/tpelyyftgw/tgnet/TLRPC$User;->last_name:Ljava/lang/String;

    invoke-static {v5, v6}, Lim/tpelyyftgw/messenger/ContactsController;->formatName(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 247
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v3, v2}, Lim/tpelyyftgw/messenger/ImageLocation;->getForUser(Lim/tpelyyftgw/tgnet/TLRPC$User;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v2

    iget-object v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 249
    .end local v3    # "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    :cond_37
    goto :goto_60

    .line 250
    :cond_38
    iget v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v3

    neg-int v4, v1

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MessagesController;->getChat(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$Chat;

    move-result-object v3

    .line 251
    .local v3, "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    if-eqz v3, :cond_60

    .line 252
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-virtual {v4, v3}, Lim/tpelyyftgw/ui/components/AvatarDrawable;->setInfo(Lim/tpelyyftgw/tgnet/TLRPC$Chat;)V

    .line 253
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    iget-object v5, v3, Lim/tpelyyftgw/tgnet/TLRPC$Chat;->title:Ljava/lang/String;

    invoke-virtual {v4, v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 254
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v3, v2}, Lim/tpelyyftgw/messenger/ImageLocation;->getForChat(Lim/tpelyyftgw/tgnet/TLRPC$Chat;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v2

    iget-object v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 257
    .end local v3    # "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    :cond_60
    :goto_60
    return-void
.end method

.method public setDialog(Lim/tpelyyftgw/messenger/MessageObject;Landroid/location/Location;)V
    .registers 13
    .param p1, "messageObject"    # Lim/tpelyyftgw/messenger/MessageObject;
    .param p2, "userLocation"    # Landroid/location/Location;

    .line 142
    iget-object v0, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v0, v0, Lim/tpelyyftgw/tgnet/TLRPC$Message;->from_id:I

    .line 143
    .local v0, "fromId":I
    invoke-virtual {p1}, Lim/tpelyyftgw/messenger/MessageObject;->isForwarded()Z

    move-result v1

    if-eqz v1, :cond_20

    .line 144
    iget-object v1, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$Message;->fwd_from:Lim/tpelyyftgw/tgnet/TLRPC$MessageFwdHeader;

    iget v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$MessageFwdHeader;->channel_id:I

    if-eqz v1, :cond_1a

    .line 145
    iget-object v1, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$Message;->fwd_from:Lim/tpelyyftgw/tgnet/TLRPC$MessageFwdHeader;

    iget v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$MessageFwdHeader;->channel_id:I

    neg-int v0, v1

    goto :goto_20

    .line 147
    :cond_1a
    iget-object v1, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v1, v1, Lim/tpelyyftgw/tgnet/TLRPC$Message;->fwd_from:Lim/tpelyyftgw/tgnet/TLRPC$MessageFwdHeader;

    iget v0, v1, Lim/tpelyyftgw/tgnet/TLRPC$MessageFwdHeader;->from_id:I

    .line 150
    :cond_20
    :goto_20
    iget v1, p1, Lim/tpelyyftgw/messenger/MessageObject;->currentAccount:I

    iput v1, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    .line 151
    const/4 v1, 0x0

    .line 153
    .local v1, "address":Ljava/lang/String;
    iget-object v2, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->address:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-nez v2, :cond_37

    .line 154
    iget-object v2, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget-object v1, v2, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->address:Ljava/lang/String;

    .line 156
    :cond_37
    iget-object v2, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->title:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    const/4 v3, 0x0

    if-nez v2, :cond_9c

    .line 157
    iget-object v2, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget-object v2, v2, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->title:Ljava/lang/String;

    .line 159
    .local v2, "name":Ljava/lang/String;
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->getResources()Landroid/content/res/Resources;

    move-result-object v4

    const v5, 0x7f0817bc

    invoke-static {v5}, Lnp/NPFog;->d(I)I

    move-result v5

    invoke-virtual {v4, v5}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v4

    .line 160
    .local v4, "drawable":Landroid/graphics/drawable/Drawable;
    new-instance v5, Landroid/graphics/PorterDuffColorFilter;

    const-string v6, "location_sendLocationIcon"

    invoke-static {v6}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v6

    sget-object v7, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v5, v6, v7}, Landroid/graphics/PorterDuffColorFilter;-><init>(ILandroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v4, v5}, Landroid/graphics/drawable/Drawable;->setColorFilter(Landroid/graphics/ColorFilter;)V

    .line 161
    const-string v5, "location_placeLocationBackground"

    invoke-static {v5}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v5

    .line 162
    .local v5, "color":I
    const/high16 v6, 0x42200000    # 40.0f

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v7

    invoke-static {v7, v5, v5}, Lim/tpelyyftgw/ui/actionbar/Theme;->createSimpleSelectorCircleDrawable(III)Landroid/graphics/drawable/Drawable;

    move-result-object v7

    .line 163
    .local v7, "circle":Landroid/graphics/drawable/Drawable;
    new-instance v8, Lim/tpelyyftgw/ui/components/CombinedDrawable;

    invoke-direct {v8, v7, v4}, Lim/tpelyyftgw/ui/components/CombinedDrawable;-><init>(Landroid/graphics/drawable/Drawable;Landroid/graphics/drawable/Drawable;)V

    .line 164
    .local v8, "combinedDrawable":Lim/tpelyyftgw/ui/components/CombinedDrawable;
    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v9

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    invoke-virtual {v8, v9, v6}, Lim/tpelyyftgw/ui/components/CombinedDrawable;->setCustomSize(II)V

    .line 165
    const/high16 v6, 0x41c00000    # 24.0f

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v9

    invoke-static {v6}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v6

    invoke-virtual {v8, v9, v6}, Lim/tpelyyftgw/ui/components/CombinedDrawable;->setIconSize(II)V

    .line 166
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

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

    .line 167
    .end local v4    # "drawable":Landroid/graphics/drawable/Drawable;
    .end local v5    # "color":I
    .end local v7    # "circle":Landroid/graphics/drawable/Drawable;
    .end local v8    # "combinedDrawable":Lim/tpelyyftgw/ui/components/CombinedDrawable;
    goto :goto_f1

    .line 168
    .end local v2    # "name":Ljava/lang/String;
    :cond_9c
    const-string v2, ""

    .line 169
    .restart local v2    # "name":Ljava/lang/String;
    const/4 v4, 0x0

    iput-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 170
    const-string v4, "50_50"

    if-lez v0, :cond_cc

    .line 171
    iget v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v5}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v5

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Lim/tpelyyftgw/messenger/MessagesController;->getUser(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$User;

    move-result-object v5

    .line 172
    .local v5, "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    if-eqz v5, :cond_cb

    .line 173
    new-instance v6, Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-direct {v6, v5}, Lim/tpelyyftgw/ui/components/AvatarDrawable;-><init>(Lim/tpelyyftgw/tgnet/TLRPC$User;)V

    iput-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 174
    invoke-static {v5}, Lim/tpelyyftgw/messenger/UserObject;->getName(Lim/tpelyyftgw/tgnet/TLRPC$User;)Ljava/lang/String;

    move-result-object v2

    .line 175
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v5, v3}, Lim/tpelyyftgw/messenger/ImageLocation;->getForUser(Lim/tpelyyftgw/tgnet/TLRPC$User;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v7

    iget-object v8, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-virtual {v6, v7, v4, v8, v5}, Lim/tpelyyftgw/ui/components/BackupImageView;->setImage(Lim/tpelyyftgw/messenger/ImageLocation;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Ljava/lang/Object;)V

    .line 177
    .end local v5    # "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    :cond_cb
    goto :goto_f1

    .line 178
    :cond_cc
    iget v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v5}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v5

    neg-int v6, v0

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v5, v6}, Lim/tpelyyftgw/messenger/MessagesController;->getChat(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$Chat;

    move-result-object v5

    .line 179
    .local v5, "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    if-eqz v5, :cond_f1

    .line 180
    new-instance v6, Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-direct {v6, v5}, Lim/tpelyyftgw/ui/components/AvatarDrawable;-><init>(Lim/tpelyyftgw/tgnet/TLRPC$Chat;)V

    iput-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 181
    iget-object v2, v5, Lim/tpelyyftgw/tgnet/TLRPC$Chat;->title:Ljava/lang/String;

    .line 182
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v5, v3}, Lim/tpelyyftgw/messenger/ImageLocation;->getForChat(Lim/tpelyyftgw/tgnet/TLRPC$Chat;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v7

    iget-object v8, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-virtual {v6, v7, v4, v8, v5}, Lim/tpelyyftgw/ui/components/BackupImageView;->setImage(Lim/tpelyyftgw/messenger/ImageLocation;Ljava/lang/String;Landroid/graphics/drawable/Drawable;Ljava/lang/Object;)V

    .line 186
    .end local v5    # "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    :cond_f1
    :goto_f1
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v4, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 188
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    iget-object v5, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget-object v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->geo:Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;

    iget-wide v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;->lat:D

    invoke-virtual {v4, v5, v6}, Landroid/location/Location;->setLatitude(D)V

    .line 189
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    iget-object v5, p1, Lim/tpelyyftgw/messenger/MessageObject;->messageOwner:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget-object v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$Message;->media:Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;

    iget-object v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$MessageMedia;->geo:Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;

    iget-wide v5, v5, Lim/tpelyyftgw/tgnet/TLRPC$GeoPoint;->_long:D

    invoke-virtual {v4, v5, v6}, Landroid/location/Location;->setLongitude(D)V

    .line 190
    if-eqz p2, :cond_13c

    .line 191
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    invoke-virtual {v4, p2}, Landroid/location/Location;->distanceTo(Landroid/location/Location;)F

    move-result v4

    .line 192
    .local v4, "distance":F
    if-eqz v1, :cond_132

    .line 193
    iget-object v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/4 v6, 0x2

    new-array v6, v6, [Ljava/lang/Object;

    aput-object v1, v6, v3

    const/4 v3, 0x1

    invoke-static {v4}, Lim/tpelyyftgw/messenger/LocaleController;->formatDistance(F)Ljava/lang/String;

    move-result-object v7

    aput-object v7, v6, v3

    const-string v3, "%s - %s"

    invoke-static {v3, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v5, v3}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    goto :goto_13b

    .line 195
    :cond_132
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-static {v4}, Lim/tpelyyftgw/messenger/LocaleController;->formatDistance(F)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 197
    .end local v4    # "distance":F
    :goto_13b
    goto :goto_152

    .line 198
    :cond_13c
    if-eqz v1, :cond_144

    .line 199
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v3, v1}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    goto :goto_152

    .line 201
    :cond_144
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const v4, 0x7f0f082b

    const-string v5, "Loading"

    invoke-static {v5, v4}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 204
    :goto_152
    return-void
.end method

.method public setDialog(Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;Lcom/baidu/location/BDLocation;)V
    .registers 13
    .param p1, "info"    # Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;
    .param p2, "userLocation"    # Lcom/baidu/location/BDLocation;

    .line 207
    iput-object p1, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->liveLocation:Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;

    .line 208
    iget v0, p1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->id:I

    .line 209
    .local v0, "lower_id":I
    const-string v1, "50_50"

    const/4 v2, 0x0

    if-lez v0, :cond_37

    .line 210
    iget v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v3

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MessagesController;->getUser(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$User;

    move-result-object v3

    .line 211
    .local v3, "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    if-eqz v3, :cond_36

    .line 212
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-virtual {v4, v3}, Lim/tpelyyftgw/ui/components/AvatarDrawable;->setInfo(Lim/tpelyyftgw/tgnet/TLRPC$User;)V

    .line 213
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    iget-object v5, v3, Lim/tpelyyftgw/tgnet/TLRPC$User;->first_name:Ljava/lang/String;

    iget-object v6, v3, Lim/tpelyyftgw/tgnet/TLRPC$User;->last_name:Ljava/lang/String;

    invoke-static {v5, v6}, Lim/tpelyyftgw/messenger/ContactsController;->formatName(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 214
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v3, v2}, Lim/tpelyyftgw/messenger/ImageLocation;->getForUser(Lim/tpelyyftgw/tgnet/TLRPC$User;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v5

    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 216
    .end local v3    # "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    :cond_36
    goto :goto_5f

    .line 217
    :cond_37
    iget v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->currentAccount:I

    invoke-static {v3}, Lim/tpelyyftgw/messenger/MessagesController;->getInstance(I)Lim/tpelyyftgw/messenger/MessagesController;

    move-result-object v3

    neg-int v4, v0

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    invoke-virtual {v3, v4}, Lim/tpelyyftgw/messenger/MessagesController;->getChat(Ljava/lang/Integer;)Lim/tpelyyftgw/tgnet/TLRPC$Chat;

    move-result-object v3

    .line 218
    .local v3, "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    if-eqz v3, :cond_5f

    .line 219
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    invoke-virtual {v4, v3}, Lim/tpelyyftgw/ui/components/AvatarDrawable;->setInfo(Lim/tpelyyftgw/tgnet/TLRPC$Chat;)V

    .line 220
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->nameTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    iget-object v5, v3, Lim/tpelyyftgw/tgnet/TLRPC$Chat;->title:Ljava/lang/String;

    invoke-virtual {v4, v5}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 221
    iget-object v4, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    invoke-static {v3, v2}, Lim/tpelyyftgw/messenger/ImageLocation;->getForChat(Lim/tpelyyftgw/tgnet/TLRPC$Chat;Z)Lim/tpelyyftgw/messenger/ImageLocation;

    move-result-object v5

    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 225
    .end local v3    # "chat":Lim/tpelyyftgw/tgnet/TLRPC$Chat;
    :cond_5f
    :goto_5f
    iget-object v1, p1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->marker:Lim/tpelyyftgw/ui/LocationActivity$Marker;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/LocationActivity$Marker;->getPosition()Lcom/baidu/mapapi/model/LatLng;

    move-result-object v1

    .line 226
    .local v1, "position":Lcom/baidu/mapapi/model/LatLng;
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    iget-wide v4, v1, Lcom/baidu/mapapi/model/LatLng;->latitude:D

    invoke-virtual {v3, v4, v5}, Landroid/location/Location;->setLatitude(D)V

    .line 227
    iget-object v3, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    iget-wide v4, v1, Lcom/baidu/mapapi/model/LatLng;->longitude:D

    invoke-virtual {v3, v4, v5}, Landroid/location/Location;->setLongitude(D)V

    .line 229
    iget-object v3, p1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->object:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v3, v3, Lim/tpelyyftgw/tgnet/TLRPC$Message;->edit_date:I

    if-eqz v3, :cond_7e

    iget-object v3, p1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->object:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v3, v3, Lim/tpelyyftgw/tgnet/TLRPC$Message;->edit_date:I

    goto :goto_82

    :cond_7e
    iget-object v3, p1, Lim/tpelyyftgw/ui/LocationActivity$LiveLocation;->object:Lim/tpelyyftgw/tgnet/TLRPC$Message;

    iget v3, v3, Lim/tpelyyftgw/tgnet/TLRPC$Message;->date:I

    :goto_82
    int-to-long v3, v3

    invoke-static {v3, v4}, Lim/tpelyyftgw/messenger/LocaleController;->formatLocationUpdateDate(J)Ljava/lang/String;

    move-result-object v3

    .line 230
    .local v3, "time":Ljava/lang/String;
    if-eqz p2, :cond_c4

    .line 231
    new-instance v4, Lcom/baidu/mapapi/model/LatLng;

    iget-object v5, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    invoke-virtual {v5}, Landroid/location/Location;->getLatitude()D

    move-result-wide v5

    iget-object v7, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->location:Landroid/location/Location;

    invoke-virtual {v7}, Landroid/location/Location;->getLongitude()D

    move-result-wide v7

    invoke-direct {v4, v5, v6, v7, v8}, Lcom/baidu/mapapi/model/LatLng;-><init>(DD)V

    .line 232
    .local v4, "newLatlng":Lcom/baidu/mapapi/model/LatLng;
    new-instance v5, Lcom/baidu/mapapi/model/LatLng;

    invoke-virtual {p2}, Lcom/baidu/location/BDLocation;->getLatitude()D

    move-result-wide v6

    invoke-virtual {p2}, Lcom/baidu/location/BDLocation;->getLongitude()D

    move-result-wide v8

    invoke-direct {v5, v6, v7, v8, v9}, Lcom/baidu/mapapi/model/LatLng;-><init>(DD)V

    .line 233
    .local v5, "userLatlng":Lcom/baidu/mapapi/model/LatLng;
    iget-object v6, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    const/4 v7, 0x2

    new-array v7, v7, [Ljava/lang/Object;

    aput-object v3, v7, v2

    const/4 v2, 0x1

    invoke-static {v5, v4}, Lcom/baidu/mapapi/utils/DistanceUtil;->getDistance(Lcom/baidu/mapapi/model/LatLng;Lcom/baidu/mapapi/model/LatLng;)D

    move-result-wide v8

    double-to-float v8, v8

    invoke-static {v8}, Lim/tpelyyftgw/messenger/LocaleController;->formatDistance(F)Ljava/lang/String;

    move-result-object v8

    aput-object v8, v7, v2

    const-string v2, "%s - %s"

    invoke-static {v2, v7}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v6, v2}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 234
    .end local v4    # "newLatlng":Lcom/baidu/mapapi/model/LatLng;
    .end local v5    # "userLatlng":Lcom/baidu/mapapi/model/LatLng;
    goto :goto_c9

    .line 235
    :cond_c4
    iget-object v2, p0, Lim/tpelyyftgw/ui/cells/SharingLiveLocationCell;->distanceTextView:Lim/tpelyyftgw/ui/actionbar/SimpleTextView;

    invoke-virtual {v2, v3}, Lim/tpelyyftgw/ui/actionbar/SimpleTextView;->setText(Ljava/lang/CharSequence;)Z

    .line 237
    :goto_c9
    return-void
.end method