chat history: remove group Clear history option
This was added with today's update
This commit is contained in:
@@ -334,7 +334,7 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
||||
boolean removed = false;
|
||||
for (ChatMessageType msgType : tab.getMessageTypes())
|
||||
{
|
||||
final ChatLineBuffer lineBuffer = client.getChatLineMap().get(toRealType(msgType).getType());
|
||||
final ChatLineBuffer lineBuffer = client.getChatLineMap().get(msgType.getType());
|
||||
if (lineBuffer == null)
|
||||
{
|
||||
continue;
|
||||
@@ -343,8 +343,7 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
||||
final MessageNode[] lines = lineBuffer.getLines().clone();
|
||||
for (final MessageNode line : lines)
|
||||
{
|
||||
// check the type because gim and clan chat are shared in the same line buffer
|
||||
if (line != null && line.getType() == msgType)
|
||||
if (line != null)
|
||||
{
|
||||
lineBuffer.removeMessageNode(line);
|
||||
removed = true;
|
||||
@@ -359,20 +358,6 @@ public class ChatHistoryPlugin extends Plugin implements KeyListener
|
||||
}
|
||||
}
|
||||
|
||||
private ChatMessageType toRealType(ChatMessageType type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
// gim chat/message are actually in the clan chat/message line buffers
|
||||
case CLAN_GIM_CHAT:
|
||||
return ChatMessageType.CLAN_CHAT;
|
||||
case CLAN_GIM_MESSAGE:
|
||||
return ChatMessageType.CLAN_MESSAGE;
|
||||
default:
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyPressed(KeyEvent e)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,8 @@ enum ChatboxTab
|
||||
ChatMessageType.CLAN_CHAT, ChatMessageType.CLAN_MESSAGE,
|
||||
ChatMessageType.CLAN_GUEST_CHAT, ChatMessageType.CLAN_GUEST_MESSAGE),
|
||||
|
||||
TRADE_GROUP("Show none", WidgetInfo.CHATBOX_TAB_TRADE,
|
||||
// Group has its own Clear option, but Trade does not
|
||||
TRADE_GROUP("Trade:</col> Show none", WidgetInfo.CHATBOX_TAB_TRADE,
|
||||
ChatMessageType.TRADE_SENT, ChatMessageType.TRADEREQ, ChatMessageType.TRADE, ChatMessageType.CHALREQ_TRADE,
|
||||
ChatMessageType.CLAN_GIM_CHAT, ChatMessageType.CLAN_GIM_MESSAGE),
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user