Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0d12df93ab
@ -455,6 +455,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
if (index == 0) {
|
||||
isfloatBannernet = true;
|
||||
initAnchorRecommendBanner();
|
||||
} else if (index == 2) {
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
isfloatBannernet = false;
|
||||
if (mainMessageViewHolder != null)
|
||||
mainMessageViewHolder.onResume();
|
||||
} else {
|
||||
floatBanner.setVisibility(View.GONE);
|
||||
findViewById(R.id.banner_click).setVisibility(View.GONE);
|
||||
|
@ -99,6 +99,12 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
return R.layout.view_main_message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
EventBus.getDefault().register(this);
|
||||
@ -113,7 +119,7 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
imgNewsInteraction = (ImageView) findViewById(R.id.img_news_interaction);
|
||||
imgNewsOnline = (ImageView) findViewById(R.id.img_news_online);
|
||||
netHandler = new Handler();
|
||||
initData();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -179,27 +185,28 @@ public class MainMessageViewHolder extends AbsMainViewHolder {
|
||||
@Override
|
||||
public void run() {
|
||||
netHandler.post(imUserInfoRunnable);
|
||||
if (IMLoginManager.get(mContext).hintChat()) {
|
||||
container.setVisibility(View.GONE);
|
||||
ltNodataMsg.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
container.setVisibility(View.VISIBLE);
|
||||
ltNodataMsg.setVisibility(View.GONE);
|
||||
//展示会话列表
|
||||
conversationListFragment = new ConversationListFragment();
|
||||
FragmentManager manager = ((FragmentActivity) mContext).getSupportFragmentManager();
|
||||
FragmentTransaction transaction = manager.beginTransaction();
|
||||
transaction.replace(R.id.container, conversationListFragment);
|
||||
transaction.commit();
|
||||
//自定义空数据背景View
|
||||
conversationListFragment.setEmptyView(com.yunbao.live.R.layout.view_layout_msg);
|
||||
//刷新列表内用户信息
|
||||
ConversationIMListManager.get(mContext).addUserInfoProvider();
|
||||
}
|
||||
//获取一下系统通知
|
||||
MessageIMManager.get(mContext).getSystemMessages();
|
||||
}
|
||||
});
|
||||
if (IMLoginManager.get(mContext).hintChat()) {
|
||||
container.setVisibility(View.GONE);
|
||||
ltNodataMsg.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
container.setVisibility(View.VISIBLE);
|
||||
ltNodataMsg.setVisibility(View.GONE);
|
||||
//展示会话列表
|
||||
conversationListFragment = new ConversationListFragment();
|
||||
FragmentManager manager = ((FragmentActivity) mContext).getSupportFragmentManager();
|
||||
FragmentTransaction transaction = manager.beginTransaction();
|
||||
transaction.replace(R.id.container, conversationListFragment);
|
||||
transaction.commit();
|
||||
//自定义空数据背景View
|
||||
conversationListFragment.setEmptyView(com.yunbao.live.R.layout.view_layout_msg);
|
||||
//刷新列表内用户信息
|
||||
ConversationIMListManager.get(mContext).addUserInfoProvider();
|
||||
}
|
||||
//获取一下系统通知
|
||||
MessageIMManager.get(mContext).getSystemMessages();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user