|
@@ -175,7 +175,7 @@ public class VideoListFragment extends BaseMVPFragment<FgVideoListLayoutBinding,
|
|
|
public void onChanged(ScreenDisplay screenDisplay) {
|
|
|
Log.i(TAG, "display change:" + screenDisplay.toString());
|
|
|
ScreenDisplay.Display type = screenDisplay.getType();
|
|
|
- if (type == ScreenDisplay.Display.LECTURER || type == ScreenDisplay.Display.STUDENT) {
|
|
|
+ if (type == ScreenDisplay.Display.LECTURER || type == ScreenDisplay.Display.STUDENT || type == ScreenDisplay.Display.WHITEBOARD) {
|
|
|
String userId = screenDisplay.getUserId();
|
|
|
handleScreenDisplayChange(userId);
|
|
|
} else if (type == ScreenDisplay.Display.NONE) {
|
|
@@ -283,7 +283,7 @@ public class VideoListFragment extends BaseMVPFragment<FgVideoListLayoutBinding,
|
|
|
for (int i = 0; i < mListAdapter.getData().size(); i++) {
|
|
|
VideoListBean videoListBean = mListAdapter.getData().get(i);
|
|
|
if (isOwner(videoListBean.getUserId())) {
|
|
|
- if (TextUtils.equals(mainUserId, ownerVideoListBean.getUserId())) {
|
|
|
+ if (TextUtils.equals(mainUserId, ownerVideoListBean.getUserId())&& isTeacherOnMain()) {
|
|
|
//主屏是老师
|
|
|
ownerVideoListBean.setOnMain(true);
|
|
|
ownerVideoListBean.setStatusTip(getEmptyTip());
|
|
@@ -338,7 +338,7 @@ public class VideoListFragment extends BaseMVPFragment<FgVideoListLayoutBinding,
|
|
|
mVideoListBeans.get(i).setStatusTip(getEmptyTip());
|
|
|
}
|
|
|
mListAdapter.setList(mVideoListBeans);
|
|
|
- showEmptyView(mVideoListBeans.size() <= 1);//至少包含老师自己的
|
|
|
+ showEmptyView(isTeacherOnMain() && mVideoListBeans.size() <= 1);//至少包含老师自己的
|
|
|
}
|
|
|
|
|
|
private void showEmptyView(boolean isShow) {
|
|
@@ -415,6 +415,14 @@ public class VideoListFragment extends BaseMVPFragment<FgVideoListLayoutBinding,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private boolean isTeacherOnMain() {
|
|
|
+ ScreenDisplay value = mClassViewModel.getDisplay().getValue();
|
|
|
+ if (value != null) {
|
|
|
+ return value.getType() == ScreenDisplay.Display.LECTURER;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
private boolean isOwner(String userId) {
|
|
|
return TextUtils.equals(userId, currentUserId);
|
|
|
}
|