fix bugs 55 4
This commit is contained in:
@@ -161,7 +161,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
|||||||
//设置mqtt环境 false 测试环境 true 正式环境
|
//设置mqtt环境 false 测试环境 true 正式环境
|
||||||
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
// ExternalResConstants.INSTANCE.setIS_MQTT_RELEASE(false);
|
||||||
//设置http环境 false 测试环境 true 正式环境
|
//设置http环境 false 测试环境 true 正式环境
|
||||||
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(true);
|
ExternalResConstants.INSTANCE.setIS_HTTP_RELEASE(false);
|
||||||
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
currentEnvironment = ExternalResConstants.INSTANCE.HTTP_PATH();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.content.Context;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import com.alibaba.android.arouter.launcher.ARouter;
|
import com.alibaba.android.arouter.launcher.ARouter;
|
||||||
|
import com.blankj.utilcode.util.ActivityUtils;
|
||||||
import com.xscm.moduleutil.base.CommonAppContext;
|
import com.xscm.moduleutil.base.CommonAppContext;
|
||||||
|
|
||||||
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
||||||
@@ -38,6 +39,7 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler {
|
|||||||
private void restartApp() {
|
private void restartApp() {
|
||||||
// 实现应用重启逻辑
|
// 实现应用重启逻辑
|
||||||
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
ARouter.getInstance().build(ARouteConstants.ME).navigation();
|
||||||
|
ActivityUtils.finishAllActivities();
|
||||||
CommonAppContext.getInstance().initialization();
|
CommonAppContext.getInstance().initialization();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,8 +81,18 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
@Override
|
@Override
|
||||||
public void applyPit() {
|
public void applyPit() {
|
||||||
|
|
||||||
|
}
|
||||||
|
public FriendshipRoomFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FriendshipRoomFragment(RoomInfoResp roomInfoResp) {
|
||||||
|
this.roomInfoResp = roomInfoResp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FriendshipRoomFragment newInstance(RoomInfoResp roomInfoResp) {
|
||||||
|
FriendshipRoomFragment fragment = new FriendshipRoomFragment(roomInfoResp);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public void endFriend(FriendUserBean friendUserBean) {
|
public void endFriend(FriendUserBean friendUserBean) {
|
||||||
if (friendUserBean != null) {
|
if (friendUserBean != null) {
|
||||||
@@ -152,17 +162,7 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public FriendshipRoomFragment(){}
|
|
||||||
public FriendshipRoomFragment(RoomInfoResp roomInfoResp){
|
|
||||||
this.roomInfoResp = roomInfoResp;
|
|
||||||
}
|
|
||||||
// TODO: Rename and change types and number of parameters
|
|
||||||
public static FriendshipRoomFragment newInstance(RoomInfoResp roomInfoResp) {
|
|
||||||
FriendshipRoomFragment fragment = new FriendshipRoomFragment(roomInfoResp);
|
|
||||||
Bundle args = new Bundle();
|
|
||||||
fragment.setArguments(args);
|
|
||||||
return fragment;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -239,6 +239,7 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
initPopupWindow();
|
initPopupWindow();
|
||||||
|
|
||||||
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
roomId = roomInfoResp.getRoom_info().getRoom_id();
|
||||||
|
|
||||||
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
for (int i = 0; i < roomInfoResp.getRoom_info().getPit_list().size(); i++) {
|
||||||
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
RoomPitBean roomPitBean = roomInfoResp.getRoom_info().getPit_list().get(i);
|
||||||
if (i == 6 || i == 7) {
|
if (i == 6 || i == 7) {
|
||||||
@@ -447,6 +448,11 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
if (fromUserInfo == null) return;
|
if (fromUserInfo == null) return;
|
||||||
|
|
||||||
String pitNumber = messageEvent.getText().getPit_number();
|
String pitNumber = messageEvent.getText().getPit_number();
|
||||||
|
|
||||||
|
if (Integer.parseInt(pitNumber) == 7 || Integer.parseInt(pitNumber) == 8 || Integer.parseInt(pitNumber) > 10) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int userId = fromUserInfo.getUser_id();
|
int userId = fromUserInfo.getUser_id();
|
||||||
RoomPitBean pitBean = mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean;
|
RoomPitBean pitBean = mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean;
|
||||||
pitBean.setUser_id(userId + "");
|
pitBean.setUser_id(userId + "");
|
||||||
@@ -469,6 +475,9 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
|
|
||||||
public void event1004(RoomMessageEvent messageEvent) {
|
public void event1004(RoomMessageEvent messageEvent) {
|
||||||
String pitNumber = messageEvent.getText().getPit_number();
|
String pitNumber = messageEvent.getText().getPit_number();
|
||||||
|
if (Integer.parseInt(pitNumber) == 7 || Integer.parseInt(pitNumber) == 8 || Integer.parseInt(pitNumber) > 10) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
RoomPitBean pitBean = mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean;
|
RoomPitBean pitBean = mWheatViews.get(Integer.parseInt(pitNumber) - 1).pitBean;
|
||||||
pitBean.setUser_id("");
|
pitBean.setUser_id("");
|
||||||
pitBean.setAvatar("");
|
pitBean.setAvatar("");
|
||||||
@@ -511,6 +520,11 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
if (fromPit.equals("") || toPitNumber.equals("")) {
|
if (fromPit.equals("") || toPitNumber.equals("")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (Integer.parseInt(toPitNumber) == 7 || Integer.parseInt(toPitNumber) == 8 ||
|
||||||
|
Integer.parseInt(toPitNumber) > 10 ||
|
||||||
|
(Integer.parseInt(toPitNumber) == 0 || Integer.parseInt(fromPit) == 0)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
RoomFriendshipWheatView fromWheatView = mWheatViews.get(Integer.parseInt(fromPit) - 1);
|
RoomFriendshipWheatView fromWheatView = mWheatViews.get(Integer.parseInt(fromPit) - 1);
|
||||||
RoomFriendshipWheatView toWheatView = mWheatViews.get(Integer.parseInt(toPitNumber) - 1);
|
RoomFriendshipWheatView toWheatView = mWheatViews.get(Integer.parseInt(toPitNumber) - 1);
|
||||||
RoomPitBean fromPitBean = fromWheatView.pitBean;
|
RoomPitBean fromPitBean = fromWheatView.pitBean;
|
||||||
@@ -680,6 +694,7 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
// 设置弹出视图中的点击事件
|
// 设置弹出视图中的点击事件
|
||||||
setPopupMenuClickListener(popupView, null);
|
setPopupMenuClickListener(popupView, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("UseSwitchCompatOrMaterialCode")
|
@SuppressLint("UseSwitchCompatOrMaterialCode")
|
||||||
private void setPopupMenuClickListener(View popupView, View view) {
|
private void setPopupMenuClickListener(View popupView, View view) {
|
||||||
|
|
||||||
@@ -862,6 +877,7 @@ public class FriendshipRoomFragment extends BaseRoomFragment<FriendshipRoomPrese
|
|||||||
|
|
||||||
// 可以根据需要更新其他UI元素
|
// 可以根据需要更新其他UI元素
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 心动数值变化
|
* 心动数值变化
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user