77 加入房间前判断上一个房间是否游戏中,日志上传后删除之前的日志数据。
This commit is contained in:
@@ -111,12 +111,11 @@ public class RoomKtvFragment extends BaseMvpFragment<RoomPresenter, FragmentRoom
|
||||
|
||||
@Override
|
||||
public void onRefPitchUpdate(float refPitch, int numberOfRefPitches) {
|
||||
mKaraokeView.setPitch(refPitch);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLineFinished(KaraokeView view, LyricsLineModel line, int score, int cumulativeScore, int index, int numberOfLines) {
|
||||
LogUtils.e("onLineFinished :" + score + " " + cumulativeScore + " " + index + " " + numberOfLines);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.modulemain.activity.room.contacts.RoomContacts;
|
||||
import com.xscm.moduleutil.base.CommonAppContext;
|
||||
import com.xscm.moduleutil.bean.BeforeJoinRoomCheckBean;
|
||||
import com.xscm.moduleutil.bean.RedPacketInfo;
|
||||
import com.xscm.moduleutil.bean.RoomCharmRankBean;
|
||||
import com.xscm.moduleutil.bean.TasksMessage;
|
||||
@@ -40,7 +41,24 @@ public class RoomPresenter extends BasePresenter<RoomContacts.View> implements R
|
||||
// TODO: 2025/6/10 加入房间
|
||||
@Override
|
||||
public void getRoomIn(String roomId, String password) {
|
||||
RetrofitClient.getInstance().beforeJoinRoomCheck(roomId, new BaseObserver<BeforeJoinRoomCheckBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(BeforeJoinRoomCheckBean beforeJoinRoomCheckBean) {
|
||||
if (beforeJoinRoomCheckBean.getRoom_id() == null || beforeJoinRoomCheckBean.getRoom_id().equals("")) {
|
||||
joinRoom(roomId, password);
|
||||
}else {
|
||||
queren(beforeJoinRoomCheckBean.getRoom_id(), beforeJoinRoomCheckBean.getMsg());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void joinRoom(String roomId, String password){
|
||||
api.roomGetIn(roomId, password, new BaseObserver<RoomInfoResp>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
@@ -109,6 +109,14 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
||||
boolean isZip = ZipUtils.zipFile(Application.Companion.getInstance().getAppContent(),
|
||||
file.getParent() + "/DataInfo.zip");
|
||||
if (isZip) {
|
||||
File fileLog = new File(Application.Companion.getInstance().getAppLogPath());
|
||||
File fileCrash = new File(Application.Companion.getInstance().getAppCrashPath());
|
||||
if (FileUtils.isFileExists(fileLog)) {
|
||||
FileUtils.delete(fileLog);
|
||||
}
|
||||
if (FileUtils.isFileExists(fileCrash)) {
|
||||
FileUtils.delete(fileCrash);
|
||||
}
|
||||
emitter.onNext(file.getParent() + "/DataInfo.zip");
|
||||
} else {
|
||||
emitter.onNext("");
|
||||
@@ -144,6 +152,9 @@ public class SettingPresenter extends BasePresenter<SettingConacts.View> impleme
|
||||
public void onNext(String s) {
|
||||
MvpRef.get().disLoadings();
|
||||
ToastUtils.showShort(s);
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user