Fixed local server time in client's chat messages

This commit is contained in:
rsypen 2018-01-15 09:17:35 +01:00 committed by GitHub
parent bc3274b144
commit ccd121277a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 17 deletions

View file

@ -28,6 +28,7 @@
package mage.client.chat;
import java.awt.Font;
import java.util.Date;
import mage.client.SessionHandler;
import mage.client.components.ColorPane;
@ -54,7 +55,7 @@ public class ChatPanelSeparated extends ChatPanelBasic {
* @param color Preferred color. Not used.
*/
@Override
public void receiveMessage(String username, String message, String time, ChatMessage.MessageType messageType, ChatMessage.MessageColor color) {
public void receiveMessage(String username, String message, Date time, ChatMessage.MessageType messageType, ChatMessage.MessageColor color) {
switch (messageType) {
case TALK:
case WHISPER_TO:
@ -65,7 +66,7 @@ public class ChatPanelSeparated extends ChatPanelBasic {
}
StringBuilder text = new StringBuilder();
if (time != null) {
text.append(getColoredText(TIMESTAMP_COLOR, time + ": "));
text.append(getColoredText(TIMESTAMP_COLOR, timeFormatter.format(time) + ": "));
}
String userColor;
String textColor;