TeamMemberItemViewModel.smali

.class public Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;
.super Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;
.source "TeamMemberItemViewModel.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/sandboxol/common/base/viewmodel/ListItemViewModel<",
        "Lcom/sandboxol/greendao/entity/TeamMember;",
        ">;"
    }
.end annotation

.annotation runtime Ljava/lang/Deprecated;
.end annotation


# instance fields
.field private isMyRoom:Z

.field public onClickDelete:Lcom/sandboxol/common/command/ReplyCommand;

.field public onClickHead:Lcom/sandboxol/common/command/ReplyCommand;


# direct methods
.method public constructor <init>(Landroid/content/Context;Lcom/sandboxol/greendao/entity/TeamMember;Z)V
    .registers 4

    .line 1
    invoke-direct {p0, p1, p2}, Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;-><init>(Landroid/content/Context;Ljava/lang/Object;)V

    .line 2
    new-instance p1, Lcom/sandboxol/common/command/ReplyCommand;

    new-instance p2, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel$1;

    invoke-direct {p2, p0}, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel$1;-><init>(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)V

    invoke-direct {p1, p2}, Lcom/sandboxol/common/command/ReplyCommand;-><init>(Lrx/functions/Action0;)V

    iput-object p1, p0, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;->onClickDelete:Lcom/sandboxol/common/command/ReplyCommand;

    .line 3
    new-instance p1, Lcom/sandboxol/common/command/ReplyCommand;

    new-instance p2, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel$2;

    invoke-direct {p2, p0}, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel$2;-><init>(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)V

    invoke-direct {p1, p2}, Lcom/sandboxol/common/command/ReplyCommand;-><init>(Lrx/functions/Action0;)V

    iput-object p1, p0, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;->onClickHead:Lcom/sandboxol/common/command/ReplyCommand;

    .line 4
    iput-boolean p3, p0, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;->isMyRoom:Z

    return-void
.end method

.method static synthetic access$000(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)Z
    .registers 1

    .line 1
    iget-boolean p0, p0, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;->isMyRoom:Z

    return p0
.end method

.method static synthetic access$100(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)V
    .registers 1

    .line 1
    invoke-direct {p0}, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;->removeMember()V

    return-void
.end method

.method static synthetic access$200(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)Landroid/content/Context;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;->context:Landroid/content/Context;

    return-object p0
.end method

.method static synthetic access$300(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)Landroid/content/Context;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;->context:Landroid/content/Context;

    return-object p0
.end method

.method static synthetic access$400(Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;)Ljava/lang/Object;
    .registers 1

    .line 1
    iget-object p0, p0, Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;->item:Ljava/lang/Object;

    return-object p0
.end method

.method private removeMember()V
    .registers 4

    .line 1
    invoke-static {}, Lcom/sandboxol/common/messenger/Messenger;->getDefault()Lcom/sandboxol/common/messenger/Messenger;

    move-result-object v0

    iget-object v1, p0, Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;->item:Ljava/lang/Object;

    check-cast v1, Lcom/sandboxol/greendao/entity/TeamMember;

    invoke-virtual {v1}, Lcom/sandboxol/greendao/entity/TeamMember;->getUserId()J

    move-result-wide v1

    invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v1

    const-string v2, "token.team.remove.member"

    invoke-virtual {v0, v1, v2}, Lcom/sandboxol/common/messenger/Messenger;->send(Ljava/lang/Object;Ljava/lang/Object;)V

    return-void
.end method


# virtual methods
.method public getItem()Lcom/sandboxol/greendao/entity/TeamMember;
    .registers 2

    .line 2
    invoke-super {p0}, Lcom/sandboxol/common/base/viewmodel/ListItemViewModel;->getItem()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/sandboxol/greendao/entity/TeamMember;

    return-object v0
.end method

.method public bridge synthetic getItem()Ljava/lang/Object;
    .registers 2

    .line 1
    invoke-virtual {p0}, Lcom/sandboxol/imchat/ui/fragment/team/TeamMemberItemViewModel;->getItem()Lcom/sandboxol/greendao/entity/TeamMember;

    move-result-object v0

    return-object v0
.end method