mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
dont display groupchatname if in groupchat, display name of participant instead
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12445 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
wolf.posdorfer
parent
637d80b18b
commit
9938a3e61a
Binary file not shown.
@ -843,7 +843,7 @@ public abstract class ChatRoom extends BackgroundPanel implements ActionListener
|
||||
/**
|
||||
* Returns the <code>Message.Type</code> specific to this
|
||||
* chat room.
|
||||
* GroupChat is Message.Type.GROUP_CHAT
|
||||
* GroupChat is Message.Type.groupchat
|
||||
* Normal Chat is Message.TYPE.NORMAL
|
||||
*
|
||||
* @return the ChatRooms Message.TYPE
|
||||
|
||||
@ -10,6 +10,7 @@ import javax.swing.ImageIcon;
|
||||
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.spark.SparkManager;
|
||||
import org.jivesoftware.spark.roar.RoarProperties;
|
||||
import org.jivesoftware.spark.roar.RoarResources;
|
||||
@ -74,7 +75,12 @@ public class BottomRight implements RoarDisplayType {
|
||||
|
||||
ImageIcon icon = SparkRes.getImageIcon(SparkRes.SPARK_IMAGE_32x32);
|
||||
|
||||
String nickname = room.getTabTitle();
|
||||
|
||||
String nickname = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom());
|
||||
if(room.getChatType() == Message.Type.groupchat)
|
||||
{
|
||||
nickname = StringUtils.parseResource(nickname);
|
||||
}
|
||||
|
||||
RoarPanel.popupWindow(this, icon, nickname, message.getBody(),
|
||||
_lastusedXpos, _lastusedYpos, props.getDuration(),
|
||||
|
||||
@ -11,6 +11,7 @@ import javax.swing.ImageIcon;
|
||||
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.spark.SparkManager;
|
||||
import org.jivesoftware.spark.roar.RoarProperties;
|
||||
import org.jivesoftware.spark.roar.RoarResources;
|
||||
@ -67,7 +68,11 @@ public class TopRight implements RoarDisplayType {
|
||||
|
||||
ImageIcon icon = SparkRes.getImageIcon(SparkRes.SPARK_IMAGE_32x32);
|
||||
|
||||
String nickname = room.getTabTitle();
|
||||
String nickname = SparkManager.getUserManager().getUserNicknameFromJID(message.getFrom());
|
||||
if(room.getChatType() == Message.Type.groupchat)
|
||||
{
|
||||
nickname = StringUtils.parseResource(nickname);
|
||||
}
|
||||
|
||||
RoarPanel.popupWindow(this, icon, nickname, message.getBody(),
|
||||
_lastusedXpos, _lastusedYpos, props.getDuration(),
|
||||
|
||||
Reference in New Issue
Block a user