removed the Session out of local scope and introduced a static SessionHandler that acts as interface to remote.Session

This commit is contained in:
ingmargoudt 2016-09-15 20:52:41 +02:00
parent 360823ec2e
commit 3019991473
28 changed files with 545 additions and 271 deletions

View file

@ -28,6 +28,8 @@
package mage.client.chat;
import java.awt.Font;
import mage.client.SessionHandler;
import mage.client.components.ColorPane;
import mage.client.util.GUISizeHelper;
import mage.view.ChatMessage;
@ -78,9 +80,9 @@ public class ChatPanelSeparated extends ChatPanelBasic {
break;
default:
if (parentChatRef != null) {
userColor = parentChatRef.session.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
userColor = SessionHandler.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
} else {
userColor = session.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
userColor = SessionHandler.getUserName().equals(username) ? MY_COLOR : OPPONENT_COLOR;
}
textColor = MESSAGE_COLOR;
userSeparator = ": ";