Updating moving of contact items.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7433 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-03-09 18:51:11 +00:00
committed by derek
parent 8b526badd3
commit da0205924f
2 changed files with 15 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.RosterEntry;
import org.jivesoftware.smack.RosterGroup;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.spark.PresenceManager;
import org.jivesoftware.spark.SparkManager;
import org.jivesoftware.spark.util.SwingWorker;
import org.jivesoftware.spark.util.log.Log;
@ -223,7 +224,13 @@ public class ContactGroupTransferHandler extends TransferHandler {
newContact.setPresence(item.getPresence());
newContact.setIcon(item.getIcon());
newContact.getNicknameLabel().setFont(item.getNicknameLabel().getFont());
contactGroup.addContactItem(newContact);
if (!PresenceManager.isOnline(item.getJID())) {
contactGroup.addOfflineContactItem(item.getNickname(), item.getJID());
}
else {
contactGroup.addContactItem(newContact);
}
contactGroup.clearSelection();
final ContactGroup oldGroup = getContactGroup(item.getGroupName());

View File

@ -13,6 +13,7 @@ import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.RosterEntry;
import org.jivesoftware.smack.RosterGroup;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.spark.PresenceManager;
import org.jivesoftware.spark.SparkManager;
import org.jivesoftware.spark.plugin.ContextMenuListener;
import org.jivesoftware.spark.plugin.Plugin;
@ -187,7 +188,12 @@ public class ContactListAssistantPlugin implements Plugin {
return;
}
contactGroup.addContactItem(newContact);
if (!PresenceManager.isOnline(item.getJID())) {
contactGroup.addOfflineContactItem(item.getNickname(), item.getJID());
}
else {
contactGroup.addContactItem(newContact);
}
contactGroup.clearSelection();
final ContactGroup oldGroup = getContactGroup(item.getGroupName());