PopUserCell.smali

.class public Lim/tpelyyftgw/ui/hcells/PopUserCell;
.super Landroid/widget/FrameLayout;
.source "PopUserCell.java"

# interfaces
.implements Lim/tpelyyftgw/messenger/NotificationCenter$NotificationCenterDelegate;


# instance fields
.field private accountNumber:I

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

.field private checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

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

.field private rect:Landroid/graphics/RectF;

.field private textView:Landroid/widget/TextView;


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

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 12
    .param p1, "context"    # Landroid/content/Context;

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

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

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

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

    .line 39
    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/hcells/PopUserCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    .line 40
    const/high16 v1, 0x41400000    # 12.0f

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

    move-result v1

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

    .line 42
    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/hcells/PopUserCell;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    .line 43
    const/high16 v1, 0x40f00000    # 7.5f

    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 44
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    const/high16 v1, 0x42100000    # 36.0f

    const/high16 v2, 0x42100000    # 36.0f

    const/16 v3, 0x33

    const/high16 v4, 0x41800000    # 16.0f

    const/high16 v5, 0x40c00000    # 6.0f

    const/high16 v6, 0x41800000    # 16.0f

    const/4 v7, 0x0

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

    move-result-object v1

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

    .line 46
    new-instance v0, Landroid/widget/TextView;

    invoke-direct {v0, p1}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    .line 47
    const-string v1, "chats_menuItemText"

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

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    .line 48
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    const/4 v1, 0x1

    const/high16 v2, 0x41600000    # 14.0f

    invoke-virtual {v0, v1, v2}, Landroid/widget/TextView;->setTextSize(IF)V

    .line 49
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

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

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

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setTypeface(Landroid/graphics/Typeface;)V

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setLines(I)V

    .line 51
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setMaxLines(I)V

    .line 52
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setSingleLine(Z)V

    .line 53
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    const/16 v2, 0x13

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setGravity(I)V

    .line 54
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    sget-object v2, Landroid/text/TextUtils$TruncateAt;->END:Landroid/text/TextUtils$TruncateAt;

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setEllipsize(Landroid/text/TextUtils$TruncateAt;)V

    .line 55
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

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

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

    const/16 v4, 0x33

    const/high16 v5, 0x42860000    # 67.0f

    const/4 v6, 0x0

    const/high16 v7, 0x41000000    # 8.0f

    const/4 v8, 0x0

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

    move-result-object v2

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

    .line 57
    new-instance v0, Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

    .line 58
    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;->setChecked(ZZ)V

    .line 59
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

    const v1, 0x3f666666    # 0.9f

    invoke-virtual {v0, v1}, Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;->setCheckScale(F)V

    .line 60
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

    const/high16 v1, 0x3fc00000    # 1.5f

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

    move-result v1

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

    .line 61
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

    const-string v1, "chats_unreadCounterText"

    const-string v3, "chats_unreadCounter"

    const-string v4, "chats_menuBackground"

    invoke-virtual {v0, v1, v3, v4}, Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;->setColorKeysOverrides(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 62
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

    const/high16 v3, 0x41900000    # 18.0f

    const/high16 v4, 0x41900000    # 18.0f

    const/16 v5, 0x33

    const/high16 v6, 0x42140000    # 37.0f

    const/high16 v7, 0x41d80000    # 27.0f

    const/4 v9, 0x0

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

    move-result-object v1

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

    .line 64
    invoke-virtual {p0, v2}, Lim/tpelyyftgw/ui/hcells/PopUserCell;->setWillNotDraw(Z)V

    .line 65
    return-void
.end method


# virtual methods
.method public varargs didReceivedNotification(II[Ljava/lang/Object;)V
    .registers 5
    .param p1, "id"    # I
    .param p2, "account"    # I
    .param p3, "args"    # [Ljava/lang/Object;

    .line 146
    sget v0, Lim/tpelyyftgw/messenger/NotificationCenter;->dialogsUnreadCounterChanged:I

    if-ne p1, v0, :cond_12

    .line 147
    const/4 v0, 0x0

    aget-object v0, p3, v0

    check-cast v0, Ljava/lang/Integer;

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    .line 148
    .local v0, "count":I
    if-lez v0, :cond_12

    .line 149
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/hcells/PopUserCell;->invalidate()V

    .line 152
    .end local v0    # "count":I
    :cond_12
    return-void
.end method

.method public getAccountNumber()I
    .registers 2

    .line 94
    iget v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

    return v0
.end method

.method protected onAttachedToWindow()V
    .registers 3

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

    .line 70
    iget-object v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    const-string v1, "chats_menuItemText"

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

    move-result v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    .line 71
    iget v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

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

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->dialogsUnreadCounterChanged:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->addObserver(Ljava/lang/Object;I)V

    .line 72
    return-void
.end method

.method protected onDetachedFromWindow()V
    .registers 3

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

    .line 77
    iget v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

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

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->dialogsUnreadCounterChanged:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->removeObserver(Ljava/lang/Object;I)V

    .line 78
    return-void
.end method

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

    .line 110
    invoke-static {}, Lim/tpelyyftgw/messenger/UserConfig;->getActivatedAccountsCount()I

    move-result v0

    const/4 v1, 0x1

    if-le v0, v1, :cond_dd

    iget v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

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

    move-result-object v0

    iget-boolean v0, v0, Lim/tpelyyftgw/messenger/NotificationsController;->showBadgeNumber:Z

    if-nez v0, :cond_13

    goto/16 :goto_dd

    .line 113
    :cond_13
    iget v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

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

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/NotificationsController;->getTotalUnreadCount()I

    move-result v0

    .line 114
    .local v0, "count":I
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/hcells/PopUserCell;->getMeasuredWidth()I

    move-result v2

    const/high16 v3, 0x42c80000    # 100.0f

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

    move-result v3

    sub-int/2addr v2, v3

    .line 115
    .local v2, "nameWidth":I
    if-gtz v0, :cond_40

    .line 116
    iget-object v1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v1}, Landroid/widget/TextView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v1

    check-cast v1, Landroid/widget/FrameLayout$LayoutParams;

    .line 117
    .local v1, "lp":Landroid/widget/FrameLayout$LayoutParams;
    if-eqz v1, :cond_3f

    iget v3, v1, Landroid/widget/FrameLayout$LayoutParams;->width:I

    if-eq v3, v2, :cond_3f

    .line 118
    iput v2, v1, Landroid/widget/FrameLayout$LayoutParams;->width:I

    .line 119
    iget-object v3, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v3, v1}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 121
    :cond_3f
    return-void

    .line 124
    .end local v1    # "lp":Landroid/widget/FrameLayout$LayoutParams;
    :cond_40
    new-array v1, v1, [Ljava/lang/Object;

    const/4 v3, 0x0

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

    move-result-object v4

    aput-object v4, v1, v3

    const-string v3, "%d"

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

    move-result-object v1

    .line 125
    .local v1, "text":Ljava/lang/String;
    const/high16 v3, 0x41480000    # 12.5f

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

    move-result v3

    .line 126
    .local v3, "countTop":I
    sget-object v4, Lim/tpelyyftgw/ui/actionbar/Theme;->dialogs_countTextPaint:Landroid/text/TextPaint;

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

    move-result v4

    float-to-double v4, v4

    invoke-static {v4, v5}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v4

    double-to-int v4, v4

    .line 127
    .local v4, "textWidth":I
    const/high16 v5, 0x41200000    # 10.0f

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

    move-result v5

    invoke-static {v5, v4}, Ljava/lang/Math;->max(II)I

    move-result v5

    .line 128
    .local v5, "countWidth":I
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/hcells/PopUserCell;->getMeasuredWidth()I

    move-result v6

    sub-int/2addr v6, v5

    const/high16 v7, 0x41c80000    # 25.0f

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

    move-result v7

    sub-int/2addr v6, v7

    .line 130
    .local v6, "countLeft":I
    sub-int/2addr v2, v5

    .line 131
    iget-object v7, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v7}, Landroid/widget/TextView;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v7

    check-cast v7, Landroid/widget/FrameLayout$LayoutParams;

    .line 132
    .local v7, "lp":Landroid/widget/FrameLayout$LayoutParams;
    if-eqz v7, :cond_8d

    iget v8, v7, Landroid/widget/FrameLayout$LayoutParams;->width:I

    if-eq v8, v2, :cond_8d

    .line 133
    iput v2, v7, Landroid/widget/FrameLayout$LayoutParams;->width:I

    .line 134
    iget-object v8, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

    invoke-virtual {v8, v7}, Landroid/widget/TextView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 137
    :cond_8d
    const/high16 v8, 0x40b00000    # 5.5f

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

    move-result v8

    sub-int v8, v6, v8

    .line 138
    .local v8, "x":I
    iget-object v9, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->rect:Landroid/graphics/RectF;

    int-to-float v10, v8

    int-to-float v11, v3

    add-int v12, v8, v5

    const/high16 v13, 0x41600000    # 14.0f

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

    move-result v13

    add-int/2addr v12, v13

    int-to-float v12, v12

    const/high16 v13, 0x41b80000    # 23.0f

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

    move-result v13

    add-int/2addr v13, v3

    int-to-float v13, v13

    invoke-virtual {v9, v10, v11, v12, v13}, Landroid/graphics/RectF;->set(FFFF)V

    .line 139
    iget-object v9, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->rect:Landroid/graphics/RectF;

    sget v10, Lim/tpelyyftgw/messenger/AndroidUtilities;->density:F

    const/high16 v11, 0x41380000    # 11.5f

    mul-float v10, v10, v11

    sget v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->density:F

    mul-float v12, v12, v11

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

    invoke-virtual {p1, v9, v10, v12, v11}, Landroid/graphics/Canvas;->drawRoundRect(Landroid/graphics/RectF;FFLandroid/graphics/Paint;)V

    .line 141
    iget-object v9, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->rect:Landroid/graphics/RectF;

    iget v9, v9, Landroid/graphics/RectF;->left:F

    iget-object v10, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->rect:Landroid/graphics/RectF;

    invoke-virtual {v10}, Landroid/graphics/RectF;->width()F

    move-result v10

    int-to-float v11, v4

    sub-float/2addr v10, v11

    const/high16 v11, 0x40000000    # 2.0f

    div-float/2addr v10, v11

    add-float/2addr v9, v10

    const/high16 v10, 0x41800000    # 16.0f

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

    move-result v10

    add-int/2addr v10, v3

    int-to-float v10, v10

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

    invoke-virtual {p1, v1, v9, v10, v11}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V

    .line 142
    return-void

    .line 111
    .end local v0    # "count":I
    .end local v1    # "text":Ljava/lang/String;
    .end local v2    # "nameWidth":I
    .end local v3    # "countTop":I
    .end local v4    # "textWidth":I
    .end local v5    # "countWidth":I
    .end local v6    # "countLeft":I
    .end local v7    # "lp":Landroid/widget/FrameLayout$LayoutParams;
    .end local v8    # "x":I
    :cond_dd
    :goto_dd
    return-void
.end method

.method protected onLayout(ZIIII)V
    .registers 7
    .param p1, "changed"    # Z
    .param p2, "left"    # I
    .param p3, "top"    # I
    .param p4, "right"    # I
    .param p5, "bottom"    # I

    .line 104
    invoke-super/range {p0 .. p5}, Landroid/widget/FrameLayout;->onLayout(ZIIII)V

    .line 105
    iget v0, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

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

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/NotificationsController;->getTotalUnreadCount()I

    move-result v0

    .line 106
    .local v0, "count":I
    return-void
.end method

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

    .line 99
    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

    const/high16 v2, 0x42400000    # 48.0f

    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 100
    return-void
.end method

.method public setAccount(I)V
    .registers 8
    .param p1, "account"    # I

    .line 81
    iput p1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->accountNumber:I

    .line 82
    invoke-static {p1}, Lim/tpelyyftgw/messenger/UserConfig;->getInstance(I)Lim/tpelyyftgw/messenger/UserConfig;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/messenger/UserConfig;->getCurrentUser()Lim/tpelyyftgw/tgnet/TLRPC$User;

    move-result-object v0

    .line 83
    .local v0, "user":Lim/tpelyyftgw/tgnet/TLRPC$User;
    if-nez v0, :cond_d

    .line 84
    return-void

    .line 86
    :cond_d
    iget-object v1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

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

    .line 87
    iget-object v1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->textView:Landroid/widget/TextView;

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

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

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

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 88
    iget-object v1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

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

    move-result-object v1

    invoke-virtual {v1, p1}, Lim/tpelyyftgw/messenger/ImageReceiver;->setCurrentAccount(I)V

    .line 89
    iget-object v1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->imageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    const/4 v2, 0x0

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

    move-result-object v3

    iget-object v4, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->avatarDrawable:Lim/tpelyyftgw/ui/components/AvatarDrawable;

    const-string v5, "50_50"

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

    .line 90
    iget-object v1, p0, Lim/tpelyyftgw/ui/hcells/PopUserCell;->checkBox:Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;

    sget v3, Lim/tpelyyftgw/messenger/UserConfig;->selectedAccount:I

    if-ne p1, v3, :cond_3d

    goto :goto_3e

    :cond_3d
    const/4 v2, 0x4

    :goto_3e
    invoke-virtual {v1, v2}, Lim/tpelyyftgw/ui/components/GroupCreateCheckBox;->setVisibility(I)V

    .line 91
    return-void
.end method