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:
Ray Greenwell
2009-08-15 00:06:12 +00:00
parent 1b17350ee0
commit a3b20e176b
2 changed files with 2 additions and 7 deletions
@@ -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;
}
}