DrawerProfileCell.smali

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


# instance fields
.field private accountsShowed:Z

.field private arrowView:Landroid/widget/ImageView;

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

.field private currentColor:Ljava/lang/Integer;

.field private destRect:Landroid/graphics/Rect;

.field private nameTextView:Landroid/widget/TextView;

.field private paint:Landroid/graphics/Paint;

.field private phoneTextView:Landroid/widget/TextView;

.field private shadowView:Landroid/widget/ImageView;

.field private snowflakesEffect:Lim/tpelyyftgw/ui/components/SnowflakesEffect;

.field private srcRect:Landroid/graphics/Rect;


# 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 51
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    .line 43
    new-instance v0, Landroid/graphics/Rect;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->srcRect:Landroid/graphics/Rect;

    .line 44
    new-instance v0, Landroid/graphics/Rect;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->destRect:Landroid/graphics/Rect;

    .line 45
    new-instance v0, Landroid/graphics/Paint;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->paint:Landroid/graphics/Paint;

    .line 53
    new-instance v0, Landroid/widget/ImageView;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    .line 54
    const/4 v1, 0x4

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

    .line 55
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    sget-object v1, Landroid/widget/ImageView$ScaleType;->FIT_XY:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 56
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    const v1, 0x7f08009f

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

    .line 57
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    const/4 v1, -0x1

    const/16 v2, 0x46

    const/16 v3, 0x53

    invoke-static {v1, v2, v3}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

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

    .line 59
    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/DrawerProfileCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    .line 60
    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/BackupImageView;->getImageReceiver()Lim/tpelyyftgw/messenger/ImageReceiver;

    move-result-object v0

    const/high16 v1, 0x42000000    # 32.0f

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

    move-result v1

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

    .line 61
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    const/high16 v1, 0x42800000    # 64.0f

    const/high16 v2, 0x42800000    # 64.0f

    const/high16 v4, 0x41800000    # 16.0f

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/high16 v7, 0x42860000    # 67.0f

    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/cells/DrawerProfileCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 63
    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/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

    .line 64
    const/4 v1, 0x1

    const/high16 v2, 0x41700000    # 15.0f

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

    .line 65
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView: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 66
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

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

    .line 67
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

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

    .line 68
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

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

    .line 69
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

    const/4 v2, 0x3

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

    .line 70
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

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

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

    .line 71
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

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

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

    const/16 v5, 0x53

    const/high16 v6, 0x41800000    # 16.0f

    const/4 v7, 0x0

    const/high16 v8, 0x42980000    # 76.0f

    const/high16 v9, 0x41e00000    # 28.0f

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

    move-result-object v3

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

    .line 73
    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/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

    .line 74
    const/high16 v3, 0x41500000    # 13.0f

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

    .line 75
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

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

    .line 76
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

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

    .line 77
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

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

    .line 78
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

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

    .line 79
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

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

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

    const/16 v3, 0x53

    const/high16 v4, 0x41800000    # 16.0f

    const/4 v5, 0x0

    const/high16 v6, 0x42980000    # 76.0f

    const/high16 v7, 0x41100000    # 9.0f

    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/cells/DrawerProfileCell;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 81
    new-instance v0, Landroid/widget/ImageView;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    .line 82
    sget-object v1, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 83
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    iget-boolean v1, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    if-eqz v1, :cond_ff

    const v1, 0x7f0f0028

    const-string v2, "AccDescrHideAccounts"

    goto :goto_104

    :cond_ff
    const v1, 0x7f0f004b

    const-string v2, "AccDescrShowAccounts"

    :goto_104
    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V

    .line 84
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    const/16 v1, 0x55

    const/16 v2, 0x3b

    invoke-static {v2, v2, v1}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(III)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v1

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

    .line 86
    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/Theme;->getEventType()I

    move-result v0

    if-nez v0, :cond_125

    .line 87
    new-instance v0, Lim/tpelyyftgw/ui/components/SnowflakesEffect;

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

    iput-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->snowflakesEffect:Lim/tpelyyftgw/ui/components/SnowflakesEffect;

    .line 89
    :cond_125
    return-void
.end method


# virtual methods
.method public applyBackground(Z)Ljava/lang/String;
    .registers 5
    .param p1, "force"    # Z

    .line 203
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 204
    .local v0, "currentTag":Ljava/lang/String;
    const-string v1, "chats_menuTopBackground"

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

    move-result v2

    if-eqz v2, :cond_15

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

    move-result v2

    if-eqz v2, :cond_15

    goto :goto_17

    :cond_15
    const-string v1, "chats_menuTopBackgroundCats"

    .line 205
    .local v1, "backgroundKey":Ljava/lang/String;
    :goto_17
    if-nez p1, :cond_1f

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-nez v2, :cond_29

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

    move-result v2

    invoke-virtual {p0, v2}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->setBackgroundColor(I)V

    .line 207
    invoke-virtual {p0, v1}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->setTag(Ljava/lang/Object;)V

    .line 209
    :cond_29
    return-object v1
.end method

.method public isAccountsShowed()Z
    .registers 2

    .line 167
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    return v0
.end method

.method public synthetic lambda$setOnArrowClickListener$0$DrawerProfileCell(Landroid/view/View$OnClickListener;Landroid/view/View;)V
    .registers 6
    .param p1, "onClickListener"    # Landroid/view/View$OnClickListener;
    .param p2, "v"    # Landroid/view/View;

    .line 180
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    xor-int/lit8 v0, v0, 0x1

    iput-boolean v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    .line 181
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    if-eqz v0, :cond_e

    const v0, 0x7f0800df

    goto :goto_11

    :cond_e
    const v0, 0x7f0800de

    :goto_11
    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 182
    invoke-interface {p1, p0}, Landroid/view/View$OnClickListener;->onClick(Landroid/view/View;)V

    .line 183
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    iget-boolean v1, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    if-eqz v1, :cond_23

    const v1, 0x7f0f0028

    const-string v2, "AccDescrHideAccounts"

    goto :goto_28

    :cond_23
    const v1, 0x7f0f004b

    const-string v2, "AccDescrShowAccounts"

    :goto_28
    invoke-static {v2, v1}, Lim/tpelyyftgw/messenger/LocaleController;->getString(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setContentDescription(Ljava/lang/CharSequence;)V

    .line 184
    return-void
.end method

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

    .line 107
    move-object/from16 v1, p0

    move-object/from16 v2, p1

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

    move-result-object v3

    .line 108
    .local v3, "backgroundDrawable":Landroid/graphics/drawable/Drawable;
    const/4 v0, 0x0

    invoke-virtual {v1, v0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->applyBackground(Z)Ljava/lang/String;

    move-result-object v4

    .line 109
    .local v4, "backgroundKey":Ljava/lang/String;
    const-string v5, "chats_menuTopBackground"

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_29

    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/Theme;->isCustomTheme()Z

    move-result v5

    if-eqz v5, :cond_29

    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/Theme;->isPatternWallpaper()Z

    move-result v5

    if-nez v5, :cond_29

    if-eqz v3, :cond_29

    instance-of v5, v3, Landroid/graphics/drawable/ColorDrawable;

    if-nez v5, :cond_29

    const/4 v5, 0x1

    goto :goto_2a

    :cond_29
    const/4 v5, 0x0

    .line 110
    .local v5, "useImageBackground":Z
    :goto_2a
    const/4 v6, 0x0

    .line 112
    .local v6, "drawCatsShadow":Z
    if-nez v5, :cond_3b

    const-string v7, "chats_menuTopShadowCats"

    invoke-static {v7}, Lim/tpelyyftgw/ui/actionbar/Theme;->hasThemeKey(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_3b

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

    move-result v7

    .line 114
    .local v7, "color":I
    const/4 v6, 0x1

    goto :goto_4f

    .line 116
    .end local v7    # "color":I
    :cond_3b
    const-string v7, "chats_menuTopShadow"

    invoke-static {v7}, Lim/tpelyyftgw/ui/actionbar/Theme;->hasThemeKey(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_48

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

    move-result v7

    .restart local v7    # "color":I
    goto :goto_4f

    .line 119
    .end local v7    # "color":I
    :cond_48
    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/Theme;->getServiceMessageColor()I

    move-result v7

    const/high16 v8, -0x1000000

    or-int/2addr v7, v8

    .line 122
    .restart local v7    # "color":I
    :goto_4f
    iget-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->currentColor:Ljava/lang/Integer;

    if-eqz v8, :cond_59

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

    move-result v8

    if-eq v8, v7, :cond_6f

    .line 123
    :cond_59
    invoke-static {v7}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v8

    iput-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->currentColor:Ljava/lang/Integer;

    .line 124
    iget-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    invoke-virtual {v8}, Landroid/widget/ImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v8

    new-instance v9, Landroid/graphics/PorterDuffColorFilter;

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

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

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

    .line 126
    :cond_6f
    iget-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

    const-string v9, "chats_menuName"

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

    move-result v9

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

    .line 127
    if-eqz v5, :cond_131

    .line 128
    iget-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

    const-string v9, "chats_menuPhone"

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

    move-result v9

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

    .line 129
    iget-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    invoke-virtual {v8}, Landroid/widget/ImageView;->getVisibility()I

    move-result v8

    if-eqz v8, :cond_94

    .line 130
    iget-object v8, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    invoke-virtual {v8, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 132
    :cond_94
    instance-of v8, v3, Landroid/graphics/drawable/ColorDrawable;

    if-nez v8, :cond_11b

    instance-of v8, v3, Landroid/graphics/drawable/GradientDrawable;

    if-eqz v8, :cond_a4

    move-object/from16 v16, v4

    move/from16 v17, v5

    move/from16 v18, v7

    goto/16 :goto_121

    .line 135
    :cond_a4
    instance-of v8, v3, Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v8, :cond_114

    .line 136
    move-object v8, v3

    check-cast v8, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {v8}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v8

    .line 137
    .local v8, "bitmap":Landroid/graphics/Bitmap;
    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredWidth()I

    move-result v9

    int-to-float v9, v9

    invoke-virtual {v8}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v10

    int-to-float v10, v10

    div-float/2addr v9, v10

    .line 138
    .local v9, "scaleX":F
    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredHeight()I

    move-result v10

    int-to-float v10, v10

    invoke-virtual {v8}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v11

    int-to-float v11, v11

    div-float/2addr v10, v11

    .line 139
    .local v10, "scaleY":F
    cmpg-float v11, v9, v10

    if-gez v11, :cond_cb

    move v11, v10

    goto :goto_cc

    :cond_cb
    move v11, v9

    .line 140
    .local v11, "scale":F
    :goto_cc
    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredWidth()I

    move-result v12

    int-to-float v12, v12

    div-float/2addr v12, v11

    float-to-int v12, v12

    .line 141
    .local v12, "width":I
    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredHeight()I

    move-result v13

    int-to-float v13, v13

    div-float/2addr v13, v11

    float-to-int v13, v13

    .line 142
    .local v13, "height":I
    invoke-virtual {v8}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v14

    sub-int/2addr v14, v12

    div-int/lit8 v14, v14, 0x2

    .line 143
    .local v14, "x":I
    invoke-virtual {v8}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v15

    sub-int/2addr v15, v13

    div-int/lit8 v15, v15, 0x2

    .line 144
    .local v15, "y":I
    iget-object v0, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->srcRect:Landroid/graphics/Rect;

    move-object/from16 v16, v4

    .end local v4    # "backgroundKey":Ljava/lang/String;
    .local v16, "backgroundKey":Ljava/lang/String;
    add-int v4, v14, v12

    move/from16 v17, v5

    .end local v5    # "useImageBackground":Z
    .local v17, "useImageBackground":Z
    add-int v5, v15, v13

    invoke-virtual {v0, v14, v15, v4, v5}, Landroid/graphics/Rect;->set(IIII)V

    .line 145
    iget-object v0, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->destRect:Landroid/graphics/Rect;

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

    move-result v4

    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredHeight()I

    move-result v5

    move/from16 v18, v7

    const/4 v7, 0x0

    .end local v7    # "color":I
    .local v18, "color":I
    invoke-virtual {v0, v7, v7, v4, v5}, Landroid/graphics/Rect;->set(IIII)V

    .line 147
    :try_start_105
    iget-object v0, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->srcRect:Landroid/graphics/Rect;

    iget-object v4, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->destRect:Landroid/graphics/Rect;

    iget-object v5, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->paint:Landroid/graphics/Paint;

    invoke-virtual {v2, v8, v0, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/graphics/Paint;)V
    :try_end_10e
    .catchall {:try_start_105 .. :try_end_10e} :catchall_10f

    .line 150
    goto :goto_113

    .line 148
    :catchall_10f
    move-exception v0

    .line 149
    .local v0, "e":Ljava/lang/Throwable;
    invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 151
    .end local v0    # "e":Ljava/lang/Throwable;
    .end local v8    # "bitmap":Landroid/graphics/Bitmap;
    .end local v9    # "scaleX":F
    .end local v10    # "scaleY":F
    .end local v11    # "scale":F
    .end local v12    # "width":I
    .end local v13    # "height":I
    .end local v14    # "x":I
    .end local v15    # "y":I
    :goto_113
    goto :goto_158

    .line 135
    .end local v16    # "backgroundKey":Ljava/lang/String;
    .end local v17    # "useImageBackground":Z
    .end local v18    # "color":I
    .restart local v4    # "backgroundKey":Ljava/lang/String;
    .restart local v5    # "useImageBackground":Z
    .restart local v7    # "color":I
    :cond_114
    move-object/from16 v16, v4

    move/from16 v17, v5

    move/from16 v18, v7

    .end local v4    # "backgroundKey":Ljava/lang/String;
    .end local v5    # "useImageBackground":Z
    .end local v7    # "color":I
    .restart local v16    # "backgroundKey":Ljava/lang/String;
    .restart local v17    # "useImageBackground":Z
    .restart local v18    # "color":I
    goto :goto_158

    .line 132
    .end local v16    # "backgroundKey":Ljava/lang/String;
    .end local v17    # "useImageBackground":Z
    .end local v18    # "color":I
    .restart local v4    # "backgroundKey":Ljava/lang/String;
    .restart local v5    # "useImageBackground":Z
    .restart local v7    # "color":I
    :cond_11b
    move-object/from16 v16, v4

    move/from16 v17, v5

    move/from16 v18, v7

    .line 133
    .end local v4    # "backgroundKey":Ljava/lang/String;
    .end local v5    # "useImageBackground":Z
    .end local v7    # "color":I
    .restart local v16    # "backgroundKey":Ljava/lang/String;
    .restart local v17    # "useImageBackground":Z
    .restart local v18    # "color":I
    :goto_121
    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredWidth()I

    move-result v0

    invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->getMeasuredHeight()I

    move-result v4

    const/4 v5, 0x0

    invoke-virtual {v3, v5, v5, v0, v4}, Landroid/graphics/drawable/Drawable;->setBounds(IIII)V

    .line 134
    invoke-virtual {v3, v2}, Landroid/graphics/drawable/Drawable;->draw(Landroid/graphics/Canvas;)V

    goto :goto_158

    .line 153
    .end local v16    # "backgroundKey":Ljava/lang/String;
    .end local v17    # "useImageBackground":Z
    .end local v18    # "color":I
    .restart local v4    # "backgroundKey":Ljava/lang/String;
    .restart local v5    # "useImageBackground":Z
    .restart local v7    # "color":I
    :cond_131
    move-object/from16 v16, v4

    move/from16 v17, v5

    move/from16 v18, v7

    const/4 v5, 0x0

    .end local v4    # "backgroundKey":Ljava/lang/String;
    .end local v5    # "useImageBackground":Z
    .end local v7    # "color":I
    .restart local v16    # "backgroundKey":Ljava/lang/String;
    .restart local v17    # "useImageBackground":Z
    .restart local v18    # "color":I
    if-eqz v6, :cond_13c

    const/4 v0, 0x0

    goto :goto_13d

    :cond_13c
    const/4 v0, 0x4

    .line 154
    .local v0, "visibility":I
    :goto_13d
    iget-object v4, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    invoke-virtual {v4}, Landroid/widget/ImageView;->getVisibility()I

    move-result v4

    if-eq v4, v0, :cond_14a

    .line 155
    iget-object v4, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->shadowView:Landroid/widget/ImageView;

    invoke-virtual {v4, v0}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 157
    :cond_14a
    iget-object v4, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

    const-string v5, "chats_menuPhoneCats"

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

    move-result v5

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

    .line 158
    invoke-super/range {p0 .. p1}, Landroid/widget/FrameLayout;->onDraw(Landroid/graphics/Canvas;)V

    .line 161
    .end local v0    # "visibility":I
    :goto_158
    iget-object v0, v1, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->snowflakesEffect:Lim/tpelyyftgw/ui/components/SnowflakesEffect;

    if-eqz v0, :cond_15f

    .line 162
    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/components/SnowflakesEffect;->onDraw(Landroid/view/View;Landroid/graphics/Canvas;)V

    .line 164
    :cond_15f
    return-void
.end method

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

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

    const/high16 v1, 0x43140000    # 148.0f

    const/high16 v2, 0x40000000    # 2.0f

    const/16 v3, 0x15

    if-lt v0, v3, :cond_21

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

    move-result v0

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

    move-result v0

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

    move-result v1

    sget v3, Lim/tpelyyftgw/messenger/AndroidUtilities;->statusBarHeight:I

    add-int/2addr v1, v3

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

    move-result v1

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

    goto :goto_44

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

    move-result v0

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

    move-result v0

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

    move-result v3

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

    move-result v2

    invoke-super {p0, v0, v2}, Landroid/widget/FrameLayout;->onMeasure(II)V
    :try_end_34
    .catch Ljava/lang/Exception; {:try_start_21 .. :try_end_34} :catch_35

    .line 101
    goto :goto_44

    .line 98
    :catch_35
    move-exception v0

    .line 99
    .local v0, "e":Ljava/lang/Exception;
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v2

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

    move-result v1

    invoke-virtual {p0, v2, v1}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->setMeasuredDimension(II)V

    .line 100
    invoke-static {v0}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 103
    .end local v0    # "e":Ljava/lang/Exception;
    :goto_44
    return-void
.end method

.method public setAccountsShowed(Z)V
    .registers 4
    .param p1, "value"    # Z

    .line 171
    iget-boolean v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    if-ne v0, p1, :cond_5

    .line 172
    return-void

    .line 174
    :cond_5
    iput-boolean p1, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    .line 175
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    if-eqz p1, :cond_f

    const v1, 0x7f0800df

    goto :goto_12

    :cond_f
    const v1, 0x7f0800de

    :goto_12
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 176
    return-void
.end method

.method public setOnArrowClickListener(Landroid/view/View$OnClickListener;)V
    .registers 4
    .param p1, "onClickListener"    # Landroid/view/View$OnClickListener;

    .line 179
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    new-instance v1, Lim/tpelyyftgw/ui/cells/-$$Lambda$DrawerProfileCell$eblY0WqThfGeZ-eD33-aivv8duA;

    invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/cells/-$$Lambda$DrawerProfileCell$eblY0WqThfGeZ-eD33-aivv8duA;-><init>(Lim/tpelyyftgw/ui/cells/DrawerProfileCell;Landroid/view/View$OnClickListener;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 185
    return-void
.end method

.method public setUser(Lim/tpelyyftgw/tgnet/TLRPC$User;Z)V
    .registers 7
    .param p1, "user"    # Lim/tpelyyftgw/tgnet/TLRPC$User;
    .param p2, "accounts"    # Z

    .line 188
    if-nez p1, :cond_3

    .line 189
    return-void

    .line 191
    :cond_3
    iput-boolean p2, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->accountsShowed:Z

    .line 192
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->arrowView:Landroid/widget/ImageView;

    if-eqz p2, :cond_d

    const v1, 0x7f0800df

    goto :goto_10

    :cond_d
    const v1, 0x7f0800de

    :goto_10
    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 193
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->nameTextView:Landroid/widget/TextView;

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

    move-result-object v1

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

    .line 194
    iget-object v0, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->phoneTextView:Landroid/widget/TextView;

    invoke-static {}, Lim/tpelyyftgw/phoneformat/PhoneFormat;->getInstance()Lim/tpelyyftgw/phoneformat/PhoneFormat;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "+"

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

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

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

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

    move-result-object v2

    invoke-virtual {v1, v2}, Lim/tpelyyftgw/phoneformat/PhoneFormat;->format(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

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

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

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

    .line 196
    .local v0, "avatarDrawable":Lim/tpelyyftgw/ui/components/AvatarDrawable;
    const-string v1, "avatar_backgroundInProfileBlue"

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

    move-result v1

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

    .line 197
    iget-object v1, p0, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->avatarImageView:Lim/tpelyyftgw/ui/components/BackupImageView;

    const/4 v2, 0x0

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

    move-result-object v2

    const-string v3, "50_50"

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

    .line 199
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lim/tpelyyftgw/ui/cells/DrawerProfileCell;->applyBackground(Z)Ljava/lang/String;

    .line 200
    return-void
.end method