Upping message count to 500.
This commit is contained in:
@@ -3,7 +3,7 @@ package com.gempukku.lotro.chat;
|
||||
import java.util.*;
|
||||
|
||||
public class ChatRoom {
|
||||
private int _maxMessageHistoryCount = 150;
|
||||
private int _maxMessageHistoryCount = 500;
|
||||
private LinkedList<ChatMessage> _lastMessages = new LinkedList<ChatMessage>();
|
||||
private Map<String, ChatRoomListener> _chatRoomListeners = new TreeMap<String, ChatRoomListener>(
|
||||
new Comparator<String>() {
|
||||
|
||||
@@ -6,6 +6,7 @@ var ChatBoxUI = Class.extend({
|
||||
chatTalkDiv: null,
|
||||
chatListDiv: null,
|
||||
showTimestamps: false,
|
||||
maxMessageCount: 500,
|
||||
talkBoxHeight: 25,
|
||||
chatUpdateInterval: 1000,
|
||||
unsentMessages: null,
|
||||
@@ -60,9 +61,9 @@ var ChatBoxUI = Class.extend({
|
||||
|
||||
if (showHideSystemButton) {
|
||||
this.hideSystemButton = $("<button id='showSystemMessages'>Toggle system messages</button>").button(
|
||||
{icons: {
|
||||
primary: "ui-icon-zoomin"
|
||||
}, text: false});
|
||||
{icons: {
|
||||
primary: "ui-icon-zoomin"
|
||||
}, text: false});
|
||||
this.hideSystemButton.click(
|
||||
function() {
|
||||
if (that.isShowingMessageClass("systemMessage")) {
|
||||
@@ -78,9 +79,9 @@ var ChatBoxUI = Class.extend({
|
||||
|
||||
if (showLockButton) {
|
||||
this.lockButton = $("<button id='lockChatButton'>Toggle lock chat</button>").button(
|
||||
{icons: {
|
||||
primary: "ui-icon-locked"
|
||||
}, text: false});
|
||||
{icons: {
|
||||
primary: "ui-icon-locked"
|
||||
}, text: false});
|
||||
this.lockButton.click(
|
||||
function() {
|
||||
if (that.lockChat) {
|
||||
@@ -107,16 +108,16 @@ var ChatBoxUI = Class.extend({
|
||||
function(xml) {
|
||||
that.processMessages(xml, true);
|
||||
}, {
|
||||
"401": function() {
|
||||
that.appendMessage("You are not logged in, go to the main page to log in.", "warningMessage");
|
||||
},
|
||||
"403": function() {
|
||||
that.appendMessage("You have no permission to join this chat.", "warningMessage");
|
||||
},
|
||||
"404": function() {
|
||||
that.appendMessage("Chat room was closed, please go to the Game Hall.", "warningMessage");
|
||||
}
|
||||
});
|
||||
"401": function() {
|
||||
that.appendMessage("You are not logged in, go to the main page to log in.", "warningMessage");
|
||||
},
|
||||
"403": function() {
|
||||
that.appendMessage("You have no permission to join this chat.", "warningMessage");
|
||||
},
|
||||
"404": function() {
|
||||
that.appendMessage("Chat room was closed, please go to the Game Hall.", "warningMessage");
|
||||
}
|
||||
});
|
||||
|
||||
this.chatTalkDiv.bind("keypress", function(e) {
|
||||
var code = (e.keyCode ? e.keyCode : e.which);
|
||||
@@ -193,7 +194,7 @@ var ChatBoxUI = Class.extend({
|
||||
messageDiv.hide();
|
||||
}
|
||||
|
||||
if ($("div.message", this.chatMessagesDiv).length > 150) {
|
||||
if ($("div.message", this.chatMessagesDiv).length > this.maxMessageCount) {
|
||||
$("div.message", this.chatMessagesDiv).first().remove();
|
||||
}
|
||||
if (!this.lockChat)
|
||||
|
||||
Reference in New Issue
Block a user