avoid null items in presenter pod dropdown

This commit is contained in:
Anton Georgiev 2017-11-01 11:18:57 -04:00
parent 9818fca29e
commit d6a7e04715
5 changed files with 6 additions and 16 deletions

1
.gitignore vendored
View File

@ -26,6 +26,7 @@ bigbluebutton-web/.classpath
bigbluebutton-web/.project
akka-bbb-apps/akka-bbb-apps*.log
bigbluebutton-html5/log/development.log
bigbluebutton-client/.actionScriptProperties
bigbluebutton-web/target-eclipse*
record-and-playback/.loadpath
clients/flash/**/build

View File

@ -208,7 +208,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
icon: getStyle('iconClearStatus'), handler: closePresentationWindowHandler});
}
if (this.ownerId != null && this.ownerId != "") {
if (this.ownerId != null && this.ownerId != "" && UsersUtil.getUserName(this.ownerId) != null) {
listOfPodControls.push({label: UsersUtil.getUserName(this.ownerId),
icon: getStyle('iconClearStatus'), handler: requestPodPresenterChange, data: this.ownerId});
}
@ -216,7 +216,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var presGroup: ArrayCollection = UsersUtil.getPresenterGroup();
for (var j:int = 0; j < presGroup.length; j++) {
var nextPresenterId: String = presGroup.getItemAt(j) as String;
if (nextPresenterId != this.ownerId) { // avoid duplication
if (nextPresenterId != this.ownerId && UsersUtil.getUserName(nextPresenterId) != null) { // avoid duplication
listOfPodControls.push({label: UsersUtil.getUserName(nextPresenterId),
icon: getStyle('iconClearStatus'), handler: requestPodPresenterChange, data: nextPresenterId});
}

View File

@ -18,7 +18,6 @@
*/
package org.bigbluebutton.modules.whiteboard
{
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
import org.bigbluebutton.modules.whiteboard.views.AnnotationIDGenerator;
import org.bigbluebutton.modules.whiteboard.views.CursorPositionListener;
@ -114,9 +113,5 @@ package org.bigbluebutton.modules.whiteboard
cursorPositionListener.multiUserChange(multiUser);
}
/** Helper method to test whether this user is the presenter */
// private function get isPresenter():Boolean {
// return UsersUtil.amIPresenter();
// }
}
}

View File

@ -3,7 +3,6 @@ package org.bigbluebutton.modules.whiteboard.views {
import flash.geom.Point;
import flash.utils.Timer;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.model.LiveMeeting;
import org.bigbluebutton.modules.whiteboard.business.shapes.ShapeFactory;
@ -37,7 +36,7 @@ package org.bigbluebutton.modules.whiteboard.views {
}
private function verifyTimerState(amIPresenter:Boolean=false):void {
if (amIPresenter || UsersUtil.amIPresenter() || LiveMeeting.inst().whiteboardModel.multiUser) {
if (amIPresenter || LiveMeeting.inst().whiteboardModel.multiUser) {
startTimer();
} else {
stopTimer();

View File

@ -50,7 +50,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.Options;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.main.model.users.events.ChangeMyRole;
import org.bigbluebutton.modules.whiteboard.business.shapes.WhiteboardConstants;
@ -85,7 +84,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private var _hideToolbarTimer:Timer = new Timer(500, 1);
private function onCreationComplete():void {
multiUserBtn.enabled = multiUserBtn.visible = multiUserBtn.includeInLayout = UsersUtil.amIPresenter();
multiUserBtn.enabled = multiUserBtn.visible = multiUserBtn.includeInLayout = this.isPresenter;
setToolType(WhiteboardConstants.TYPE_ZOOM, null);
_hideToolbarTimer.addEventListener(TimerEvent.TIMER, onHideToolbarTimerComplete);
@ -284,10 +283,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
return (multiUser? true : isPresenter);
}
private function get isModerator():Boolean {
return UsersUtil.amIModerator();
}
]]>
</fx:Script>
<fx:Declarations>