Scratched an itch...
Removed the unholy 'alreadyDisplayed' hack and associated return value from ChatDisplay. The localtype should be used to determine whether something should be displayed. If not, why should ChatDisplay registration order matter? It shouldn't. If there are two ChatDisplays that could potentially show the same message and you only want one of them to, sort that out in your own fuckin' code. I'm not changing the Java side right now because I'd have to patch-up a bunch of projects... git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5916 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -729,11 +729,8 @@ public class ChatDirector extends BasicDirector
|
||||
*/
|
||||
protected function dispatchPreparedMessage (message :ChatMessage) :void
|
||||
{
|
||||
var displayed :Boolean = false;
|
||||
_displays.apply(function (disp :ChatDisplay) :void {
|
||||
if (disp.displayMessage(message, displayed)) {
|
||||
displayed = true;
|
||||
}
|
||||
disp.displayMessage(message);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,7 @@ public interface ChatDisplay
|
||||
* Called to display a chat message.
|
||||
*
|
||||
* @see ChatMessage
|
||||
* @return true if the message was displayed here.
|
||||
*/
|
||||
function displayMessage (
|
||||
msg :ChatMessage, alreadyDisplayed :Boolean) :Boolean;
|
||||
function displayMessage (msg :ChatMessage) :void;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user