Entries deleted.
authorMarseille
Wed, 24 Jun 2009 13:04:52 +0200
changeset 288 b4112a39526c
parent 287 d951927691e1
child 289 a841ea9fba02
child 290 ee4c051de429
child 295 66c7566e4caa
Entries deleted.
src/com/beem/project/beem/ui/ContactList.java
--- a/src/com/beem/project/beem/ui/ContactList.java	Wed Jun 24 12:34:41 2009 +0200
+++ b/src/com/beem/project/beem/ui/ContactList.java	Wed Jun 24 13:04:52 2009 +0200
@@ -93,8 +93,6 @@
 	super.onActivityResult(requestCode, resultCode, data);
 	if (requestCode == REQUEST_CODE) {
 	    if (resultCode == 69) {
-		stopService(new Intent(this, BeemService.class));
-		Log.e("CONTACTLIST", "STOPSERVICE");
 		finish();
 		startActivity(new Intent(this, Login.class));
 	    }
@@ -118,7 +116,6 @@
     @Override
     protected void onStop() {
 	super.onStop();
-	Log.e("CONTACTLIST", "UNBINDSERVICE");
 	unbindService(mServConn);
 	groupName.clear();
 	groupMap.clear();
@@ -175,7 +172,7 @@
 
 	@Override
 	public void onEntriesAdded(List<String> addresses) throws RemoteException {
-	    Log.e("CONTACTLIST", "DEBUG - ONENTRIESADDED()");
+	    Log.d("CONTACTLIST", "DEBUG - ONENTRIESADDED()");
 	    for (String str : addresses) {
 		Contact curContact = mRoster.getContact(str);
 		for (String group : curContact.getGroups()) {
@@ -195,7 +192,7 @@
 
 	@Override
 	public void onEntriesDeleted(List<String> addresses) throws RemoteException {
-	    Log.e("CONTACTLIST", "DEBUG - ONENTRIESDELETED()");
+	    Log.d("CONTACTLIST", "DEBUG - ONENTRIESDELETED() " + addresses.get(0));
 	    for (List<Contact> cList : groupMap.values()) {
 		for (Contact curContact : cList) {
 		    for (String addr : addresses) {
@@ -203,10 +200,7 @@
 			    cList.remove(curContact);
 			    if (cList.isEmpty()) {
 				groupMap.values().remove(cList);
-				if (groupMap.size() == 0) {
-				    groupMap.clear();
-				    groupName.clear();
-				}
+				groupName.remove(DEFAULT_GROUP);
 			    }
 			}
 		    }
@@ -221,7 +215,7 @@
 	 */
 	@Override
 	public void onEntriesUpdated(List<String> addresses) throws RemoteException {
-	    Log.e("CONTACTLIST", "DEBUG - ONENTRIESUPDATED()");
+	    Log.d("CONTACTLIST", "DEBUG - ONENTRIESUPDATED()");
 	    for (String str : addresses) {
 		Contact curContact = mRoster.getContact(str);
 		for (String group : curContact.getGroups()) {
@@ -247,7 +241,7 @@
 
 	@Override
 	public void onPresenceChanged(PresenceAdapter presence) throws RemoteException {
-	    Log.e("CONTACTLIST", "DEBUG - ONPRESENCECHANGED()");
+	    Log.d("CONTACTLIST", "DEBUG - ONPRESENCECHANGED()");
 	    for (Contact curContact : mListContact) {
 		if (curContact.getJID().equals(StringUtils.parseBareAddress(presence.getFrom()))) {
 		    curContact.setStatus(mRoster.getPresence(StringUtils.parseBareAddress(presence.getFrom())));
@@ -266,7 +260,7 @@
 
 	@Override
 	public void onEntryDeleteFromGroup(String group, String jid) throws RemoteException {
-	    Log.e("CONTACTLIST", "DEBUG - ONENTRYDELETEFROMGROUP()");
+	    Log.d("CONTACTLIST", "DEBUG - ONENTRYDELETEFROMGROUP()");
 	    for (Contact contact : mListContact) {
 		if (jid.equals(contact.getJID())
 		    && (contact.getGroups().contains(group) || contact.getGroups().size() == 0)) {