导航菜单

页面标题

页面副标题

TruCred v1.1.3 - MessageCenterDetailActivity.java 源代码

正在查看: TruCred v1.1.3 应用的 MessageCenterDetailActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.veloz.app.ui.mine;

import android.view.View;
import androidx.lifecycle.Observer;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.veloz.app.R$layout;
import com.veloz.app.adapter.MessageCenterDetailAdapter;
import com.veloz.app.base.AutoArg;
import com.veloz.app.databinding.MessageCenterDetailActivityBinding;
import com.veloz.app.entity.PageInfo;
import com.veloz.app.my.MyActivity;
import com.veloz.app.utils.SensorsHelper;
import java.util.ArrayList;
import java.util.List;

public class MessageCenterDetailActivity extends MyActivity<MessageCenterDetailActivityBinding, MessageCenterDetailActivityViewModel> {
    public List e = new ArrayList();
    public MessageCenterDetailAdapter f;

    @AutoArg
    int msgType;

    public void v(View view) {
        finish();
    }

    @Override
    public void initData() {
        MessageCenterDetailAdapter messageCenterDetailAdapter = new MessageCenterDetailAdapter(this.e);
        this.f = messageCenterDetailAdapter;
        messageCenterDetailAdapter.y(true);
        ((MessageCenterDetailActivityBinding) this.bind).a.setLayoutManager(new LinearLayoutManager(this));
        ((MessageCenterDetailActivityBinding) this.bind).a.setAdapter(this.f);
        ((MessageCenterDetailActivityViewModel) this.vm).c(this.msgType);
    }

    @Override
    public void m() {
        ((MessageCenterDetailActivityBinding) this.bind).b.h(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MessageCenterDetailActivity.this.v(view);
            }
        });
    }

    @Override
    public int myView() {
        return R$layout.message_center_detail_activity;
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        if (this.msgType == 1) {
            SensorsHelper.h("messagelist", "SystemMessage");
        }
        if (this.msgType == 2) {
            SensorsHelper.h("messagelist", "UserMessage");
        }
    }

    @Override
    public void p() {
        ((MessageCenterDetailActivityViewModel) this.vm).b.observe(this, new Observer() {
            public final void onChanged(Object obj) {
                MessageCenterDetailActivity.this.w((PageInfo) obj);
            }
        });
    }

    public final void w(PageInfo pageInfo) {
        List list = pageInfo.rows;
        this.e = list;
        y(list);
    }

    @Override
    public void o(MessageCenterDetailActivityBinding messageCenterDetailActivityBinding, MessageCenterDetailActivityViewModel messageCenterDetailActivityViewModel) {
        super.o(messageCenterDetailActivityBinding, messageCenterDetailActivityViewModel);
        if (this.msgType == 1) {
            SensorsHelper.k("messagelist", "SystemMessage");
        }
        if (this.msgType == 2) {
            SensorsHelper.k("messagelist", "UserMessage");
        }
        messageCenterDetailActivityBinding.a(messageCenterDetailActivityViewModel);
    }

    public final void y(List list) {
        if (list == null || list.isEmpty()) {
            this.f.z(this, R$layout.item_enable);
        } else {
            this.f.submitList(list);
        }
    }
}