|
@@ -36,6 +36,7 @@ import com.dayayuemeng.classroom.model.ScreenDisplay;
|
|
|
import com.dayayuemeng.classroom.model.VideoClassMemberData;
|
|
|
import com.dayayuemeng.classroom.repository.ClassRepository;
|
|
|
import com.google.gson.Gson;
|
|
|
+
|
|
|
import java.io.File;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
@@ -640,7 +641,6 @@ public class ClassViewModel extends ViewModel {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 用户被踢
|
|
|
*
|
|
@@ -1119,7 +1119,7 @@ public class ClassViewModel extends ViewModel {
|
|
|
classRepository.deviceSyncHandUpOn(roomId, userId, handUpOn, new ResultCallback<Boolean>() {
|
|
|
@Override
|
|
|
public void onSuccess(Boolean result) {
|
|
|
- getToastEvent().setValue(handUpOn ? "您已成功举手" :"您已取消举手");
|
|
|
+ getToastEvent().setValue(handUpOn ? "您已成功举手" : "您已取消举手");
|
|
|
stateLiveData.success();
|
|
|
}
|
|
|
|
|
@@ -1200,8 +1200,8 @@ public class ClassViewModel extends ViewModel {
|
|
|
* @param microphone
|
|
|
* @return
|
|
|
*/
|
|
|
- public LiveData<RequestState> batchControlMicrophone(String roomId, boolean microphone,boolean cancelFlag) {
|
|
|
- return batchControlMicrophone(roomId, null, microphone,cancelFlag);
|
|
|
+ public LiveData<RequestState> batchControlMicrophone(String roomId, boolean microphone, boolean cancelFlag) {
|
|
|
+ return batchControlMicrophone(roomId, null, microphone, cancelFlag);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -1238,10 +1238,10 @@ public class ClassViewModel extends ViewModel {
|
|
|
* @return
|
|
|
*/
|
|
|
public LiveData<RequestState> batchControlMicrophone(String roomId, String userId,
|
|
|
- boolean microphone,boolean cancelFlag) {
|
|
|
+ boolean microphone, boolean cancelFlag) {
|
|
|
final StateLiveData stateLiveData = new StateLiveData();
|
|
|
stateLiveData.loading();
|
|
|
- classRepository.batchControlMicrophone(roomId, userId, microphone,cancelFlag, new ResultCallback<Boolean>() {
|
|
|
+ classRepository.batchControlMicrophone(roomId, userId, microphone, cancelFlag, new ResultCallback<Boolean>() {
|
|
|
@Override
|
|
|
public void onSuccess(Boolean result) {
|
|
|
stateLiveData.success();
|
|
@@ -1263,10 +1263,10 @@ public class ClassViewModel extends ViewModel {
|
|
|
* @param
|
|
|
* @return
|
|
|
*/
|
|
|
- public LiveData<RequestState> batchControlMuteCancelFlag(String roomId,boolean cancelFlag) {
|
|
|
+ public LiveData<RequestState> batchControlMuteCancelFlag(String roomId, boolean cancelFlag) {
|
|
|
final StateLiveData stateLiveData = new StateLiveData();
|
|
|
stateLiveData.loading();
|
|
|
- classRepository.batchControlMuteCancelFlag(roomId,cancelFlag, new ResultCallback<Boolean>() {
|
|
|
+ classRepository.batchControlMuteCancelFlag(roomId, cancelFlag, new ResultCallback<Boolean>() {
|
|
|
@Override
|
|
|
public void onSuccess(Boolean result) {
|
|
|
stateLiveData.success();
|
|
@@ -1764,7 +1764,7 @@ public class ClassViewModel extends ViewModel {
|
|
|
classRepository.createWhiteBoard(roomId, new ResultCallback<WhiteCreateBean>() {
|
|
|
@Override
|
|
|
public void onSuccess(WhiteCreateBean result) {
|
|
|
- LOG.i("pq","createWhiteBoard onSuccess:"+result);
|
|
|
+ LOG.i("pq", "createWhiteBoard onSuccess:" + result);
|
|
|
createWhiteBoard.postValue(result);
|
|
|
}
|
|
|
|
|
@@ -1811,7 +1811,7 @@ public class ClassViewModel extends ViewModel {
|
|
|
LOG.i("白板问题==WhiteBoardInsertImage = fileUrl==" + fileUrl);
|
|
|
final StateLiveData stateLiveData = new StateLiveData();
|
|
|
stateLiveData.loading();
|
|
|
- UploadHelper uploadHelper = new UploadHelper(null,"");
|
|
|
+ UploadHelper uploadHelper = new UploadHelper(null, "");
|
|
|
uploadHelper.uploadFile(new File(fileUrl));
|
|
|
uploadHelper.setUpLoadCallBack(new UploadHelper.UpLoadCallBack() {
|
|
|
@Override
|
|
@@ -2281,7 +2281,7 @@ public class ClassViewModel extends ViewModel {
|
|
|
if (!isInList) {
|
|
|
memberListValue.add(classMember);
|
|
|
memberList.postValue(sortClassMember(memberListValue));
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
updateClassMember(classMember);
|
|
|
}
|
|
|
} else {
|
|
@@ -3028,6 +3028,14 @@ public class ClassViewModel extends ViewModel {
|
|
|
}
|
|
|
|
|
|
public void getCoursewareList(String searchStr, int page, CoursewareDataResultCallBack<CoursewareListBean> callBack) {
|
|
|
- classRepository.getCoursewareList(searchStr, page,callBack);
|
|
|
+ classRepository.getCoursewareList(searchStr, page, callBack);
|
|
|
+ }
|
|
|
+
|
|
|
+ public boolean isWhiteBoardMode() {
|
|
|
+ ScreenDisplay screenDisplay = getDisplay().getValue();
|
|
|
+ if (screenDisplay != null && screenDisplay.getType() == ScreenDisplay.Display.WHITEBOARD) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|