Search in sources :

Example 1 with PublicMsgInfo

use of com.juns.wechat.bean.PublicMsgInfo in project wechat by motianhuo.

the class Fragment_Msg method initViews.

private void initViews() {
    conversationList.addAll(loadConversationsWithRecentChat());
    if (conversationList != null && conversationList.size() > 0) {
        layout.findViewById(R.id.txt_nochat).setVisibility(View.GONE);
        adpter = new NewMsgAdpter(getActivity(), conversationList);
        // TODO 加载订阅号信息 ,增加一个Item
        // if (GloableParams.isHasPulicMsg) {
        EMConversation nee = new EMConversation("100000");
        conversationList.add(0, nee);
        String time = Utils.getValue(getActivity(), "Time");
        String content = Utils.getValue(getActivity(), "Content");
        time = "下午 02:45";
        content = "[腾讯娱乐]《炉石传说》荣列中国区App Store年度精选";
        PublicMsgInfo msgInfo = new PublicMsgInfo();
        msgInfo.setContent(content);
        msgInfo.setMsg_ID("12");
        msgInfo.setTime(time);
        adpter.setPublicMsg(msgInfo);
        // }
        lvContact.setAdapter(adpter);
    } else {
        layout.findViewById(R.id.txt_nochat).setVisibility(View.VISIBLE);
    }
}
Also used : EMConversation(com.easemob.chat.EMConversation) NewMsgAdpter(com.juns.wechat.adpter.NewMsgAdpter) PublicMsgInfo(com.juns.wechat.bean.PublicMsgInfo)

Aggregations

EMConversation (com.easemob.chat.EMConversation)1 NewMsgAdpter (com.juns.wechat.adpter.NewMsgAdpter)1 PublicMsgInfo (com.juns.wechat.bean.PublicMsgInfo)1