diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml index 2967a8102ac17fdfc9dc95c8c11bdf83ae9ac20e..550b182a566cd07abf4c6a7d56c0e011902cf8e5 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/chat/views/ChatView.mxml @@ -95,9 +95,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private var baseIndex:int; private static const PUBLIC_TAB_NEW:String = ResourceUtil.getInstance().getString("bbb.accessibility.chat.chatView.publicTabNew"); private var publicWaiting:Boolean = false; - private var privateWaiting:ArrayCollection = new ArrayCollection(); - private var publicFocus:Boolean = false; - private var privateFocus:Boolean = false; + private var publicFocus:Boolean = false; private var noticeLabel:String; [Embed(source="../sounds/notice.mp3")] @@ -336,12 +334,9 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. // Activates an audio alert for screen-reader users on private message reception private function privateNotification(event:PrivateChatMessageEvent):void{ if (! UsersUtil.isMe(event.message.fromUserID)) { - privateWaiting.addItem(event); if (Accessibility.active){ noticeSound.play(); } - chatTabs.getChildByName(event.message.fromUserID).addEventListener(FocusEvent.FOCUS_IN, privateChatFocus); - chatTabs.getChildByName(event.message.fromUserID).addEventListener(FocusEvent.FOCUS_OUT, privateChatUnfocus); } } @@ -349,62 +344,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. publicFocus = true; publicWaiting = false; } - - public function privateChatFocus(event:FocusEvent):void{ - if (event.target.name == "chatMessagesList"){ - var removed:Boolean = false; - - for (var messageCounter:int = 0; messageCounter < event.target.parent.exposeNumMessages(); messageCounter ++){ - removed = removePrivateSender(event.target.parent.exposeSenderID(messageCounter)); - if (removed) { - messageCounter = event.target.parent.exposeNumMessages() + 1; - } - } - if (privateWaiting.length == 1){ - privateFocus = true; - } else { - privateFocus == false; - } - } - } - public function publicChatUnfocus(event:FocusEvent):void { publicFocus = false; } - - public function privateChatUnfocus(event:FocusEvent):void { - // If you unfocus from private chat into public or options, privateFocus will be false - // Even if you focus to a different private chat, you cannot focus all of them. - privateFocus = false; - } - - // Returns an array of userIDs. The userIDs refer to users who have sent this user private messages which have not been read. - public function getPrivateSenders():ArrayCollection { - var privateSenders:ArrayCollection = new ArrayCollection; - if (privateWaiting.length){ - for (var i:int = 0; i < privateWaiting.length; i++){ - privateSenders.addItem(privateWaiting.getItemAt(i).message.chatobj.userid); - } - } - return privateSenders; - } - - // This is slightly mis-named; it removes the notification of this sender sending a private message for notification purposes - private function removePrivateSender(senderID:String):Boolean{ - var success:Boolean = false; - if (privateWaiting.length){ - for (var i:int = 0; i < privateWaiting.length; i++){ - if (senderID == privateWaiting.getItemAt(i).message.chatobj.userid){ - privateWaiting.removeItemAt(i); - success = true; - i = privateWaiting.length; - } - } - } - return success; - } - + private function focusPreviousChatTab(e:ShortcutEvent):void{ if (chatTabs.selectedIndex > 0){ chatTabs.selectedIndex--;