修复发生闪退时会回到社区且连不上IM的问题
This commit is contained in:
parent
d36ece4c54
commit
4d86317ec8
@ -75,6 +75,9 @@ public class TabButtonGroup extends LinearLayout implements View.OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
public int getCurPosition() {
|
||||
return mCurPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
@ -312,6 +312,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
if(mTabButtonGroup.getCurPosition()!=position){
|
||||
System.err.println("重连IM");
|
||||
RongcloudIMManager.connectIM(mContext.getApplication());
|
||||
position = 0;
|
||||
mTabButtonGroup.setCurPosition(0);
|
||||
}
|
||||
if (position != 0) {
|
||||
loadPageData(position, true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user