From cc1e7affb8e1f13c8b365f730529863fef8b3b00 Mon Sep 17 00:00:00 2001 From: yanas Date: Tue, 26 Nov 2013 12:00:49 +0100 Subject: [PATCH] Fixes "null" error message title in chats. --- .../impl/gui/main/chat/ChatConversationPanel.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java index c3806f5e2..4ba08f65c 100755 --- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java @@ -558,9 +558,14 @@ else if (messageType.equals(Chat.ERROR_MESSAGE)) + ImageLoader.getImageUri(ImageLoader.EXCLAMATION_MARK) + "' "; - chatString += errorIcon - + messageTitle - + endHeaderTag + "
" + message + "
"; + // If the message title is null do not show it and show the error + // icon on the same line as the actual error message. + if (messageTitle != null) + chatString += errorIcon + messageTitle + endHeaderTag + + "
" + message + "
"; + else + chatString += endHeaderTag + + "
" + errorIcon + " " + message + "
"; } return chatString;