ChatActivity$ChatActivityAdapter$4.smali

.class Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;
.super Ljava/lang/Object;
.source "ChatActivity.java"

# interfaces
.implements Landroid/view/ViewTreeObserver$OnPreDrawListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;->onViewAttachedToWindow(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
.end annotation

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


# instance fields
.field final synthetic this$1:Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;

.field final synthetic val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;


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

    return-void
.end method

.method constructor <init>(Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;Lim/tpelyyftgw/ui/cells/ChatMessageCell;)V
    .registers 3
    .param p1, "this$1"    # Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;

    .line 19687
    iput-object p1, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->this$1:Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;

    iput-object p2, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;

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

    return-void
.end method


# virtual methods
.method public onPreDraw()Z
    .registers 8

    .line 19690
    iget-object v0, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/cells/ChatMessageCell;->getViewTreeObserver()Landroid/view/ViewTreeObserver;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/ViewTreeObserver;->removeOnPreDrawListener(Landroid/view/ViewTreeObserver$OnPreDrawListener;)V

    .line 19692
    iget-object v0, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->this$1:Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;

    iget-object v0, v0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter;->this$0:Lim/tpelyyftgw/ui/ChatActivity;

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

    move-result-object v0

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

    move-result v0

    .line 19693
    .local v0, "height":I
    iget-object v1, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;

    invoke-virtual {v1}, Lim/tpelyyftgw/ui/cells/ChatMessageCell;->getTop()I

    move-result v1

    .line 19694
    .local v1, "top":I
    iget-object v2, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;

    invoke-virtual {v2}, Lim/tpelyyftgw/ui/cells/ChatMessageCell;->getBottom()I

    move-result v2

    .line 19695
    .local v2, "bottom":I
    if-ltz v1, :cond_25

    const/4 v3, 0x0

    goto :goto_26

    :cond_25
    neg-int v3, v1

    .line 19696
    .local v3, "viewTop":I
    :goto_26
    iget-object v4, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;

    invoke-virtual {v4}, Lim/tpelyyftgw/ui/cells/ChatMessageCell;->getMeasuredHeight()I

    move-result v4

    .line 19697
    .local v4, "viewBottom":I
    if-le v4, v0, :cond_30

    .line 19698
    add-int v4, v3, v0

    .line 19700
    :cond_30
    iget-object v5, p0, Lim/tpelyyftgw/ui/ChatActivity$ChatActivityAdapter$4;->val$messageCell:Lim/tpelyyftgw/ui/cells/ChatMessageCell;

    sub-int v6, v4, v3

    invoke-virtual {v5, v3, v6}, Lim/tpelyyftgw/ui/cells/ChatMessageCell;->setVisiblePart(II)V

    .line 19702
    const/4 v5, 0x1

    return v5
.end method