update
This commit is contained in:
@@ -91,4 +91,8 @@ public class EndCallActivity extends AbsOTOActivity {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
super.onBackPressed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public class MainActivity extends AbsOTOActivity {
|
|||||||
List<BaseFragment> fragments = new ArrayList<>();
|
List<BaseFragment> fragments = new ArrayList<>();
|
||||||
private ViewPager2 viewPager;
|
private ViewPager2 viewPager;
|
||||||
private DslTabLayout dslTabLayout;
|
private DslTabLayout dslTabLayout;
|
||||||
|
private long mLastClickBackTime;//上次点击back键的时间
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
@@ -220,7 +221,7 @@ public class MainActivity extends AbsOTOActivity {
|
|||||||
for (OfficialNoticeBean datum : data) {
|
for (OfficialNoticeBean datum : data) {
|
||||||
point += datum.getNum();
|
point += datum.getNum();
|
||||||
}
|
}
|
||||||
Bus.get().post(new MessageMsgBusEvent(MessageMsgBusEvent.TYPE_UPDATE_SYSTEM,point + count));
|
Bus.get().post(new MessageMsgBusEvent(MessageMsgBusEvent.TYPE_UPDATE_SYSTEM, point + count));
|
||||||
//大于0则是通过会话未读监听器获取到的数,则不用再调用获取未读数接口了
|
//大于0则是通过会话未读监听器获取到的数,则不用再调用获取未读数接口了
|
||||||
if (count >= 0) {
|
if (count >= 0) {
|
||||||
updateUnreadCount(point + count);
|
updateUnreadCount(point + count);
|
||||||
@@ -256,6 +257,17 @@ public class MainActivity extends AbsOTOActivity {
|
|||||||
return R.layout.activity_main;
|
return R.layout.activity_main;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
long curTime = System.currentTimeMillis();
|
||||||
|
if (curTime - mLastClickBackTime > 2000) {
|
||||||
|
mLastClickBackTime = curTime;
|
||||||
|
ToastUtil.show(R.string.main_click_next_exit);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
super.onBackPressed();
|
||||||
|
}
|
||||||
|
|
||||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void busEvent(MessageMsgBusEvent event) {
|
public void busEvent(MessageMsgBusEvent event) {
|
||||||
if (event.getType() == MessageMsgBusEvent.TYPE_ALL_READ) {
|
if (event.getType() == MessageMsgBusEvent.TYPE_ALL_READ) {
|
||||||
|
|||||||
@@ -182,6 +182,9 @@ public class MsgFriendFragment extends BaseFragment implements BaseAdapter.OnIte
|
|||||||
RongIMClient.getInstance().getConversation(Conversation.ConversationType.PRIVATE, item.getId() + "", new RongIMClient.ResultCallback<Conversation>() {
|
RongIMClient.getInstance().getConversation(Conversation.ConversationType.PRIVATE, item.getId() + "", new RongIMClient.ResultCallback<Conversation>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Conversation conversation) {
|
public void onSuccess(Conversation conversation) {
|
||||||
|
if(conversation==null){
|
||||||
|
conversation=new Conversation();
|
||||||
|
}
|
||||||
SingleConversation singleConversation = new SingleConversation(mContext, conversation);
|
SingleConversation singleConversation = new SingleConversation(mContext, conversation);
|
||||||
if (StringUtil.isEmpty(singleConversation.mConversationContent.toString())) {
|
if (StringUtil.isEmpty(singleConversation.mConversationContent.toString())) {
|
||||||
singleConversation.mConversationContent = new SpannableString("你们什么都没聊");
|
singleConversation.mConversationContent = new SpannableString("你们什么都没聊");
|
||||||
|
|||||||
Reference in New Issue
Block a user