From 7def63d087279c7347f4bd83871283baa7c3f946 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 14 Oct 2010 17:51:20 +0000 Subject: [PATCH] It's even twistier than I thought, but I'm going to assume that the original logic did not take advantage of the fact that it was possible to fall through the second switch and not actually return anything and further fall through into supporting specialized or ignoring. If that really was going on, then this hairy mess needed to be cleaned up anyway and deserves to be a bug. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1025 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/java/com/threerings/chat/SubtitleChatOverlay.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/java/com/threerings/chat/SubtitleChatOverlay.java b/src/java/com/threerings/chat/SubtitleChatOverlay.java index 922cbdac..1f1b5e79 100644 --- a/src/java/com/threerings/chat/SubtitleChatOverlay.java +++ b/src/java/com/threerings/chat/SubtitleChatOverlay.java @@ -729,16 +729,13 @@ public class SubtitleChatOverlay extends ChatOverlay int type = _logic.decodeType(localtype); if (type != 0) { // factor in the mode - type = _logic.adjustTypeByMode(((UserMessage) message).mode, type); - if (type != 0) { - return type; - } + return _logic.adjustTypeByMode(((UserMessage) message).mode, type); } - // if we're showing from history, include specialized chat messages if (history) { return ChatLogic.SPECIALIZED; } + // otherwise fall through and IGNORECHAT } else if (message instanceof SystemMessage) { if (history || isApprovedLocalType(localtype)) {